Java 类org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor 实例源码

项目:statecharts    文件:XtextStyledTextHighlightingReconciler.java   
/**
 * 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;
}
项目:PDFReporter-Studio    文件:XtextStyledTextHighlightingReconciler.java   
/**
 * 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;
}
项目:dsl-devkit    文件:FixedHighlightingReconciler.java   
/**
 * 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);
}