-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#989: Camel debug - Add support for exchange variables.
- Loading branch information
Showing
6 changed files
with
105 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...plugin/src/main/java/com/github/cameltooling/idea/runner/debugger/util/DebuggerUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.github.cameltooling.idea.runner.debugger.util; | ||
|
||
import javax.xml.XMLConstants; | ||
import javax.xml.parsers.DocumentBuilder; | ||
import javax.xml.parsers.DocumentBuilderFactory; | ||
import javax.xml.parsers.ParserConfigurationException; | ||
|
||
public final class DebuggerUtils { | ||
|
||
private DebuggerUtils() { | ||
} | ||
|
||
public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException { | ||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | ||
factory.setNamespaceAware(true); | ||
factory.setValidating(false); | ||
factory.setIgnoringElementContentWhitespace(true); | ||
factory.setIgnoringComments(true); | ||
try { | ||
// Set secure processing | ||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); | ||
} catch (ParserConfigurationException e) { | ||
} | ||
try { | ||
// Disable the external-general-entities by default | ||
factory.setFeature("http://xml.org/sax/features/external-general-entities", false); | ||
} catch (ParserConfigurationException e) { | ||
} | ||
try { | ||
// Disable the external-parameter-entities by default | ||
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); | ||
} catch (ParserConfigurationException e) { | ||
} | ||
return factory.newDocumentBuilder(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters