use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class ExportThreadsAction method update.
public void update(AnActionEvent e) {
Presentation presentation = e.getPresentation();
Project project = e.getProject();
if (project == null) {
presentation.setEnabled(false);
return;
}
DebuggerSession debuggerSession = (DebuggerManagerEx.getInstanceEx(project)).getContext().getDebuggerSession();
presentation.setEnabled(debuggerSession != null && debuggerSession.isPaused());
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class ExcludeFromCompileAction method update.
public void update(AnActionEvent e) {
final Presentation presentation = e.getPresentation();
final boolean isApplicable = getSelectedFile() != null;
presentation.setEnabled(isApplicable);
presentation.setVisible(isApplicable);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class CompileProjectAction method update.
public void update(AnActionEvent e) {
super.update(e);
Presentation presentation = e.getPresentation();
if (!presentation.isEnabled()) {
return;
}
presentation.setEnabled(e.getProject() != null);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class GenerateAntBuildAction method update.
@Override
public void update(AnActionEvent e) {
Presentation presentation = e.getPresentation();
presentation.setEnabled(e.getProject() != null);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class SplitterActionBase method update.
public void update(final AnActionEvent event) {
final Project project = event.getProject();
final Presentation presentation = event.getPresentation();
boolean inContextMenu = ActionPlaces.isPopupPlace(event.getPlace());
boolean enabled = project != null && isActionEnabled(project, inContextMenu);
if (inContextMenu) {
presentation.setVisible(enabled);
} else {
presentation.setEnabled(enabled);
}
}
Aggregations