@Override public void visit(final SourceComponent node) throws InvocationTargetException { if (fNext == null) { final IAstNode parent = node.getParent(); if (node.fStopOffset >= fOffset && // R script file or inside R chunk (parent == null || (parent.getOffset() <= fOffset && fOffset <= parent.getStopOffset()))) { fContainer = node; node.acceptInRChildren(this); return; } } }
@Override public void visit(final SourceComponent node) throws InvocationTargetException { if (node.fStopOffset >= fStartOffset && fStopOffset >= node.fStartOffset) { fCommands.clear(); fContainer = node; node.acceptInRChildren(this); return; } }