use of io.typefox.lsapi.ServerCapabilities in project che by eclipse.
the class FindDefinitionAction method updateInPerspective.
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
EditorPartPresenter activeEditor = editorAgent.getActiveEditor();
if (activeEditor instanceof TextEditor) {
TextEditorConfiguration configuration = ((TextEditor) activeEditor).getConfiguration();
if (configuration instanceof LanguageServerEditorConfiguration) {
ServerCapabilities capabilities = ((LanguageServerEditorConfiguration) configuration).getServerCapabilities();
event.getPresentation().setEnabledAndVisible(capabilities.isDefinitionProvider() != null && capabilities.isDefinitionProvider());
return;
}
}
event.getPresentation().setEnabledAndVisible(false);
}
use of io.typefox.lsapi.ServerCapabilities in project che by eclipse.
the class FindReferencesAction method updateInPerspective.
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
EditorPartPresenter activeEditor = editorAgent.getActiveEditor();
if (activeEditor instanceof TextEditor) {
TextEditorConfiguration configuration = ((TextEditor) activeEditor).getConfiguration();
if (configuration instanceof LanguageServerEditorConfiguration) {
ServerCapabilities capabilities = ((LanguageServerEditorConfiguration) configuration).getServerCapabilities();
event.getPresentation().setEnabledAndVisible(capabilities.isReferencesProvider() != null && capabilities.isReferencesProvider());
return;
}
}
event.getPresentation().setEnabledAndVisible(false);
}
use of io.typefox.lsapi.ServerCapabilities in project che by eclipse.
the class GoToSymbolAction method updateInPerspective.
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
EditorPartPresenter activeEditor = editorAgent.getActiveEditor();
if (activeEditor instanceof TextEditor) {
TextEditorConfiguration configuration = ((TextEditor) activeEditor).getConfiguration();
if (configuration instanceof LanguageServerEditorConfiguration) {
ServerCapabilities capabilities = ((LanguageServerEditorConfiguration) configuration).getServerCapabilities();
event.getPresentation().setEnabledAndVisible(capabilities.isDocumentSymbolProvider() != null && capabilities.isDocumentSymbolProvider());
return;
}
}
event.getPresentation().setEnabledAndVisible(false);
}
Aggregations