Java 类com.intellij.util.config.ToggleBooleanProperty 实例源码

项目:tools-idea    文件:TestNGResults.java   
@Override
protected ToolbarPanel createToolbarPanel() {
  final ToolbarPanel panel = new ToolbarPanel(getProperties(), myEnvironment, this){
    @Override
    protected void appendAdditionalActions(DefaultActionGroup actionGroup,
                                           TestConsoleProperties properties,
                                           ExecutionEnvironment environment, JComponent parent) {
      super.appendAdditionalActions(actionGroup, properties, environment, parent);
      actionGroup.addAction(new ToggleBooleanProperty(
        ExecutionBundle.message("junit.runing.info.include.non.started.in.rerun.failed.action.name"),
                                                  null,
                                                  null,
                                                  properties, TestConsoleProperties.INCLUDE_NON_STARTED_IN_RERUN_FAILED)).setAsSecondary(true);
    }
  };
  panel.setModel(this);
  return panel;
}
项目:tools-idea    文件:JUnitToolbarPanel.java   
@Override
protected void appendAdditionalActions(DefaultActionGroup actionGroup,
                                       TestConsoleProperties properties,
                                       ExecutionEnvironment environment, JComponent parent) {
  super.appendAdditionalActions(actionGroup, properties, environment, parent);
  actionGroup.addAction(new ToggleBooleanProperty(
    ExecutionBundle.message("junit.runing.info.include.non.started.in.rerun.failed.action.name"),
    null,
    null,
    properties, TestConsoleProperties.INCLUDE_NON_STARTED_IN_RERUN_FAILED)).setAsSecondary(true);
}
项目:intellij-ce-playground    文件:TestConsoleProperties.java   
@NotNull
protected ToggleBooleanProperty createIncludeNonStartedInRerun(TestConsoleProperties target) {
  String text = ExecutionBundle.message("junit.runing.info.include.non.started.in.rerun.failed.action.name");
  return new ToggleBooleanProperty(text, null, null, target, INCLUDE_NON_STARTED_IN_RERUN_FAILED);
}
项目:intellij-ce-playground    文件:TestConsoleProperties.java   
@NotNull
protected ToggleBooleanProperty createHideSuccessfulConfig(TestConsoleProperties target) {
  String text = ExecutionBundle.message("junit.runing.info.hide.successful.config.action.name");
  setIfUndefined(HIDE_SUCCESSFUL_CONFIG, true);
  return new ToggleBooleanProperty(text, null, null, target, HIDE_SUCCESSFUL_CONFIG);
}
项目:tools-idea    文件:ToolbarPanel.java   
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);
}