Package com.intellij.openapi.ui.popup

Examples of com.intellij.openapi.ui.popup.JBPopupFactory


  }


  protected void showCloudChooser(final List<CloudPlugin> plugins, final List<String> descriptions) {
    final JBPopupFactory factory = JBPopupFactory.getInstance();
    final ListPopup popup = factory.createListPopup(new BaseListPopupStep<String>("Store comments in:", descriptions) {
      @Override
      public PopupStep<?> onChosen(final String selectedValue, final boolean finalChoice) {
        if (selectedValue != null) {
          final int index = descriptions.indexOf(selectedValue);
          if (index == -1) {
View Full Code Here


        final GroupBugIntentionListPopupStep intentionActionGroup = new GroupBugIntentionListPopupStep(_psiElement, intentionActions);
        intentionGroups.add(intentionActionGroup);
      }

      final JBPopupFactory factory = JBPopupFactory.getInstance();
      /*return factory.createListPopup(new BaseListPopupStep<SuppressIntentionAction>(FindBugsPluginConstants.PLUGIN_NAME, intentionActions) {
        @Override
        public PopupStep<?> onChosen(final SuppressIntentionAction selectedValue, final boolean finalChoice) {
          final Project project = _psiElement.getProject();
          final Editor editor = FileEditorManager.getInstance(project).getSelectedTextEditor();
          ApplicationManager.getApplication().runWriteAction(new Runnable() {
            public void run() {
              selectedValue.invoke(project, editor, _psiElement);   
            }
          });
          return super.onChosen(selectedValue, finalChoice);
        }
      });*/
      return factory.createListPopup(new RootGroupBugIntentionListPopupStep(intentionGroups));
    }
View Full Code Here

    pairSortedSet.addAll(getStepDefinitionContainers(featureFile));
    final List<Pair<PsiFile, BDDFrameworkType>> pairs = ContainerUtil.newArrayList(pairSortedSet);
    if (!pairs.isEmpty()) {
      pairs.add(0, null);

      final JBPopupFactory popupFactory = JBPopupFactory.getInstance();
      final ListPopup popupStep =
        popupFactory.createListPopup(new BaseListPopupStep<Pair<PsiFile, BDDFrameworkType>>(
          CucumberBundle.message("choose.step.definition.file"), ContainerUtil.newArrayList(pairs)) {
          @Override
          public boolean isSpeedSearchEnabled() {
            return true;
          }
View Full Code Here

        }

        if (pathsToImport.size() == 1) {
            addImport(file, editor, pathsToImport.get(0));
        } else {
            JBPopupFactory popup = JBPopupFactory.getInstance();
            popup.createListPopup(new ChoosePackagePopupStep()).showInBestPositionFor(editor);
        }
        return true;
    }
View Full Code Here

      myActionGroup = actionGroup;
      registerCustomShortcutSet(actionGroup.getShortcutSet(), myTree);
    }

    public void actionPerformed(AnActionEvent e) {
      final JBPopupFactory popupFactory = JBPopupFactory.getInstance();
      final ListPopupStep step = popupFactory.createActionsStep(myActionGroup, e.getDataContext(), false, false,
                                                                myActionGroup.getTemplatePresentation().getText(), myTree, true,
                                                                myPreselection != null ? myPreselection.getDefaultIndex() : 0, true);
      final ListPopup listPopup = popupFactory.createListPopup(step);
      listPopup.setHandleAutoSelectionBeforeShow(true);
      listPopup.showUnderneathOf(myNorthPanel);
    }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.ui.popup.JBPopupFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.