コード例 #1
0
 public static void showPopup(AnActionEvent e, JBPopup popup) {
   final InputEvent event = e.getInputEvent();
   if (event instanceof MouseEvent) {
     popup.showUnderneathOf(event.getComponent());
   } else {
     popup.showInBestPositionFor(e.getDataContext());
   }
 }
コード例 #2
0
 @Override
 public void update(AnActionEvent e) {
   e.getPresentation().setEnabled(myScope.isValid());
 }
コード例 #3
0
 @Override
 public void update(AnActionEvent e) {
   super.update(e);
   final Presentation presentation = e.getPresentation();
   presentation.setEnabled(allTargetsAreValid());
 }
コード例 #4
0
 @Override
 public void update(AnActionEvent e) {
   super.update(e);
   e.getPresentation().setVisible(myContent != null);
 }