Examples of DialogBuilder


Examples of com.intellij.openapi.ui.DialogBuilder

    public void setAllowingVersions(final boolean pAllowingVersions) {
        allowingVersions = pAllowingVersions;
    }

    public RepoPathElement[] show(final Project pProject) {
        final DialogBuilder builder = new DialogBuilder(pProject);
        final RepositoryBrowser browser = new DialogRepoBrowser(pProject, builder);

        builder.addOkAction();
        builder.addCancelAction();
        builder.setCenterPanel(browser);
        builder.setTitle(title == null || title.trim().length() == 0 ? "Browse Repository" : title);
        builder.setOkActionEnabled(false);

        final int exitCode = builder.show();
        if (exitCode == DialogWrapper.OK_EXIT_CODE)
            return browser.getSelectedItems();
        else
            return null;
    }
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

  public void actionPerformed(AnActionEvent event) {
    Editor editor = event.getData(PlatformDataKeys.EDITOR);
    Project project = event.getData(PlatformDataKeys.PROJECT);

    DialogBuilder dialogBuilder = new DialogBuilder(project);
    dialogBuilder.setTitle("Formatting Block structure");

    final String text = editor != null ? editor.getDocument().getText() : "";
    final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(project).getCurrentSettings();
    MathematicaFormattingModelBuilder modelBuilder = new MathematicaFormattingModelBuilder();
    final PsiFile file = PsiFileFactory.getInstance(project).createFileFromText("a.m", MathematicaLanguage.INSTANCE, text);
    final FormattingModel model = modelBuilder.createModel(file.getNode().getPsi(), settings);
    final Block rootBlock = model.getRootBlock();
    final String blockText = printBlock((AbstractBlock) rootBlock, text);

    JTextArea textArea = new JTextArea(blockText);
    final JScrollPane pane = new JScrollPane(textArea);
    dialogBuilder.setCenterPanel(pane);
    dialogBuilder.show();
  }
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

    boolean exportBoth = exportXml && preferences.getBooleanProperty(FindBugsPreferences.EXPORT_AS_HTML, true);

    if (exportDir.isEmpty() || !exportXml && !exportBoth && !exportHtml) {

      //Ask the user for a export directory
      final DialogBuilder dialogBuilder = new DialogBuilder(project);
      dialogBuilder.addOkAction();
      dialogBuilder.addCancelAction();
      dialogBuilder.setTitle("Select directory to save the exported file");
      final ExportFileDialog exportDialog = new ExportFileDialog(exportDir, dialogBuilder);
      dialogBuilder.showModal(true);
      if (dialogBuilder.getDialogWrapper().getExitCode() == DialogWrapper.CANCEL_EXIT_CODE) {
        return;
      }
      final String path = exportDialog.getText();
      if (path == null || path.trim().isEmpty()) {
        return;
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

    public void hyperlinkUpdate(final HyperlinkEvent e) {
      if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
        final String desc = e.getDescription();
        if (desc.equals(A_HREF_MORE_ANCHOR)) {
          final int bugCount = _toolWindowPanel.getBugTreePanel().getGroupModel().getBugCount();
          final DialogBuilder dialog = AnalysisRunDetailsDialog.create(_toolWindowPanel.getProject(), bugCount, _toolWindowPanel.getBugCollection().getProjectStats(), _bugsProject);
          dialog.showModal(false);
        }
      }
    }
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

      Messages.showWarningDialog("Project not loaded.", "FindBugs");
      return;
    }

    //Ask the user for a export directory
    final DialogBuilder dialogBuilder = new DialogBuilder(project);
    dialogBuilder.addOkAction();
    dialogBuilder.addCancelAction();
    dialogBuilder.setTitle("Import previous saved bug collection xml");

    final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
    final String exportDir = preferences.getProperty(FindBugsPreferences.EXPORT_BASE_DIR, FindBugsPluginConstants.DEFAULT_EXPORT_DIR) + File.separatorChar + project.getName();

    final ImportFileDialog importFileDialog = new ImportFileDialog(exportDir, dialogBuilder);
    dialogBuilder.showModal(true);
    if (dialogBuilder.getDialogWrapper().getExitCode() == DialogWrapper.CANCEL_EXIT_CODE) {
      return;
    }
    final String fileToImport = importFileDialog.getText();
    if (fileToImport == null || fileToImport.trim().isEmpty()) {
      return;
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

          if (mouseX <= width + 10 && mouseX >= width - 40) {
            final ToolWindow toolWindow = ToolWindowManager.getInstance(_project).getToolWindow(IdeaUtilImpl.getPluginComponent(_project).getInternalToolWindowId());
            final Content content = toolWindow.getContentManager().getContent(0);
            if (content != null) {
              final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
              final DialogBuilder dialog = AnalysisRunDetailsDialog.create(panel.getProject(), panel.getBugTreePanel().getGroupModel().getBugCount(), panel.getBugCollection().getProjectStats(), panel.getBugsProject());
              dialog.showModal(false);
            }
          }
        }
        return;
      }
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

    html.append("</ul>");

    html.append("</html></body>");


    final DialogBuilder dialogBuilder = new DialogBuilder(project);
    dialogBuilder.addCloseButton();
    dialogBuilder.setTitle("FindBugs analysis settings");
    final JComponent panel = new JPanel(new BorderLayout());
    panel.setBorder(new EmptyBorder(10, 10, 10, 10));

    final HTMLEditorKit htmlEditorKit = new HTMLEditorKit();
    htmlEditorKit.setStyleSheet(GuiResources.EDITORPANE_STYLESHEET);
    final JEditorPane jEditorPane = new JEditorPane() {

      @Override
      protected void paintComponent(final Graphics g) {
        super.paintComponent(g);
        final Graphics2D g2d = (Graphics2D) g;
        g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
        g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
      }

    };
    jEditorPane.setPreferredSize(new Dimension(550, 650));
    jEditorPane.setEditable(false);
    jEditorPane.setContentType("text/html");
    jEditorPane.setEditorKit(htmlEditorKit);


    jEditorPane.setText(html.toString());

    panel.add(ScrollPaneFacade.createScrollPane(jEditorPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED));
    panel.setBorder(BorderFactory.createTitledBorder("FindBugs analysis run configuration"));
    dialogBuilder.setCenterPanel(panel);

    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        jEditorPane.scrollRectToVisible(new Rectangle(0, 0));
      }
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

                serverList.updateUI();
            }
        }

        private boolean userAgreesThatItIsNotNginx() {
            final DialogBuilder builder = new DialogBuilder(serverList);

            JLabel label = new JLabel(NginxBundle.message("run.notnginx"), IconLoader.getIcon("/net/ishchenko/idea/nginx/notnginx.png"), SwingConstants.LEFT);
            label.setUI(new MultiLineLabelUI());

            builder.setTitle(NginxBundle.message("run.notnginx.warning"));
            builder.setCenterPanel(label);

            return builder.show() == DialogWrapper.OK_EXIT_CODE;
        }
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

            return builder.show() == DialogWrapper.OK_EXIT_CODE;
        }

        private boolean userAgreesToRunExecutable() {

            final DialogBuilder builder = new DialogBuilder(serverList);

            JLabel label = new JLabel(NginxBundle.message("run.doyouwanttorun"));
            builder.setTitle(NginxBundle.message("run.notnginx.warning"));
            builder.setCenterPanel(label);

            return builder.show() == DialogWrapper.OK_EXIT_CODE;

        }
View Full Code Here

Examples of com.intellij.openapi.ui.DialogBuilder

            this();
            this.options = options;
        }
        @Override
        public void actionPerformed(ActionEvent e) {
            DialogBuilder dialogBuilder = new DialogBuilder((Component)e.getSource());
            dialogBuilder.setTitle("Pegdown Rendering Options");
            dialogBuilder.addOkAction();
            dialogBuilder.addCancelAction();
            RenderingOptionsForm form = new RenderingOptionsForm(options.renderingOptions);
            dialogBuilder.setCenterPanel(form.getComponent());
            int exitCode = dialogBuilder.show();
            if ( exitCode == DialogWrapper.OK_EXIT_CODE ) {
                options.renderingOptions = form.get();
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.