本文整理匯總了Java中com.intellij.execution.testframework.export.ExportTestResultsAction類的典型用法代碼示例。如果您正苦於以下問題:Java ExportTestResultsAction類的具體用法?Java ExportTestResultsAction怎麽用?Java ExportTestResultsAction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ExportTestResultsAction類屬於com.intellij.execution.testframework.export包,在下文中一共展示了ExportTestResultsAction類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ToolbarPanel
import com.intellij.execution.testframework.export.ExportTestResultsAction; //導入依賴的package包/類
public ToolbarPanel(final TestConsoleProperties properties,
ExecutionEnvironment environment, JComponent parent) {
super(new BorderLayout());
final DefaultActionGroup actionGroup = new DefaultActionGroup(null, false);
actionGroup.addAction(new ToggleBooleanProperty(ExecutionBundle.message("junit.run.hide.passed.action.name"),
ExecutionBundle.message("junit.run.hide.passed.action.description"),
AllIcons.RunConfigurations.HidePassed,
properties, TestConsoleProperties.HIDE_PASSED_TESTS));
actionGroup.addSeparator();
actionGroup.addAction(new ToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.track.test.action.name"),
ExecutionBundle.message("junit.runing.info.track.test.action.description"),
AllIcons.RunConfigurations.TrackTests,
properties, TestConsoleProperties.TRACK_RUNNING_TEST)).setAsSecondary(true);
actionGroup.addAction(new ToggleBooleanProperty("Hide Ignored", null, null, properties, TestConsoleProperties.HIDE_IGNORED_TEST)).setAsSecondary(true);
actionGroup.addAction(new ToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.sort.alphabetically.action.name"),
ExecutionBundle.message("junit.runing.info.sort.alphabetically.action.description"),
AllIcons.ObjectBrowser.Sorted,
properties, TestConsoleProperties.SORT_ALPHABETICALLY));
actionGroup.addSeparator();
AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, parent);
action.getTemplatePresentation().setDescription(ExecutionBundle.message("junit.runing.info.expand.test.action.name"));
actionGroup.add(action);
action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, parent);
action.getTemplatePresentation().setDescription(ExecutionBundle.message("junit.runing.info.collapse.test.action.name"));
actionGroup.add(action);
actionGroup.addSeparator();
final CommonActionsManager actionsManager = CommonActionsManager.getInstance();
myOccurenceNavigator = new FailedTestsNavigator();
actionGroup.add(actionsManager.createPrevOccurenceAction(myOccurenceNavigator));
actionGroup.add(actionsManager.createNextOccurenceAction(myOccurenceNavigator));
actionGroup.addAction(new ToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.select.first.failed.action.name"),
null,
AllIcons.RunConfigurations.SelectFirstDefect,
properties, TestConsoleProperties.SELECT_FIRST_DEFECT)).setAsSecondary(true);
actionGroup.addAction(new ToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.scroll.to.stacktrace.action.name"),
ExecutionBundle.message("junit.runing.info.scroll.to.stacktrace.action.description"),
AllIcons.RunConfigurations.ScrollToStackTrace,
properties, TestConsoleProperties.SCROLL_TO_STACK_TRACE)).setAsSecondary(true);
myScrollToSource = new ScrollToTestSourceAction(properties);
actionGroup.addAction(myScrollToSource).setAsSecondary(true);
actionGroup.addAction(new ToggleBooleanProperty(ExecutionBundle.message("junit.runing.info.open.source.at.exception.action.name"),
ExecutionBundle
.message("junit.runing.info.open.source.at.exception.action.description"),
AllIcons.RunConfigurations.SourceAtException,
properties, TestConsoleProperties.OPEN_FAILURE_LINE)).setAsSecondary(true);
actionGroup.addAction(new ShowStatisticsAction(properties)).setAsSecondary(true);
for (ToggleModelActionProvider actionProvider : Extensions.getExtensions(ToggleModelActionProvider.EP_NAME)) {
final ToggleModelAction toggleModelAction = actionProvider.createToggleModelAction(properties);
myActions.add(toggleModelAction);
actionGroup.add(toggleModelAction);
}
myExportAction = ExportTestResultsAction.create(properties.getExecutor().getToolWindowId(), properties.getConfiguration());
actionGroup.addAction(myExportAction);
appendAdditionalActions(actionGroup, properties, environment, parent);
add(ActionManager.getInstance().
createActionToolbar(ActionPlaces.TESTTREE_VIEW_TOOLBAR, actionGroup, true).
getComponent(), BorderLayout.CENTER);
}