Java 类org.eclipse.jface.text.reconciler.DirtyRegion 实例源码

项目:fluentmark    文件:MkReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirty, IRegion partition) {
    try {
        IProblemRequestorExtension e = getProblemRequestorExtension();
        if (e != null) {
            try {
                e.beginReportingSequence();
                doReconcile(dirty, partition);
            } finally {
                e.endReportingSequence();
            }
        } else {
            doReconcile(dirty, partition);
        }
    } finally {
        ((FluentMkEditor) editor).reconciled();
    }
}
项目:typescript.java    文件:IndentFoldingStrategy.java   
/**
 * <p>
 * Searches the given {@link DirtyRegion} for annotations that now have a
 * length of 0. This is caused when something that was being folded has been
 * deleted. These {@link FoldingAnnotation}s are then added to the
 * {@link List} of {@link FoldingAnnotation}s to be deleted
 * </p>
 * 
 * @param dirtyRegion
 *            find the now invalid {@link FoldingAnnotation}s in this
 *            {@link DirtyRegion}
 * @param deletions
 *            the current list of {@link FoldingAnnotation}s marked for
 *            deletion that the newly found invalid
 *            {@link FoldingAnnotation}s will be added to
 */
protected void markInvalidAnnotationsForDeletion(DirtyRegion dirtyRegion, List<FoldingAnnotation> deletions,
        List<FoldingAnnotation> existing) {
    Iterator iter = getAnnotationIterator(dirtyRegion);
    if (iter != null) {
        while (iter.hasNext()) {
            Annotation anno = (Annotation) iter.next();
            if (anno instanceof FoldingAnnotation) {
                FoldingAnnotation folding = (FoldingAnnotation) anno;
                Position pos = projectionAnnotationModel.getPosition(anno);
                if (pos.length == 0) {
                    deletions.add(folding);
                } else {
                    existing.add(folding);
                }
            }
        }
    }
}
项目:typescript.java    文件:TypeScriptDocumentRegionProcessor.java   
/**
 * Override process method to call folding strategy BEFORE validation which
 * can take time.
 */
@Override
protected void process(DirtyRegion dirtyRegion) {
    if (!isInstalled() /* || isInRewriteSession() */ || dirtyRegion == null || getDocument() == null)
        return;
    /*
     * if there is a folding strategy then reconcile it for the entire dirty
     * region. NOTE: the folding strategy does not care about the sub
     * regions.
     */
    if (getTypeScriptFoldingStrategy() != null) {
        getTypeScriptFoldingStrategy().reconcile(dirtyRegion, null);
    }

    super.process(dirtyRegion);

}
项目:Eclipse-Postfix-Code-Completion    文件:JavaCompositeReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    try {
        IProblemRequestorExtension e= getProblemRequestorExtension();
        if (e != null) {
            try {
                e.beginReportingSequence();
                super.reconcile(dirtyRegion, subRegion);
            } finally {
                e.endReportingSequence();
            }
        } else {
            super.reconcile(dirtyRegion, subRegion);
        }
    } finally {
        reconciled();
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaCompositeReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    try {
        IProblemRequestorExtension e= getProblemRequestorExtension();
        if (e != null) {
            try {
                e.beginReportingSequence();
                super.reconcile(dirtyRegion, subRegion);
            } finally {
                e.endReportingSequence();
            }
        } else {
            super.reconcile(dirtyRegion, subRegion);
        }
    } finally {
        reconciled();
    }
}
项目:Tarski    文件:LoadReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
  if (this.document == null)
    return;
  final TypedRegion tr = (TypedRegion) subRegion;
  if (tr.getType().equals(MetaModelPartitionScanner.META_MODEL_LOADINSTANCE)
      || tr.getType().equals(MetaModelPartitionScanner.META_MODEL_LOADMODEL))
    this.reconcile(subRegion);

  return;
}
项目:Tarski    文件:SyntacticReconcilingStrategy.java   
@Override
public void reconcile(final DirtyRegion dirtyRegion, final IRegion subRegion) {
  if (this.document == null) {
    return;
  }
  if (((TypedRegion) subRegion).getType().equals(MetaModelPartitionScanner.META_MODEL_REASON)) {
    return;
  }
  this.reconcile(subRegion);
}
项目:ec4e    文件:CompositeReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    if (fStrategies == null)
        return;

    for (int i = 0; i < fStrategies.length; i++) {
        try {
            fStrategies[i].reconcile(dirtyRegion, subRegion);
        } catch (Exception e) {

        }
    }
}
项目:fluentmark    文件:MkReconcilingStrategy.java   
private void doReconcile(DirtyRegion dirty, IRegion partition) {
    if (partition == null) {
        super.initialReconcile();
    } else if (dirty == null) {
        super.reconcile(partition);
    } else {
        super.reconcile(dirty, partition);
    }
}
项目:fluentmark    文件:CompositeReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    if (strategies == null) return;

    for (IReconcilingStrategy strategy : strategies) {
        strategy.reconcile(dirtyRegion, subRegion);
    }
}
项目:typescript.java    文件:IndentFoldingStrategy.java   
/**
 * Given a {@link DirtyRegion} returns an {@link Iterator} of the already
 * existing annotations in that region.
 * 
 * @param dirtyRegion
 *            the {@link DirtyRegion} to check for existing annotations in
 * 
 * @return an {@link Iterator} over the annotations in the given
 *         {@link DirtyRegion}. The iterator could have no annotations in
 *         it. Or <code>null</code> if projection has been disabled.
 */
private Iterator getAnnotationIterator(DirtyRegion dirtyRegion) {
    Iterator annoIter = null;
    // be sure project has not been disabled
    if (projectionAnnotationModel != null) {
        // workaround for Platform Bug 299416
        int offset = dirtyRegion.getOffset();
        if (offset > 0) {
            offset--;
        }
        annoIter = projectionAnnotationModel.getAnnotationIterator(0, document.getLength(), false, false);
    }
    return annoIter;
}
项目:APICloud-Studio    文件:CompositeReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion)
{
    for (IReconcilingStrategy strategy : fStrategies)
    {
        strategy.reconcile(dirtyRegion, subRegion);
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:CompositeReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    if (fStrategies == null)
        return;

    for (int i= 0; i < fStrategies.length; i++)
        fStrategies[i].reconcile(dirtyRegion, subRegion);
}
项目:WP3    文件:LoadReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
  if (this.document == null)
    return;
  final TypedRegion tr = (TypedRegion) subRegion;
  if (tr.getType().equals(MetaModelPartitionScanner.META_MODEL_LOADINSTANCE)
      || tr.getType().equals(MetaModelPartitionScanner.META_MODEL_LOADMODEL))
    this.reconcile(subRegion);

  return;
}
项目:WP3    文件:SyntacticReconcilingStrategy.java   
@Override
public void reconcile(final DirtyRegion dirtyRegion, final IRegion subRegion) {
  if (this.document == null) {
    return;
  }
  if (((TypedRegion) subRegion).getType().equals(MetaModelPartitionScanner.META_MODEL_REASON)) {
    return;
  }
  this.reconcile(subRegion);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CompositeReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    if (fStrategies == null)
        return;

    for (int i= 0; i < fStrategies.length; i++)
        fStrategies[i].reconcile(dirtyRegion, subRegion);
}
项目:goclipse    文件:CompositeReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    if (fStrategies == null)
        return;

    for (int i= 0; i < fStrategies.length; i++)
        fStrategies[i].reconcile(dirtyRegion, subRegion);
}
项目:codelens-eclipse    文件:CodeLensStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    onModelChange();
}
项目:Tarski    文件:RelationModelReconcilingStrategy.java   
@Override
public void reconcile(final DirtyRegion dirtyRegion, final IRegion subRegion) {
  this.reconcile(dirtyRegion);
}
项目:Tarski    文件:ReasonReconcilingStrategy.java   
@Override
public void reconcile(final DirtyRegion dirtyRegion, final IRegion subRegion) {
  this.removeOldAnnotation(subRegion.getOffset());
  try {
    final IRegion lineInformationOfOffset =
        this.document.getLineInformationOfOffset(subRegion.getOffset());
    final String dirtyLine = this.document.get(lineInformationOfOffset.getOffset(),
        lineInformationOfOffset.getLength());
    final int line = this.document.getLineOfOffset(lineInformationOfOffset.getOffset());

    final int at = dirtyLine.indexOf("@");
    String errored = "";
    if (at != -1) {
      errored = dirtyLine.substring(at + 1).trim();
    } else {
      return;
    }

    if (errored.indexOf(".") == -1) {
      this.addNewAnnotation(errored, line, lineInformationOfOffset);
      this.isMatch = false;
      return;
    }

    final String sigName = errored.substring(0, errored.indexOf("."));
    final String relName = errored.substring(errored.indexOf(".") + 1);

    this.isMatch = false;
    for (final String sig : AlloyParserForMetamodel.getSigs()) {
      if (sigName.equals(sig)) {
        this.isMatch = true;
        break;
      }
    }

    if (this.isMatch == false) {
      this.addNewAnnotation(sigName, line, lineInformationOfOffset);
      return;
    }

    this.isMatch = false;
    for (final String relation : AlloyParserForMetamodel.getRels()) {
      if (relName.equals(relation)) {
        this.isMatch = true;
        break;
      }
    }

    if (this.isMatch == false) {
      this.addNewAnnotation(relName, line, lineInformationOfOffset);
      return;
    }
  } catch (final BadLocationException e) {
    e.printStackTrace();
  }
}
项目:ec4e    文件:EditorConfigFoldingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    updateFolding();
}
项目:LibertyEiffel-Eclipse-Plugin    文件:EiffelReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    // TODO Auto-generated method stub

}
项目:LibertyEiffel-Eclipse-Plugin    文件:EiffelReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    // TODO Auto-generated method stub

}
项目:subclipse    文件:CommitCommentArea.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
  reconcile(subRegion);
}
项目:tlaplus    文件:TLAReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion)
{
    initialReconcile();
}
项目:ncl30-eclipse    文件:NCLReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    initialReconcile();
}
项目:fluentmark    文件:NullReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {}
项目:bts    文件:XtextDocumentReconcileStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    reconcile(subRegion);
}
项目:KaiZen-OpenAPI-Editor    文件:JsonReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    initialReconcile();
}
项目:APICloud-Studio    文件:CommitCommentArea.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
  reconcile(subRegion);
}
项目:APICloud-Studio    文件:CommonReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion)
{
    // we can't do incremental yet
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    reconcile(false);
}
项目:WP3    文件:RelationModelReconcilingStrategy.java   
@Override
public void reconcile(final DirtyRegion dirtyRegion, final IRegion subRegion) {
  this.reconcile(dirtyRegion);
}
项目:WP3    文件:ReasonReconcilingStrategy.java   
@Override
public void reconcile(final DirtyRegion dirtyRegion, final IRegion subRegion) {
  this.removeOldAnnotation(subRegion.getOffset());
  try {
    final IRegion lineInformationOfOffset =
        this.document.getLineInformationOfOffset(subRegion.getOffset());
    final String dirtyLine = this.document.get(lineInformationOfOffset.getOffset(),
        lineInformationOfOffset.getLength());
    final int line = this.document.getLineOfOffset(lineInformationOfOffset.getOffset());

    final int at = dirtyLine.indexOf("@");
    String errored = "";
    if (at != -1) {
      errored = dirtyLine.substring(at + 1).trim();
    } else {
      return;
    }

    if (errored.indexOf(".") == -1) {
      this.addNewAnnotation(errored, line, lineInformationOfOffset);
      this.isMatch = false;
      return;
    }

    final String sigName = errored.substring(0, errored.indexOf("."));
    final String relName = errored.substring(errored.indexOf(".") + 1);

    this.isMatch = false;
    for (final String sig : AlloyParserForMetamodel.getSigs()) {
      if (sigName.equals(sig)) {
        this.isMatch = true;
        break;
      }
    }

    if (this.isMatch == false) {
      this.addNewAnnotation(sigName, line, lineInformationOfOffset);
      return;
    }

    this.isMatch = false;
    for (final String relation : AlloyParserForMetamodel.getRels()) {
      if (relName.equals(relation)) {
        this.isMatch = true;
        break;
      }
    }

    if (this.isMatch == false) {
      this.addNewAnnotation(relName, line, lineInformationOfOffset);
      return;
    }
  } catch (final BadLocationException e) {
    e.printStackTrace();
  }
}
项目:idecore    文件:ApexReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    reconcile();
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    reconcile(false);
}
项目:birt    文件:ScriptReconcilingStrategy.java   
public void reconcile( DirtyRegion dirtyRegion, IRegion subRegion )
{
    reconcile( subRegion );
}
项目:wt-studio    文件:JsonReconcilingStrategy.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    initialReconcile();
}
项目:Pydev    文件:PyReconciler.java   
@Override
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
    reconcile(subRegion);
}
项目:dLabPro-Plugin    文件:CommonReconcilingStrategy.java   
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion)
{
  reconcile(false);
}