use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class GenerateMainAction method update.
@Override
public void update(AnActionEvent e) {
boolean enabled = isActionEnabled(e);
Presentation presentation = e.getPresentation();
presentation.setEnabled(enabled);
presentation.setVisible(enabled);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class ShrinkSelectionAction method update.
public void update(final AnActionEvent e) {
final Presentation presentation = e.getPresentation();
final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext());
if (editor == null) {
presentation.setEnabled(false);
return;
}
final Stack<ComponentPtr[]> history = editor.getSelectionState().getSelectionHistory();
presentation.setEnabled(history.size() > 1);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class EduUtils method enableAction.
public static void enableAction(@NotNull final AnActionEvent event, boolean isEnable) {
final Presentation presentation = event.getPresentation();
presentation.setVisible(isEnable);
presentation.setEnabled(isEnable);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class ExcludeFromStubGenerationAction method update.
@Override
public void update(AnActionEvent e) {
Presentation presentation = e.getPresentation();
boolean enabled = isEnabled(e);
presentation.setEnabled(enabled);
presentation.setVisible(enabled);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class AddToIgnoreListAction method update.
@Override
public void update(@NotNull AnActionEvent e) {
Presentation presentation = e.getPresentation();
presentation.setEnabledAndVisible(true);
presentation.setText(myActionName, false);
presentation.setDescription(message(myUseCommonExtension ? "action.Subversion.Ignore.MatchExtension.description" : "action.Subversion.Ignore.ExactMatch.description", myActionName));
}
Aggregations