Java 类com.intellij.psi.codeStyle.arrangement.std.CompositeArrangementSettingsToken 实例源码

项目:intellij-ce-playground    文件:ArrangementGroupingRulesControl.java   
public ArrangementGroupingRulesControl(@NotNull ArrangementStandardSettingsManager settingsManager,
                                       @NotNull ArrangementColorsProvider colorsProvider)
{
  super(new DefaultTableModel(0, 1));
  mySettingsManager = settingsManager;
  setDefaultRenderer(Object.class, new MyRenderer());
  getColumnModel().getColumn(0).setCellEditor(new MyEditor());
  setShowColumns(false);
  setShowGrid(false);
  setBorder(IdeBorderFactory.createBorder());
  setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  List<CompositeArrangementSettingsToken> groupingTokens = settingsManager.getSupportedGroupingTokens();
  if (groupingTokens != null) {
    for (CompositeArrangementSettingsToken token : groupingTokens) {
      ArrangementGroupingComponent component = new ArrangementGroupingComponent(token, colorsProvider, settingsManager);
      myComponents.put(token.getToken(), component);
      getModel().addRow(new Object[]{component});
    }
  }
}
项目:tools-idea    文件:ArrangementGroupingRulesControl.java   
public ArrangementGroupingRulesControl(@NotNull ArrangementStandardSettingsManager settingsManager,
                                       @NotNull ArrangementColorsProvider colorsProvider)
{
  super(new DefaultTableModel(0, 1));
  mySettingsManager = settingsManager;
  setDefaultRenderer(Object.class, new MyRenderer());
  getColumnModel().getColumn(0).setCellEditor(new MyEditor());
  setShowColumns(false);
  setShowGrid(false);
  setBorder(IdeBorderFactory.createBorder());
  setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  List<CompositeArrangementSettingsToken> groupingTokens = settingsManager.getSupportedGroupingTokens();
  if (groupingTokens != null) {
    for (CompositeArrangementSettingsToken token : groupingTokens) {
      ArrangementGroupingComponent component = new ArrangementGroupingComponent(token, colorsProvider, settingsManager);
      myComponents.put(token.getToken(), component);
      getModel().addRow(new Object[]{component});
    }
  }
}
项目:consulo    文件:ArrangementGroupingRulesControl.java   
public ArrangementGroupingRulesControl(@Nonnull ArrangementStandardSettingsManager settingsManager,
                                       @Nonnull ArrangementColorsProvider colorsProvider)
{
  super(new DefaultTableModel(0, 1));
  mySettingsManager = settingsManager;
  setDefaultRenderer(Object.class, new MyRenderer());
  getColumnModel().getColumn(0).setCellEditor(new MyEditor());
  setShowColumns(false);
  setShowGrid(false);
  setBorder(IdeBorderFactory.createBorder());
  setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  List<CompositeArrangementSettingsToken> groupingTokens = settingsManager.getSupportedGroupingTokens();
  if (groupingTokens != null) {
    for (CompositeArrangementSettingsToken token : groupingTokens) {
      ArrangementGroupingComponent component = new ArrangementGroupingComponent(token, colorsProvider, settingsManager);
      myComponents.put(token.getToken(), component);
      getModel().addRow(new Object[]{component});
    }
  }
}
项目:intellij-ce-playground    文件:ArrangementSectionRuleManager.java   
private ArrangementSectionRuleManager(@NotNull Language language,
                                      @NotNull ArrangementStandardSettingsManager settingsManager,
                                      @NotNull ArrangementColorsProvider colorsProvider,
                                      @NotNull ArrangementSectionRulesControl control) {
  myCommenter = LanguageCommenters.INSTANCE.forLanguage(language);
  myControl = control;
  final List<CompositeArrangementSettingsToken> tokens = ContainerUtil.newArrayList();
  tokens.add(new CompositeArrangementSettingsToken(TYPE, ContainerUtil.newArrayList(START_SECTION, END_SECTION)));
  tokens.add(new CompositeArrangementSettingsToken(TEXT));
  myEditor = new ArrangementMatchingRuleEditor(settingsManager, tokens, colorsProvider, control);
}
项目:consulo    文件:ArrangementSectionRuleManager.java   
private ArrangementSectionRuleManager(@Nonnull Language language,
                                      @Nonnull ArrangementStandardSettingsManager settingsManager,
                                      @Nonnull ArrangementColorsProvider colorsProvider,
                                      @Nonnull ArrangementMatchingRulesControl control) {
  myCommenter = LanguageCommenters.INSTANCE.forLanguage(language);
  myControl = control;
  final List<CompositeArrangementSettingsToken> tokens = ContainerUtil.newArrayList();
  tokens.add(new CompositeArrangementSettingsToken(TYPE, ContainerUtil.newArrayList(START_SECTION, END_SECTION)));
  tokens.add(new CompositeArrangementSettingsToken(TEXT));
  myEditor = new ArrangementMatchingRuleEditor(settingsManager, tokens, colorsProvider, control);
}
项目:consulo-xml    文件:XmlRearranger.java   
@Nullable
@Override
public List<CompositeArrangementSettingsToken> getSupportedMatchingTokens()
{
    return ContainerUtilRt.newArrayList(new CompositeArrangementSettingsToken(TYPE, SUPPORTED_TYPES),
            new CompositeArrangementSettingsToken(StdArrangementTokens.Regexp.NAME), new CompositeArrangementSettingsToken(StdArrangementTokens
            .Regexp.XML_NAMESPACE), new CompositeArrangementSettingsToken(ORDER, KEEP, BY_NAME));
}
项目:consulo-java    文件:JavaRearranger.java   
@Nullable
@Override
public List<CompositeArrangementSettingsToken> getSupportedGroupingTokens()
{
    return ContainerUtilRt.newArrayList(new CompositeArrangementSettingsToken(GETTERS_AND_SETTERS),
            new CompositeArrangementSettingsToken(OVERRIDDEN_METHODS, BY_NAME, KEEP), new CompositeArrangementSettingsToken(DEPENDENT_METHODS,
            BREADTH_FIRST, DEPTH_FIRST));
}
项目:consulo-java    文件:JavaRearranger.java   
@Nullable
@Override
public List<CompositeArrangementSettingsToken> getSupportedMatchingTokens()
{
    return ContainerUtilRt.newArrayList(new CompositeArrangementSettingsToken(TYPE, SUPPORTED_TYPES),
            new CompositeArrangementSettingsToken(MODIFIER, SUPPORTED_MODIFIERS), new CompositeArrangementSettingsToken(StdArrangementTokens
            .Regexp.NAME), new CompositeArrangementSettingsToken(ORDER, KEEP, BY_NAME));
}
项目:tools-idea    文件:ArrangementStandardSettingsManager.java   
private void buildWeights(@NotNull Collection<CompositeArrangementSettingsToken> compositeTokens) {
  for (CompositeArrangementSettingsToken token : compositeTokens) {
    myWeights.put(token.getToken(), myWeights.size());
    buildWeights(token.getChildren());
  }
}
项目:tools-idea    文件:ArrangementStandardSettingsManager.java   
/**
 * @see ArrangementStandardSettingsAware#getSupportedGroupingTokens()
 */
@Nullable
public List<CompositeArrangementSettingsToken> getSupportedGroupingTokens() {
  return myGroupingTokens;
}
项目:tools-idea    文件:ArrangementStandardSettingsManager.java   
/**
 * @see ArrangementStandardSettingsAware#getSupportedMatchingTokens()
 */
@Nullable
public List<CompositeArrangementSettingsToken> getSupportedMatchingTokens() {
  return myMatchingTokens;
}
项目:consulo-xml    文件:XmlRearranger.java   
@Nullable
@Override
public List<CompositeArrangementSettingsToken> getSupportedGroupingTokens()
{
    return null;
}