/** * Reconcile positions based on the AST subtrees * * @param subtrees * the AST subtrees */ private void reconcilePositions(XtextResource resource) { // for (int i= 0, n= subtrees.length; i < n; i++) // subtrees[i].accept(fCollector); MergingHighlightedPositionAcceptor acceptor = new MergingHighlightedPositionAcceptor( calculator); acceptor.provideHighlightingFor(resource, this); // calculator.provideHighlightingFor(resource, this); List<AttributedPosition> oldPositions = removedPositions; List<AttributedPosition> newPositions = new ArrayList<AttributedPosition>( removedPositionCount); for (int i = 0, n = oldPositions.size(); i < n; i++) { AttributedPosition current = oldPositions.get(i); if (current != null) newPositions.add(current); } removedPositions = newPositions; }
/** * Reconcile positions based on the AST subtrees * * @param subtrees * the AST subtrees */ private void reconcilePositions(final XtextResource resource) { // for (int i= 0, n= subtrees.length; i < n; i++) // subtrees[i].accept(fCollector); MergingHighlightedPositionAcceptor acceptor = new MergingHighlightedPositionAcceptor(calculator); acceptor.provideHighlightingFor(resource, this); // calculator.provideHighlightingFor(resource, this); Collections.sort(removedPositions, positionOrdering); }