use of org.eclipse.xtext.ui.editor.reconciler.XtextReconciler in project xtext-eclipse by eclipse.
the class SpellingQuickfixTest method computeQuickAssistProposals.
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;
}
use of org.eclipse.xtext.ui.editor.reconciler.XtextReconciler in project xtext-eclipse by eclipse.
the class XtextEditor method forceReconcile.
/**
* @since 2.7
*/
@Override
public void forceReconcile() {
IAdaptable iAdaptable = (IAdaptable) getInternalSourceViewer();
if (iAdaptable == null) {
return;
}
Object reconciler = iAdaptable.getAdapter(IReconciler.class);
if (reconciler instanceof XtextReconciler)
((XtextReconciler) reconciler).forceReconcile();
}
Aggregations