@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(); } }
/** * <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); } } } } }
/** * 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); }
@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(); } }
@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; }
@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); }
@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) { } } }
private void doReconcile(DirtyRegion dirty, IRegion partition) { if (partition == null) { super.initialReconcile(); } else if (dirty == null) { super.reconcile(partition); } else { super.reconcile(dirty, partition); } }
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { if (strategies == null) return; for (IReconcilingStrategy strategy : strategies) { strategy.reconcile(dirtyRegion, subRegion); } }
/** * 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; }
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { for (IReconcilingStrategy strategy : fStrategies) { strategy.reconcile(dirtyRegion, subRegion); } }
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { if (fStrategies == null) return; for (int i= 0; i < fStrategies.length; i++) fStrategies[i].reconcile(dirtyRegion, subRegion); }
@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); }
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { onModelChange(); }
@Override public void reconcile(final DirtyRegion dirtyRegion, final IRegion subRegion) { this.reconcile(dirtyRegion); }
@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(); } }
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { updateFolding(); }
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { // TODO Auto-generated method stub }
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { reconcile(subRegion); }
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { initialReconcile(); }
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {}
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { initialReconcile(); }
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { // we can't do incremental yet }
public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { reconcile(false); }
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { reconcile(); }
public void reconcile( DirtyRegion dirtyRegion, IRegion subRegion ) { reconcile( subRegion ); }
@Override public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { reconcile(subRegion); }