Java 类com.intellij.psi.codeStyle.CustomCodeStyleSettings 实例源码

项目:intellij-ce-playground    文件:OptionTableWithPreviewPanel.java   
public Option(@Nullable Class<? extends CustomCodeStyleSettings> clazz,
              @NotNull String fieldName,
              @NotNull String title,
              @Nullable String groupName,
              @Nullable OptionAnchor anchor,
              @Nullable String anchorFiledName) {
  super(fieldName, anchor, anchorFiledName);
  this.clazz = clazz;
  this.title = title;
  this.groupName = groupName;

  try {
    Class styleSettingsClass = clazz == null ? CommonCodeStyleSettings.class : clazz;
    this.field = styleSettingsClass.getField(fieldName);
  }
  catch (NoSuchFieldException e) {
    throw new RuntimeException(e);
  }
}
项目:intellij-ce-playground    文件:OptionTableWithPreviewPanel.java   
public IntOption(Class<? extends CustomCodeStyleSettings> clazz,
                 @NotNull String fieldName,
                 @NotNull String title,
                 @Nullable String groupName, 
                 @Nullable OptionAnchor anchor, 
                 @Nullable String anchorFiledName,
                 int minValue,
                 int maxValue,
                 int defaultValue,
                 @Nullable String defaultValueText) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
  myMinValue = minValue;
  myMaxValue = maxValue;
  myDefaultValue = defaultValue;
  myDefaultValueText = defaultValueText;
}
项目:intellij-ce-playground    文件:CodeStyleBlankLinesPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (myIsFirstUpdate) {
    myCustomOptions.putValue(groupName, (Trinity)Trinity.create(settingsClass, fieldName, title));
  }

  for (IntOption option : myOptions) {
    if (option.myTarget.getName().equals(fieldName)) {
      option.myTextField.setEnabled(true);
    }
  }
}
项目:tools-idea    文件:OptionTableWithPreviewPanel.java   
public Option(Class<? extends CustomCodeStyleSettings> clazz,
              @NotNull String fieldName,
              @NotNull String title,
              @Nullable String groupName,
              @Nullable OptionAnchor anchor,
              @Nullable String anchorFiledName) {
  super(fieldName, anchor, anchorFiledName);
  this.clazz = clazz;
  this.title = title;
  this.groupName = groupName;

  try {
    Class styleSettingsClass = clazz == null ? CodeStyleSettings.class : clazz;
    this.field = styleSettingsClass.getField(fieldName);
  }
  catch (NoSuchFieldException e) {
    throw new RuntimeException(e);
  }
}
项目:tools-idea    文件:CodeStyleBlankLinesPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (myIsFirstUpdate) {
    myCustomOptions.putValue(groupName, (Trinity)Trinity.create(settingsClass, fieldName, title));
  }

  for (IntOption option : myOptions) {
    if (option.myTarget.getName().equals(fieldName)) {
      option.myTextField.setEnabled(true);
    }
  }
}
项目:consulo    文件:OptionTableWithPreviewPanel.java   
public Option(@Nullable Class<? extends CustomCodeStyleSettings> clazz,
              @Nonnull String fieldName,
              @Nonnull String title,
              @Nullable String groupName,
              @Nullable OptionAnchor anchor,
              @Nullable String anchorFiledName) {
  super(fieldName, anchor, anchorFiledName);
  this.clazz = clazz;
  this.title = title;
  this.groupName = groupName;

  try {
    Class styleSettingsClass = clazz == null ? CommonCodeStyleSettings.class : clazz;
    this.field = styleSettingsClass.getField(fieldName);
  }
  catch (NoSuchFieldException e) {
    throw new RuntimeException(e);
  }
}
项目:consulo    文件:OptionTableWithPreviewPanel.java   
public IntOption(Class<? extends CustomCodeStyleSettings> clazz,
                 @Nonnull String fieldName,
                 @Nonnull String title,
                 @Nullable String groupName,
                 @Nullable OptionAnchor anchor,
                 @Nullable String anchorFiledName,
                 int minValue,
                 int maxValue,
                 int defaultValue,
                 @Nullable String defaultValueText) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
  myMinValue = minValue;
  myMaxValue = maxValue;
  myDefaultValue = defaultValue;
  myDefaultValueText = defaultValueText;
}
项目:consulo    文件:CodeStyleBlankLinesPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (myIsFirstUpdate) {
    myCustomOptions.putValue(groupName, (Trinity)Trinity.create(settingsClass, fieldName, title));
  }

  for (IntOption option : myOptions) {
    if (option.myTarget.getName().equals(fieldName)) {
      option.myTextField.setEnabled(true);
    }
  }
}
项目:intellij-ce-playground    文件:OptionTreeWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:intellij-ce-playground    文件:OptionTreeWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             @Nullable String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (isFirstUpdate) {
    myCustomOptions.putValue(groupName, new CustomBooleanOptionInfo(settingsClass, fieldName, title, groupName, anchor, anchorFieldName));
  }
  enableOption(fieldName);
}
项目:intellij-ce-playground    文件:OptionTreeWithPreviewPanel.java   
private CustomBooleanOptionInfo(@NotNull Class<? extends CustomCodeStyleSettings> settingClass,
                                @NotNull String fieldName,
                                @NotNull String title,
                                String groupName,
                                OptionAnchor anchor,
                                String anchorFieldName) {
  this.settingClass = settingClass;
  this.fieldName = fieldName;
  this.title = title;
  this.groupName = groupName;
  this.anchor = anchor;
  this.anchorFieldName = anchorFieldName;
}
项目:intellij-ce-playground    文件:OptionTreeWithPreviewPanel.java   
@Override
public void setValue(CodeStyleSettings settings, Boolean aBoolean) {
  final CustomCodeStyleSettings customSettings = settings.getCustomSettings(mySettingsClass);
  try {
    field.set(customSettings, aBoolean);
  }
  catch (IllegalAccessException e) {
    LOG.error(e);
  }
}
项目:intellij-ce-playground    文件:OptionTableWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:intellij-ce-playground    文件:OptionTableWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (isFirstUpdate) {
    Option option;
    if (options.length == 2) {
      option =
        new SelectionOption(settingsClass, fieldName, title, groupName, anchor, anchorFieldName, (String[])options[0], (int[])options[1]);
    }
    else {
      option = new BooleanOption(settingsClass, fieldName, title, groupName, anchor, anchorFieldName);
    }
    myCustomOptions.add(option);
    option.setEnabled(true);
  }
  else {
    for (Option each : myCustomOptions) {
      if (each.clazz == settingsClass && each.field.getName().equals(fieldName)) {
        each.setEnabled(true);
      }
    }
  }
}
项目:intellij-ce-playground    文件:OptionTableWithPreviewPanel.java   
private BooleanOption(Class<? extends CustomCodeStyleSettings> clazz,
                      @NotNull String fieldName,
                      @NotNull String title,
                      @Nullable String groupName,
                      @Nullable OptionAnchor anchor,
                      @Nullable String anchorFiledName) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
}
项目:intellij-ce-playground    文件:OptionTableWithPreviewPanel.java   
public SelectionOption(Class<? extends CustomCodeStyleSettings> clazz,
                       @NotNull String fieldName,
                       @NotNull String title,
                       @Nullable String groupName,
                       @Nullable OptionAnchor anchor,
                       @Nullable String anchorFiledName,
                       @NotNull String[] options,
                       @NotNull int[] values) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
  this.options = options;
  this.values = values;
}
项目:intellij-ce-playground    文件:CodeStyleBlankLinesPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:tools-idea    文件:OptionTreeWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:tools-idea    文件:OptionTreeWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             @Nullable String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (isFirstUpdate) {
    myCustomOptions.putValue(groupName, new CustomBooleanOptionInfo(settingsClass, fieldName, title, groupName, anchor, anchorFieldName));
  }
  enableOption(fieldName);
}
项目:tools-idea    文件:OptionTreeWithPreviewPanel.java   
private CustomBooleanOptionInfo(@NotNull Class<? extends CustomCodeStyleSettings> settingClass,
                                @NotNull String fieldName,
                                @NotNull String title,
                                String groupName,
                                OptionAnchor anchor,
                                String anchorFieldName) {
  this.settingClass = settingClass;
  this.fieldName = fieldName;
  this.title = title;
  this.groupName = groupName;
  this.anchor = anchor;
  this.anchorFieldName = anchorFieldName;
}
项目:tools-idea    文件:OptionTreeWithPreviewPanel.java   
@Override
public void setValue(CodeStyleSettings settings, Boolean aBoolean) {
  final CustomCodeStyleSettings customSettings = settings.getCustomSettings(mySettingsClass);
  try {
    field.set(customSettings, aBoolean);
  }
  catch (IllegalAccessException e) {
    LOG.error(e);
  }
}
项目:tools-idea    文件:OptionTableWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:tools-idea    文件:OptionTableWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (isFirstUpdate) {
    Option option;
    if (options.length == 2) {
      option =
        new SelectionOption(settingsClass, fieldName, title, groupName, anchor, anchorFieldName, (String[])options[0], (int[])options[1]);
    }
    else {
      option = new BooleanOption(settingsClass, fieldName, title, groupName, anchor, anchorFieldName);
    }
    myCustomOptions.add(option);
    option.setEnabled(true);
  }
  else {
    for (Option each : myCustomOptions) {
      if (each.clazz == settingsClass && each.field.getName().equals(fieldName)) {
        each.setEnabled(true);
      }
    }
  }
}
项目:tools-idea    文件:OptionTableWithPreviewPanel.java   
private BooleanOption(Class<? extends CustomCodeStyleSettings> clazz,
                      @NotNull String fieldName,
                      @NotNull String title,
                      @Nullable String groupName,
                      @Nullable OptionAnchor anchor,
                      @Nullable String anchorFiledName) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
}
项目:tools-idea    文件:OptionTableWithPreviewPanel.java   
public SelectionOption(Class<? extends CustomCodeStyleSettings> clazz,
                       @NotNull String fieldName,
                       @NotNull String title,
                       @Nullable String groupName,
                       @Nullable OptionAnchor anchor,
                       @Nullable String anchorFiledName,
                       @NotNull String[] options,
                       @NotNull int[] values) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
  this.options = options;
  this.values = values;
}
项目:tools-idea    文件:CodeStyleBlankLinesPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:consulo    文件:OptionTreeWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:consulo    文件:OptionTreeWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             @Nullable String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (isFirstUpdate) {
    myCustomOptions.putValue(groupName, new CustomBooleanOptionInfo(settingsClass, fieldName, title, groupName, anchor, anchorFieldName));
  }
  enableOption(fieldName);
}
项目:consulo    文件:OptionTreeWithPreviewPanel.java   
private CustomBooleanOptionInfo(@Nonnull Class<? extends CustomCodeStyleSettings> settingClass,
                                @Nonnull String fieldName,
                                @Nonnull String title,
                                String groupName,
                                OptionAnchor anchor,
                                String anchorFieldName) {
  this.settingClass = settingClass;
  this.fieldName = fieldName;
  this.title = title;
  this.groupName = groupName;
  this.anchor = anchor;
  this.anchorFieldName = anchorFieldName;
}
项目:consulo    文件:OptionTreeWithPreviewPanel.java   
@Override
public void setValue(CodeStyleSettings settings, Boolean aBoolean) {
  final CustomCodeStyleSettings customSettings = settings.getCustomSettings(mySettingsClass);
  try {
    field.set(customSettings, aBoolean);
  }
  catch (IllegalAccessException e) {
    LOG.error(e);
  }
}
项目:consulo    文件:OptionTableWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:consulo    文件:OptionTableWithPreviewPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName,
                             @Nullable OptionAnchor anchor,
                             @Nullable String anchorFieldName,
                             Object... options) {
  if (isFirstUpdate) {
    Option option;
    if (options.length == 2) {
      option =
              new SelectionOption(settingsClass, fieldName, title, groupName, anchor, anchorFieldName, (String[])options[0], (int[])options[1]);
    }
    else {
      option = new BooleanOption(settingsClass, fieldName, title, groupName, anchor, anchorFieldName);
    }
    myCustomOptions.add(option);
    option.setEnabled(true);
  }
  else {
    for (Option each : myCustomOptions) {
      if (each.clazz == settingsClass && each.field.getName().equals(fieldName)) {
        each.setEnabled(true);
      }
    }
  }
}
项目:consulo    文件:OptionTableWithPreviewPanel.java   
private BooleanOption(Class<? extends CustomCodeStyleSettings> clazz,
                      @Nonnull String fieldName,
                      @Nonnull String title,
                      @Nullable String groupName,
                      @Nullable OptionAnchor anchor,
                      @Nullable String anchorFiledName) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
}
项目:consulo    文件:OptionTableWithPreviewPanel.java   
public SelectionOption(Class<? extends CustomCodeStyleSettings> clazz,
                       @Nonnull String fieldName,
                       @Nonnull String title,
                       @Nullable String groupName,
                       @Nullable OptionAnchor anchor,
                       @Nullable String anchorFiledName,
                       @Nonnull String[] options,
                       @Nonnull int[] values) {
  super(clazz, fieldName, title, groupName, anchor, anchorFiledName);
  this.options = options;
  this.values = values;
}
项目:consulo    文件:CodeStyleBlankLinesPanel.java   
@Override
public void showCustomOption(Class<? extends CustomCodeStyleSettings> settingsClass,
                             String fieldName,
                             String title,
                             String groupName, Object... options) {
  showCustomOption(settingsClass, fieldName, title, groupName, null, null, options);
}
项目:hybris-integration-intellij-idea-plugin    文件:ImpexCodeStyleSettingsProvider.java   
@Override
public CustomCodeStyleSettings createCustomSettings(final CodeStyleSettings settings) {
    return new ImpexCodeStyleSettings(settings);
}
项目:intellij-csv-validator    文件:CsvCodeStyleSettingsProvider.java   
@Override
public CustomCodeStyleSettings createCustomSettings(CodeStyleSettings settings) {
    return new CsvCodeStyleSettings(settings);
}
项目:smcplugin    文件:SmcCodeStyleSettingsProvider.java   
@Override
public CustomCodeStyleSettings createCustomSettings(CodeStyleSettings settings) {
    return new SmcCodeStyleSettings(settings);
}
项目:intellij-neos    文件:FusionCodeStyleSettingsProvider.java   
@Nullable
@Override
public CustomCodeStyleSettings createCustomSettings(CodeStyleSettings settings) {
    return new FusionCodeStyleSettings(settings);
}
项目:rythm_plugin    文件:RythmCodeStyleSettingsProvider.java   
@Override
public CustomCodeStyleSettings createCustomSettings(CodeStyleSettings settings) {
    return new RythmCodeStyleSettings(settings);
}