本文整理汇总了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;
}
示例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;
}
示例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"));
}
}
});
}
示例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"));
}
}
});
}
示例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"));
}
}
});
}