use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class RunAction method update.
public void update(AnActionEvent event) {
Presentation presentation = event.getPresentation();
presentation.setEnabled(myAntBuildMessageView.isStopped());
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class BrowseCvsRepositoryAction method update.
@Override
public void update(AnActionEvent e) {
final Presentation presentation = e.getPresentation();
final boolean projectExists = e.getData(CommonDataKeys.PROJECT) != null;
presentation.setVisible(projectExists);
presentation.setEnabled(projectExists);
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class CvsGlobalAction method update.
public void update(AnActionEvent e) {
final CvsContext cvsContext = CvsContextWrapper.createInstance(e);
final Presentation presentation = e.getPresentation();
if (cvsContext.cvsIsActive()) {
presentation.setVisible(true);
presentation.setEnabled(true);
} else {
presentation.setVisible(false);
presentation.setEnabled(false);
}
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class AbstractAction method adjustName.
protected static void adjustName(boolean showDialogOptions, AnActionEvent e) {
boolean actualShow = showDialogOptions || shiftPressed(e);
Presentation presentation = e.getPresentation();
String itemText = e.getPresentation().getTextWithMnemonic();
if (itemText == null)
return;
if (itemText.endsWith("...")) {
if (actualShow)
return;
presentation.setText(itemText.substring(0, itemText.length() - 3));
} else {
if (!actualShow)
return;
presentation.setText(itemText + "...");
}
}
use of com.intellij.openapi.actionSystem.Presentation in project intellij-community by JetBrains.
the class DiffWalkerAction method update.
public void update(AnActionEvent event) {
FocusDiffSide side = DiffUtil.getFocusDiffSide(event.getDataContext());
Presentation presentation = event.getPresentation();
if (side == null) {
presentation.setEnabled(false);
} else {
presentation.setEnabled(getLineNumberToGo(side) >= 0 || event.getInputEvent() instanceof KeyEvent);
}
}
Aggregations