Search in sources :

Example 1 with EditorGutter

use of com.intellij.openapi.editor.EditorGutter in project intellij-community by JetBrains.

the class PyStudyRunContextAction method update.

@Override
public void update(AnActionEvent event) {
    final ConfigurationContext context = ConfigurationContext.getFromContext(event.getDataContext());
    final Location location = context.getLocation();
    if (location == null)
        return;
    super.update(event);
    final InputEvent inputEvent = event.getInputEvent();
    final Presentation presentation = event.getPresentation();
    if (inputEvent == null && !(context.getDataContext().getData(PlatformDataKeys.CONTEXT_COMPONENT) instanceof EditorGutter)) {
        presentation.setText("");
    }
}
Also used : ConfigurationContext(com.intellij.execution.actions.ConfigurationContext) EditorGutter(com.intellij.openapi.editor.EditorGutter) InputEvent(java.awt.event.InputEvent) Presentation(com.intellij.openapi.actionSystem.Presentation) Location(com.intellij.execution.Location)

Aggregations

Location (com.intellij.execution.Location)1 ConfigurationContext (com.intellij.execution.actions.ConfigurationContext)1 Presentation (com.intellij.openapi.actionSystem.Presentation)1 EditorGutter (com.intellij.openapi.editor.EditorGutter)1 InputEvent (java.awt.event.InputEvent)1