mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for 193512, ArrayIndexOutOfBoundsException in DOMAST View.
This commit is contained in:
parent
3bad87738f
commit
6d31000503
1 changed files with 0 additions and 5 deletions
|
@ -41,7 +41,6 @@ public class FindIASTNameTarget implements IFindReplaceTarget, IFindReplaceTarge
|
||||||
IASTTranslationUnit tu = null;
|
IASTTranslationUnit tu = null;
|
||||||
DOMASTNodeParent tuTreeParent = null;
|
DOMASTNodeParent tuTreeParent = null;
|
||||||
TreeViewer viewer = null;
|
TreeViewer viewer = null;
|
||||||
DOMASTNodeLeaf startingNode = null;
|
|
||||||
IASTName[] matchingNames = null;
|
IASTName[] matchingNames = null;
|
||||||
boolean wasForward = true;
|
boolean wasForward = true;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
@ -352,13 +351,9 @@ public class FindIASTNameTarget implements IFindReplaceTarget, IFindReplaceTarge
|
||||||
IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
|
IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
|
||||||
|
|
||||||
if (selection.isEmpty()) {
|
if (selection.isEmpty()) {
|
||||||
if (viewer.getTree().getItems()[0].getData() instanceof DOMASTNodeLeaf);
|
|
||||||
startingNode = (DOMASTNodeLeaf)viewer.getTree().getItems()[0].getData();
|
|
||||||
|
|
||||||
return new Point(0, 0);
|
return new Point(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
startingNode = (DOMASTNodeLeaf)selection.getFirstElement();
|
|
||||||
return new Point(((ASTNode)((DOMASTNodeLeaf)selection.getFirstElement()).getNode()).getOffset(), 0);
|
return new Point(((ASTNode)((DOMASTNodeLeaf)selection.getFirstElement()).getNode()).getOffset(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue