Search in sources :

Example 1 with Reconciler

use of org.eclipse.che.ide.api.editor.reconciler.Reconciler in project che by eclipse.

the class JsJavaEditorConfiguration method initReconciler.

private Reconciler initReconciler(final ReconcilerFactory reconcilerFactory, final JavaReconcilerStrategy javaReconcilerStrategy) {
    final Reconciler reconciler = reconcilerFactory.create(DEFAULT_PARTITIONING, getPartitioner());
    reconciler.addReconcilingStrategy(DEFAULT_CONTENT_TYPE, javaReconcilerStrategy);
    return reconciler;
}
Also used : Reconciler(org.eclipse.che.ide.api.editor.reconciler.Reconciler)

Example 2 with Reconciler

use of org.eclipse.che.ide.api.editor.reconciler.Reconciler in project che by eclipse.

the class JsJavaEditorProvider method getEditor.

@Override
public TextEditor getEditor() {
    LOG.fine("JsJavaEditor instance creation.");
    final TextEditor textEditor = super.getEditor();
    if (textEditor instanceof OrionEditorPresenter) {
        final OrionEditorPresenter editor = (OrionEditorPresenter) textEditor;
        final TextEditorConfiguration configuration = configurationFactory.create(editor);
        editor.initialize(configuration);
        editor.addEditorUpdateAction(new EditorUpdateAction() {

            @Override
            public void doRefresh() {
                final Reconciler reconciler = configuration.getReconciler();
                if (reconciler != null) {
                    final ReconcilingStrategy strategy = reconciler.getReconcilingStrategy(DEFAULT_CONTENT_TYPE);
                    if (strategy instanceof JavaReconcilerStrategy) {
                        ((JavaReconcilerStrategy) strategy).parse();
                    }
                }
            }
        });
    }
    watcher.editorOpened(textEditor);
    return textEditor;
}
Also used : ReconcilingStrategy(org.eclipse.che.ide.api.editor.reconciler.ReconcilingStrategy) TextEditor(org.eclipse.che.ide.api.editor.texteditor.TextEditor) Reconciler(org.eclipse.che.ide.api.editor.reconciler.Reconciler) EditorUpdateAction(org.eclipse.che.ide.api.editor.editorconfig.EditorUpdateAction) TextEditorConfiguration(org.eclipse.che.ide.api.editor.editorconfig.TextEditorConfiguration) OrionEditorPresenter(org.eclipse.che.ide.editor.orion.client.OrionEditorPresenter)

Example 3 with Reconciler

use of org.eclipse.che.ide.api.editor.reconciler.Reconciler in project che by eclipse.

the class OrionEditorInit method uninstall.

public void uninstall() {
    Reconciler reconciler = configuration.getReconciler();
    if (reconciler != null) {
        reconciler.uninstall();
    }
    SignatureHelpProvider signatureHelpProvider = configuration.getSignatureHelpProvider();
    if (signatureHelpProvider != null) {
        signatureHelpProvider.uninstall();
    }
}
Also used : Reconciler(org.eclipse.che.ide.api.editor.reconciler.Reconciler) SignatureHelpProvider(org.eclipse.che.ide.api.editor.signature.SignatureHelpProvider)

Example 4 with Reconciler

use of org.eclipse.che.ide.api.editor.reconciler.Reconciler in project che by eclipse.

the class OrionEditorInit method configureReconciler.

/**
     * Configures the editor's Reconciler.
     * @param documentHandle the handle to the document
     */
private void configureReconciler(final DocumentHandle documentHandle) {
    final Reconciler reconciler = configuration.getReconciler();
    if (reconciler != null) {
        reconciler.setDocumentHandle(documentHandle);
        documentHandle.getDocEventBus().addHandler(DocumentChangeEvent.TYPE, reconciler);
        reconciler.install(textEditor);
    }
}
Also used : Reconciler(org.eclipse.che.ide.api.editor.reconciler.Reconciler)

Aggregations

Reconciler (org.eclipse.che.ide.api.editor.reconciler.Reconciler)4 EditorUpdateAction (org.eclipse.che.ide.api.editor.editorconfig.EditorUpdateAction)1 TextEditorConfiguration (org.eclipse.che.ide.api.editor.editorconfig.TextEditorConfiguration)1 ReconcilingStrategy (org.eclipse.che.ide.api.editor.reconciler.ReconcilingStrategy)1 SignatureHelpProvider (org.eclipse.che.ide.api.editor.signature.SignatureHelpProvider)1 TextEditor (org.eclipse.che.ide.api.editor.texteditor.TextEditor)1 OrionEditorPresenter (org.eclipse.che.ide.editor.orion.client.OrionEditorPresenter)1