org.eclipse.xtext.ui.editor.reconciler.XtextReconciler Java Examples
The following examples show how to use
org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpellingQuickfixTest.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected ICompletionProposal[] computeQuickAssistProposals(int offset) { XtextSourceViewer sourceViewer = getSourceViewer(); XtextReconciler reconciler = (XtextReconciler) sourceViewer.getAdapter(IReconciler.class); IReconcilingStrategyExtension reconcilingStrategyExtension = (IReconcilingStrategyExtension) reconciler.getReconcilingStrategy(""); reconcilingStrategyExtension.initialReconcile(); QuickAssistAssistant quickAssistAssistant = (QuickAssistAssistant) sourceViewer.getQuickAssistAssistant(); IQuickAssistProcessor quickAssistProcessor = quickAssistAssistant.getQuickAssistProcessor(); ICompletionProposal[] quickAssistProposals = quickAssistProcessor .computeQuickAssistProposals(new TextInvocationContext(sourceViewer, offset, -1)); return quickAssistProposals; }
Example #2
Source File: XtextEditor.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.7 */ @Override public void forceReconcile() { IReconciler reconciler = Adapters.adapt(getInternalSourceViewer(), IReconciler.class); if (reconciler instanceof XtextReconciler) ((XtextReconciler)reconciler).forceReconcile(); }
Example #3
Source File: XtextSourceViewerConfiguration.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { IReconciler reconciler = reconcilerProvider.get(); if (reconciler instanceof XtextReconciler && editor instanceof XtextEditor) ((XtextReconciler) reconciler).setEditor((XtextEditor) editor); return reconciler; }
Example #4
Source File: AbstractXtextEditorTest.java From dsl-devkit with Eclipse Public License 1.0 | 5 votes |
/** {@inheritDoc} */ @Override protected void waitForValidation() { // Editor tests frequently work by modifying the document. We first need to wait for the reconciler to run, otherwise we may // actually get results from before a document change is reflected in the document's resource, leading to spurious errors. // Note that the XtextReconciler runs with a delay of 500ms. waitForJobsOfFamily(XtextReconciler.class.getName()); super.waitForValidation(); }
Example #5
Source File: N4JSUiModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
/** Custom XtextReconciler. */ public Class<? extends XtextReconciler> bindXtextReconciler() { return N4JSReconciler.class; }
Example #6
Source File: DefaultUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IReconciler> bindIReconciler() { return XtextReconciler.class; }