Search in sources :

Example 1 with HasCompletionInformation

use of org.eclipse.che.ide.api.editor.codeassist.HasCompletionInformation in project che by eclipse.

the class QuickDocumentationAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    EditorPartPresenter activeEditor = editorAgent.getActiveEditor();
    if (activeEditor == null) {
        return;
    }
    if (activeEditor instanceof TextEditor && activeEditor instanceof HasCompletionInformation) {
        if (((TextEditor) activeEditor).getEditorWidget().isCompletionProposalsShowing()) {
            ((HasCompletionInformation) activeEditor).showCompletionInformation();
            return;
        }
    }
    quickDocumentation.showDocumentation();
}
Also used : TextEditor(org.eclipse.che.ide.api.editor.texteditor.TextEditor) HasCompletionInformation(org.eclipse.che.ide.api.editor.codeassist.HasCompletionInformation) EditorPartPresenter(org.eclipse.che.ide.api.editor.EditorPartPresenter)

Aggregations

EditorPartPresenter (org.eclipse.che.ide.api.editor.EditorPartPresenter)1 HasCompletionInformation (org.eclipse.che.ide.api.editor.codeassist.HasCompletionInformation)1 TextEditor (org.eclipse.che.ide.api.editor.texteditor.TextEditor)1