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


Java IgnoredSettingsAction类代码示例

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


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

示例1: createChangeViewComponent

import com.intellij.openapi.vcs.changes.actions.IgnoredSettingsAction; //导入依赖的package包/类
private JComponent createChangeViewComponent() {
  SimpleToolWindowPanel panel = new SimpleToolWindowPanel(false, true);

  DefaultActionGroup group = (DefaultActionGroup) ActionManager.getInstance().getAction("ChangesViewToolbar");

  EmptyAction.registerWithShortcutSet("ChangesView.Refresh", CommonShortcuts.getRerun(), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.NewChangeList", CommonShortcuts.getNew(), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.RemoveChangeList", CommonShortcuts.getDelete(), panel);
  EmptyAction.registerWithShortcutSet(IdeActions.MOVE_TO_ANOTHER_CHANGE_LIST, CommonShortcuts.getMove(), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.Rename",CommonShortcuts.getRename() , panel);
  EmptyAction.registerWithShortcutSet("ChangesView.SetDefault", new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.ALT_DOWN_MASK | ctrlMask())), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.Diff", CommonShortcuts.getDiff(), panel);

  JPanel toolbarPanel = new JPanel(new BorderLayout());
  ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.CHANGES_VIEW_TOOLBAR, group, false);
  toolbar.setTargetComponent(myView);
  JComponent toolbarComponent = toolbar.getComponent();
  toolbarPanel.add(toolbarComponent, BorderLayout.WEST);

  DefaultActionGroup visualActionsGroup = new DefaultActionGroup();
  final Expander expander = new Expander();
  visualActionsGroup.add(CommonActionsManager.getInstance().createExpandAllAction(expander, panel));
  visualActionsGroup.add(CommonActionsManager.getInstance().createCollapseAllAction(expander, panel));

  ToggleShowFlattenAction showFlattenAction = new ToggleShowFlattenAction();
  showFlattenAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_P, ctrlMask())), panel);
  visualActionsGroup.add(showFlattenAction);
  visualActionsGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY));
  visualActionsGroup.add(new ToggleShowIgnoredAction());
  visualActionsGroup.add(new IgnoredSettingsAction());
  myToggleDetailsAction = new ToggleDetailsAction();
  visualActionsGroup.add(myToggleDetailsAction);
  visualActionsGroup.add(new ContextHelpAction(ChangesListView.ourHelpId));
  toolbarPanel.add(
    ActionManager.getInstance().createActionToolbar(ActionPlaces.CHANGES_VIEW_TOOLBAR, visualActionsGroup, false).getComponent(), BorderLayout.CENTER);


  DefaultActionGroup menuGroup = (DefaultActionGroup) ActionManager.getInstance().getAction("ChangesViewPopupMenu");
  myView.setMenuActions(menuGroup);

  myView.setShowFlatten(SHOW_FLATTEN_MODE);

  myProgressLabel = new JPanel(new BorderLayout());

  panel.setToolbar(toolbarPanel);

  final JPanel content = new JPanel(new BorderLayout());
  String value = PropertiesComponent.getInstance().getValue(DETAILS_SPLITTER_PROPORTION);
  float f = 0.5f;
  if (! StringUtil.isEmptyOrSpaces(value)) {
    try {
      f = Float.parseFloat(value);
    } catch (NumberFormatException e) {
      //
    }
  }
  mySplitter = new Splitter(false, f);
  mySplitter.setHonorComponentsMinimumSize(false);
  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myView);
  final JPanel wrapper = new JPanel(new BorderLayout());
  wrapper.add(scrollPane, BorderLayout.CENTER);
  mySplitter.setFirstComponent(wrapper);
  content.add(mySplitter, BorderLayout.CENTER);
  content.add(myProgressLabel, BorderLayout.SOUTH);
  panel.setContent(content);

  myView.installDndSupport(ChangeListManagerImpl.getInstanceImpl(myProject));
  myView.addTreeSelectionListener(myTsl);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:71,代码来源:ChangesViewManager.java

示例2: createChangeViewComponent

import com.intellij.openapi.vcs.changes.actions.IgnoredSettingsAction; //导入依赖的package包/类
private JComponent createChangeViewComponent() {
  SimpleToolWindowPanel panel = new SimpleToolWindowPanel(false, true);

  DefaultActionGroup group = (DefaultActionGroup) ActionManager.getInstance().getAction("ChangesViewToolbar");

  ActionManager.getInstance().getAction("ChangesView.Refresh").registerCustomShortcutSet(CommonShortcuts.getRerun(), panel);
  ActionManager.getInstance().getAction("ChangesView.NewChangeList").registerCustomShortcutSet(CommonShortcuts.getNew(), panel);
  ActionManager.getInstance().getAction("ChangesView.RemoveChangeList").registerCustomShortcutSet(CommonShortcuts.DELETE, panel);
  ActionManager.getInstance().getAction(IdeActions.MOVE_TO_ANOTHER_CHANGE_LIST).registerCustomShortcutSet(CommonShortcuts.getMove(), panel);
  ActionManager.getInstance().getAction("ChangesView.Rename").registerCustomShortcutSet(CommonShortcuts.getRename(), panel);
  ActionManager.getInstance().getAction("ChangesView.SetDefault").registerCustomShortcutSet(
    new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.ALT_DOWN_MASK | ctrlMask())), panel);

  final CustomShortcutSet diffShortcut =
    new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_D, ctrlMask()));
  ActionManager.getInstance().getAction("ChangesView.Diff").registerCustomShortcutSet(diffShortcut, panel);

  JPanel toolbarPanel = new JPanel(new BorderLayout());
  ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.CHANGES_VIEW_TOOLBAR, group, false);
  toolbar.setTargetComponent(myView);
  JComponent toolbarComponent = toolbar.getComponent();
  toolbarPanel.add(toolbarComponent, BorderLayout.WEST);

  DefaultActionGroup visualActionsGroup = new DefaultActionGroup();
  final Expander expander = new Expander();
  visualActionsGroup.add(CommonActionsManager.getInstance().createExpandAllAction(expander, panel));
  visualActionsGroup.add(CommonActionsManager.getInstance().createCollapseAllAction(expander, panel));

  ToggleShowFlattenAction showFlattenAction = new ToggleShowFlattenAction();
  showFlattenAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_P,
                                                                                           ctrlMask())),
                                              panel);
  visualActionsGroup.add(showFlattenAction);
  visualActionsGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY));                                              
  visualActionsGroup.add(new ToggleShowIgnoredAction());
  visualActionsGroup.add(new IgnoredSettingsAction());
  myToggleDetailsAction = new ToggleDetailsAction();
  visualActionsGroup.add(myToggleDetailsAction);
  visualActionsGroup.add(new ContextHelpAction(ChangesListView.ourHelpId));
  toolbarPanel.add(
    ActionManager.getInstance().createActionToolbar(ActionPlaces.CHANGES_VIEW_TOOLBAR, visualActionsGroup, false).getComponent(), BorderLayout.CENTER);


  DefaultActionGroup menuGroup = (DefaultActionGroup) ActionManager.getInstance().getAction("ChangesViewPopupMenu");
  myView.setMenuActions(menuGroup);

  myView.setShowFlatten(SHOW_FLATTEN_MODE);

  myProgressLabel = new JPanel(new BorderLayout());

  panel.setToolbar(toolbarPanel);

  final JPanel content = new JPanel(new BorderLayout());
  String value = PropertiesComponent.getInstance().getValue(DETAILS_SPLITTER_PROPORTION);
  float f = 0.5f;
  if (! StringUtil.isEmptyOrSpaces(value)) {
    try {
      f = Float.parseFloat(value);
    } catch (NumberFormatException e) {
      //
    }
  }
  mySplitter = new Splitter(false, f);
  mySplitter.setHonorComponentsMinimumSize(false);
  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myView);
  final JPanel wrapper = new JPanel(new BorderLayout());
  wrapper.add(scrollPane, BorderLayout.CENTER);
  mySplitter.setFirstComponent(wrapper);
  content.add(mySplitter, BorderLayout.CENTER);
  content.add(myProgressLabel, BorderLayout.SOUTH);
  panel.setContent(content);

  myDiffDetails.getPanel();

  myView.installDndSupport(ChangeListManagerImpl.getInstanceImpl(myProject));
  myView.addTreeSelectionListener(myTsl);
  return panel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:79,代码来源:ChangesViewManager.java

示例3: createChangeViewComponent

import com.intellij.openapi.vcs.changes.actions.IgnoredSettingsAction; //导入依赖的package包/类
private JComponent createChangeViewComponent() {
  SimpleToolWindowPanel panel = new SimpleToolWindowPanel(false, true);

  EmptyAction.registerWithShortcutSet("ChangesView.Refresh", CommonShortcuts.getRerun(), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.NewChangeList", CommonShortcuts.getNew(), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.RemoveChangeList", CommonShortcuts.getDelete(), panel);
  EmptyAction.registerWithShortcutSet(IdeActions.MOVE_TO_ANOTHER_CHANGE_LIST, CommonShortcuts.getMove(), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.Rename", CommonShortcuts.getRename(), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.SetDefault",
                                      new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.ALT_DOWN_MASK | ctrlMask())), panel);
  EmptyAction.registerWithShortcutSet("ChangesView.Diff", CommonShortcuts.getDiff(), panel);

  DefaultActionGroup group = (DefaultActionGroup)ActionManager.getInstance().getAction("ChangesViewToolbar");
  ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.CHANGES_VIEW_TOOLBAR, group, false);
  toolbar.setTargetComponent(myView);
  JComponent toolbarComponent = toolbar.getComponent();
  JPanel toolbarPanel = new JPanel(new BorderLayout());
  toolbarPanel.add(toolbarComponent, BorderLayout.WEST);

  DefaultActionGroup visualActionsGroup = new DefaultActionGroup();
  final Expander expander = new Expander();
  visualActionsGroup.add(CommonActionsManager.getInstance().createExpandAllAction(expander, panel));
  visualActionsGroup.add(CommonActionsManager.getInstance().createCollapseAllAction(expander, panel));

  ToggleShowFlattenAction showFlattenAction = new ToggleShowFlattenAction();
  showFlattenAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_P, ctrlMask())), panel);
  visualActionsGroup.add(showFlattenAction);
  visualActionsGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_COPY));
  visualActionsGroup.add(new ToggleShowIgnoredAction());
  visualActionsGroup.add(new IgnoredSettingsAction());
  visualActionsGroup.add(new ToggleDetailsAction());
  visualActionsGroup.add(new ContextHelpAction(ChangesListView.HELP_ID));
  toolbarPanel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.CHANGES_VIEW_TOOLBAR, visualActionsGroup, false).getComponent(),
                   BorderLayout.CENTER);


  myView.setMenuActions((DefaultActionGroup)ActionManager.getInstance().getAction("ChangesViewPopupMenu"));

  myView.setShowFlatten(myState.myShowFlatten);

  myProgressLabel = new JPanel(new BorderLayout());

  panel.setToolbar(toolbarPanel);

  final JPanel content = new JPanel(new BorderLayout());
  mySplitter = new JBSplitter(false, "ChangesViewManager.DETAILS_SPLITTER_PROPORTION", 0.5f);
  mySplitter.setHonorComponentsMinimumSize(false);
  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myView);
  final JPanel wrapper = new JPanel(new BorderLayout());
  wrapper.add(scrollPane, BorderLayout.CENTER);
  mySplitter.setFirstComponent(wrapper);
  content.add(mySplitter, BorderLayout.CENTER);
  content.add(myProgressLabel, BorderLayout.SOUTH);
  panel.setContent(content);

  ChangesDnDSupport.install(myProject, myView);
  myView.addTreeSelectionListener(myTsl);
  return panel;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:60,代码来源:ChangesViewManager.java


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