当前位置: 首页>>代码示例>>Java>>正文


Java ExportToHTMLDialog类代码示例

本文整理汇总了Java中com.intellij.codeInspection.export.ExportToHTMLDialog的典型用法代码示例。如果您正苦于以下问题:Java ExportToHTMLDialog类的具体用法?Java ExportToHTMLDialog怎么用?Java ExportToHTMLDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExportToHTMLDialog类属于com.intellij.codeInspection.export包,在下文中一共展示了ExportToHTMLDialog类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createGenerateReportDialog

import com.intellij.codeInspection.export.ExportToHTMLDialog; //导入依赖的package包/类
@NotNull
public ExportToHTMLDialog createGenerateReportDialog(@NotNull final Project project,
                                                     @NotNull final DataContext dataContext,
                                                     @NotNull final CoverageSuitesBundle currentSuite) {
  final ExportToHTMLDialog dialog = new ExportToHTMLDialog(project, true);
  dialog.setTitle("Generate Coverage Report for: \'" + currentSuite.getPresentableName() + "\'");

  return dialog;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:CoverageEngine.java

示例2: createGenerateReportDialog

import com.intellij.codeInspection.export.ExportToHTMLDialog; //导入依赖的package包/类
@Nonnull
public ExportToHTMLDialog createGenerateReportDialog(@Nonnull final Project project,
                                                     @Nonnull final DataContext dataContext,
                                                     @Nonnull final CoverageSuitesBundle currentSuite) {
  final ExportToHTMLDialog dialog = new ExportToHTMLDialog(project, true);
  dialog.setTitle("Generate Coverage Report for: \'" + currentSuite.getPresentableName() + "\'");

  return dialog;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:CoverageEngine.java

示例3: exportHTML

import com.intellij.codeInspection.export.ExportToHTMLDialog; //导入依赖的package包/类
private void exportHTML(final boolean exportToHTML) {
  ExportToHTMLDialog exportToHTMLDialog = new ExportToHTMLDialog(myView.getProject(), exportToHTML);
  final ExportToHTMLSettings exportToHTMLSettings = ExportToHTMLSettings.getInstance(myView.getProject());
  if (exportToHTMLSettings.OUTPUT_DIRECTORY == null) {
    exportToHTMLSettings.OUTPUT_DIRECTORY = PathManager.getHomePath() + File.separator + "inspections";
  }
  exportToHTMLDialog.reset();
  if (!exportToHTMLDialog.showAndGet()) {
    return;
  }
  exportToHTMLDialog.apply();

  final String outputDirectoryName = exportToHTMLSettings.OUTPUT_DIRECTORY;
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    @Override
    public void run() {
      final Runnable exportRunnable = new Runnable() {
        @Override
        public void run() {
          ApplicationManager.getApplication().runReadAction(new Runnable() {
            @Override
            public void run() {
              if (!exportToHTML) {
                dupm2XML(outputDirectoryName);
              }
              else {
                final HTMLExportFrameMaker maker = new HTMLExportFrameMaker(outputDirectoryName, myView.getProject());
                maker.start();
                try {
                  final InspectionTreeNode root = myView.getTree().getRoot();
                  TreeUtil.traverse(root, new TreeUtil.Traverse() {
                    @Override
                    public boolean accept(final Object node) {
                      if (node instanceof InspectionNode) {
                        exportHTML(maker, (InspectionNode)node);
                      }
                      return true;
                    }
                  });
                }
                catch (ProcessCanceledException e) {
                  // Do nothing here.
                }

                maker.done();
              }
            }
          });
        }
      };

      if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(exportRunnable,
                                                                             exportToHTML ? InspectionsBundle
                                                                               .message("inspection.generating.html.progress.title")
                                                                                          : InspectionsBundle
                                                                               .message("inspection.generating.xml.progress.title"), true,
                                                                             myView.getProject())) {
        return;
      }

      if (exportToHTML && exportToHTMLSettings.OPEN_IN_BROWSER) {
        BrowserUtil.browse(new File(exportToHTMLSettings.OUTPUT_DIRECTORY, "index.html"));
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:67,代码来源:ExportHTMLAction.java

示例4: exportHTML

import com.intellij.codeInspection.export.ExportToHTMLDialog; //导入依赖的package包/类
private void exportHTML(final boolean exportToHTML) {
  ExportToHTMLDialog exportToHTMLDialog = new ExportToHTMLDialog(myView.getProject(), exportToHTML);
  final ExportToHTMLSettings exportToHTMLSettings = ExportToHTMLSettings.getInstance(myView.getProject());
  if (exportToHTMLSettings.OUTPUT_DIRECTORY == null) {
    exportToHTMLSettings.OUTPUT_DIRECTORY = PathManager.getHomePath() + File.separator + "inspections";
  }
  exportToHTMLDialog.reset();
  exportToHTMLDialog.show();
  if (!exportToHTMLDialog.isOK()) {
    return;
  }
  exportToHTMLDialog.apply();

  final String outputDirectoryName = exportToHTMLSettings.OUTPUT_DIRECTORY;
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    @Override
    public void run() {
      final Runnable exportRunnable = new Runnable() {
        @Override
        public void run() {
          if (!exportToHTML) {
            dupm2XML(outputDirectoryName);
          } else {
            final HTMLExportFrameMaker maker = new HTMLExportFrameMaker(outputDirectoryName, myView.getProject());
            maker.start();
            try {
              final InspectionTreeNode root = myView.getTree().getRoot();
              TreeUtil.traverse(root, new TreeUtil.Traverse() {
                @Override
                public boolean accept(final Object node) {
                  if (node instanceof InspectionNode) {
                    exportHTML(maker, (InspectionNode)node);
                  }
                  return true;
                }
              });
            }
            catch (ProcessCanceledException e) {
              // Do nothing here.
            }

            maker.done();
          }
        }
      };

      if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(exportRunnable,
          exportToHTML ? InspectionsBundle.message("inspection.generating.html.progress.title")
          : InspectionsBundle.message("inspection.generating.xml.progress.title"), true, myView.getProject())) {
        return;
      }

      if (exportToHTML && exportToHTMLSettings.OPEN_IN_BROWSER) {
        BrowserUtil.browse(new File(exportToHTMLSettings.OUTPUT_DIRECTORY, "index.html"));
      }
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:59,代码来源:ExportHTMLAction.java

示例5: exportHTML

import com.intellij.codeInspection.export.ExportToHTMLDialog; //导入依赖的package包/类
private void exportHTML(final boolean exportToHTML) {
  ExportToHTMLDialog exportToHTMLDialog = new ExportToHTMLDialog(myView.getProject(), exportToHTML);
  final ExportToHTMLSettings exportToHTMLSettings = ExportToHTMLSettings.getInstance(myView.getProject());
  if (exportToHTMLSettings.OUTPUT_DIRECTORY == null) {
    exportToHTMLSettings.OUTPUT_DIRECTORY = PathManager.getHomePath() + File.separator + "inspections";
  }
  exportToHTMLDialog.reset();
  exportToHTMLDialog.show();
  if (!exportToHTMLDialog.isOK()) {
    return;
  }
  exportToHTMLDialog.apply();

  final String outputDirectoryName = exportToHTMLSettings.OUTPUT_DIRECTORY;
  ApplicationManager.getApplication().invokeLater(new Runnable() {
    @Override
    public void run() {
      final Runnable exportRunnable = new Runnable() {
        @Override
        public void run() {
          if (!exportToHTML) {
            dupm2XML(outputDirectoryName);
          } else {
            final HTMLExportFrameMaker maker = new HTMLExportFrameMaker(outputDirectoryName, myView.getProject());
            maker.start();
            try {
              final InspectionTreeNode root = myView.getTree().getRoot();
              TreeUtil.traverse(root, new TreeUtil.Traverse() {
                @Override
                public boolean accept(final Object node) {
                  if (node instanceof InspectionNode) {
                    ApplicationManager.getApplication().runReadAction(new Runnable() {
                      @Override
                      public void run() {
                        exportHTML(maker, (InspectionNode)node);
                      }
                    });
                  }
                  return true;
                }
              });
            }
            catch (ProcessCanceledException e) {
              // Do nothing here.
            }

            maker.done();
          }
        }
      };

      if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(exportRunnable,
                                                                             exportToHTML ? InspectionsBundle.message("inspection.generating.html.progress.title")
                                                                                          : InspectionsBundle.message("inspection.generating.xml.progress.title"), true, myView.getProject())) {
        return;
      }

      if (exportToHTML && exportToHTMLSettings.OPEN_IN_BROWSER) {
        BrowserUtil.browse(new File(exportToHTMLSettings.OUTPUT_DIRECTORY, "index.html"));
      }
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:64,代码来源:ExportHTMLAction.java


注:本文中的com.intellij.codeInspection.export.ExportToHTMLDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。