public static RAstNode findNextCommands(final IAstNode root, final int offset) { final NextCommandsSearchVisitor visitor = new NextCommandsSearchVisitor(offset); try { root.accept(visitor); } catch (final InvocationTargetException e) { } return visitor.fNext; }
public static RAstNode findLowestFDefAssignment(final IAstNode root, final int offset) { final LowestFDefAssignmentSearchVisitor visitor = new LowestFDefAssignmentSearchVisitor(offset); try { root.accept(visitor); } catch (final OperationCanceledException e) { } catch (final InvocationTargetException e) { } return visitor.fAssignment; }
public static RAstNode[] findDeepestCommands( final IAstNode root, final int startOffset, final int stopOffset) { final DeepestCommandsSearchVisitor visitor = new DeepestCommandsSearchVisitor(startOffset, stopOffset); try { root.accept(visitor); } catch (final InvocationTargetException e) { } return visitor.fCommands.toArray(new RAstNode[visitor.fCommands.size()]); }