@Override public void initialReconcile() { if (fStrategies == null) return; for (int i = 0; i < fStrategies.length; i++) { if (fStrategies[i] instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) fStrategies[i]; try { extension.initialReconcile(); } catch (Exception e) { } } } }
protected void handleInputDocumentChanged(IDocument oldInput, IDocument newInput) { if (shouldInstallCompletionListener) { ContentAssistantFacade facade = ((ISourceViewerExtension4) textViewer).getContentAssistantFacade(); if (facade != null) { facade.addCompletionListener(documentListener); } shouldInstallCompletionListener = false; } if (oldInput instanceof IXtextDocument) { ((IXtextDocument) oldInput).removeXtextDocumentContentObserver(documentListener); } if (newInput instanceof IXtextDocument) { ((IXtextDocument) newInput).addXtextDocumentContentObserver(documentListener); final IXtextDocument document = XtextDocumentUtil.get(textViewer); strategy.setDocument(document); if (!initalProcessDone && strategy instanceof IReconcilingStrategyExtension) { initalProcessDone = true; IReconcilingStrategyExtension reconcilingStrategyExtension = (IReconcilingStrategyExtension) strategy; reconcilingStrategyExtension.initialReconcile(); } } if (oldInput != null && newInput != null) { handleDocumentChanged(new InputChangedDocumentEvent(oldInput, newInput)); } }
/** * Must be run with a write lock on the IXtextDocument. * * @since 2.4 */ private void doRun(XtextResource state, final IProgressMonitor monitor) { if (log.isDebugEnabled()) { log.debug("Preparing reconciliation."); //$NON-NLS-1$ } final ReconcilerReplaceRegion replaceRegionToBeProcessed = getMergedReplaceRegion(state); if (replaceRegionToBeProcessed != null) { if (strategy instanceof IReconcilingStrategyExtension) { ((IReconcilingStrategyExtension) strategy).setProgressMonitor(monitor != null ? monitor : new NullProgressMonitor()); } if (strategy instanceof XtextDocumentReconcileStrategy) { ((XtextDocumentReconcileStrategy) strategy).setResource(state); } strategy.reconcile(replaceRegionToBeProcessed); if (log.isDebugEnabled()) { debugger.assertModelInSyncWithDocument(replaceRegionToBeProcessed.getDocumentEvents().get(0).getDocument(), state, replaceRegionToBeProcessed); debugger.assertResouceParsedCorrectly(state, replaceRegionToBeProcessed); } } }
@Override public void setProgressMonitor(IProgressMonitor monitor) { if (fStrategies == null) return; for (int i = 0; i < fStrategies.length; i++) { if (fStrategies[i] instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) fStrategies[i]; extension.setProgressMonitor(monitor); } } }
@Override public void setProgressMonitor(IProgressMonitor monitor) { if (strategies == null) return; for (IReconcilingStrategy strategy : strategies) { if (strategy instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) strategy; extension.setProgressMonitor(monitor); } } }
@Override public void initialReconcile() { if (strategies == null) return; for (IReconcilingStrategy strategy : strategies) { if (strategy instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) strategy; extension.initialReconcile(); } } }
public void setProgressMonitor(IProgressMonitor monitor) { for (IReconcilingStrategy strategy : fStrategies) { if (strategy instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) strategy; extension.setProgressMonitor(monitor); } } }
public void initialReconcile() { for (IReconcilingStrategy strategy : fStrategies) { if (strategy instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension) strategy; extension.initialReconcile(); } } }
@Override protected void initialProcess() { for (IReconcilingStrategy s : reconcilingStrategies) { if (s instanceof IReconcilingStrategyExtension) { ((IReconcilingStrategyExtension) s).initialReconcile(); } } fInitialProcessDone = true; }
public void setProgressMonitor(IProgressMonitor monitor) { if (fStrategies == null) return; for (int i=0; i < fStrategies.length; i++) { if (fStrategies[i] instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategies[i]; extension.setProgressMonitor(monitor); } } }
public void initialReconcile() { if (fStrategies == null) return; for (int i=0; i < fStrategies.length; i++) { if (fStrategies[i] instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategies[i]; extension.initialReconcile(); } } }
@Override public void setProgressMonitor(IProgressMonitor monitor) { if (fStrategies == null) return; for (int i=0; i < fStrategies.length; i++) { if (fStrategies[i] instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategies[i]; extension.setProgressMonitor(monitor); } } }
@Override public void initialReconcile() { if (fStrategies == null) return; for (int i=0; i < fStrategies.length; i++) { if (fStrategies[i] instanceof IReconcilingStrategyExtension) { IReconcilingStrategyExtension extension= (IReconcilingStrategyExtension) fStrategies[i]; extension.initialReconcile(); } } }