Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.pde.genericeditor.extension;singleton:=true
Bundle-Version: 1.3.200.qualifier
Bundle-Version: 1.3.300.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jface.text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ void fillCodeMinings(IDocument document, List<ICodeMining> minings) throws BadLo
int line = 0;
try {
Parser parser = Parser.getDefault();
parser.parse(document);
Node target = parser.getRootNode();
Node target = parser.parse(document);
if (target != null) {
line = document.getLineOfOffset(target.getOffsetStart());
minings.add(new TargetDefinitionActivationCodeMining(line, document, this, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}

Node rootNode = null;
Parser parser = Parser.getDefault();
try {
parser.parse(document);
rootNode = parser.parse(document);
} catch (XMLStreamException e) {
return null;
}
Node rootNode = parser.getRootNode();
if (rootNode == null) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ private void initializeParser() {
inputFactory = XMLInputFactory.newInstance();
}

public void parse(IDocument document) throws XMLStreamException {
public Node parse(IDocument document) throws XMLStreamException {
target = null;
Node parsedTarget = null;
Node currentParent = null;
Node currentNode = null;
Iterator<XMLElement> tagReaderIterator = createXMLTagItterator(document.get());
Expand Down Expand Up @@ -81,8 +82,9 @@ public void parse(IDocument document) throws XMLStreamException {
containerLocation.addRepositoryLocation(locationValue);
}
} else if (ITargetConstants.TARGET_TAG.equalsIgnoreCase(name)) {
target = new Node();
currentNode = target;
parsedTarget = new Node();
target = parsedTarget;
currentNode = parsedTarget;
} else {
currentNode = new Node();
}
Expand All @@ -107,6 +109,7 @@ public void parse(IDocument document) throws XMLStreamException {
while (eventReader.hasNext()) {
eventReader.nextEvent();
}
return parsedTarget;
}

private Iterator<XMLElement> createXMLTagItterator(String document) {
Expand Down
Loading