use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class RightMarginForm method apply.
public void apply(@NotNull CodeStyleSettings settings) {
CommonCodeStyleSettings langSettings = settings.getCommonSettings(myLanguage);
if (langSettings != settings) {
if (myDefaultGeneralCheckBox.isSelected()) {
langSettings.RIGHT_MARGIN = -1;
} else {
langSettings.RIGHT_MARGIN = getFieldRightMargin(settings.getDefaultRightMargin());
}
}
langSettings.WRAP_ON_TYPING = getSelectedWrapOnTypingValue();
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class ArrangementSettingsPanel method apply.
@Override
public void apply(CodeStyleSettings settings) {
CommonCodeStyleSettings commonSettings = settings.getCommonSettings(myLanguage);
commonSettings.setArrangementSettings(createSettings());
if (myForceArrangementPanel != null) {
commonSettings.FORCE_REARRANGE_MODE = myForceArrangementPanel.getRearrangeMode();
}
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class JavaIndentOptionsEditor method isModified.
public boolean isModified(final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions options) {
boolean isModified = super.isModified(settings, options);
CommonCodeStyleSettings javaSettings = settings.getCommonSettings(JavaLanguage.INSTANCE);
isModified |= isFieldModified(myLabelIndent, options.LABEL_INDENT_SIZE);
isModified |= isFieldModified(myLabelIndentAbsolute, options.LABEL_INDENT_ABSOLUTE);
isModified |= isFieldModified(myCbDontIndentTopLevelMembers, javaSettings.DO_NOT_INDENT_TOP_LEVEL_CLASS_MEMBERS);
isModified |= isFieldModified(myCbUseRelativeIndent, options.USE_RELATIVE_INDENTS);
return isModified;
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class JavaIndentOptionsEditor method apply.
public void apply(final CodeStyleSettings settings, final CommonCodeStyleSettings.IndentOptions options) {
super.apply(settings, options);
options.LABEL_INDENT_SIZE = getFieldValue(myLabelIndent, Integer.MIN_VALUE, options.LABEL_INDENT_SIZE);
options.LABEL_INDENT_ABSOLUTE = myLabelIndentAbsolute.isSelected();
CommonCodeStyleSettings javaSettings = settings.getCommonSettings(JavaLanguage.INSTANCE);
javaSettings.DO_NOT_INDENT_TOP_LEVEL_CLASS_MEMBERS = myCbDontIndentTopLevelMembers.isSelected();
options.USE_RELATIVE_INDENTS = myCbUseRelativeIndent.isSelected();
}
use of com.intellij.psi.codeStyle.CommonCodeStyleSettings in project intellij-community by JetBrains.
the class RenameMethodMultiTest method testAlignedMultilineParameters.
public void testAlignedMultilineParameters() throws Exception {
CommonCodeStyleSettings javaSettings = getCurrentCodeStyleSettings().getCommonSettings(JavaLanguage.INSTANCE);
javaSettings.ALIGN_MULTILINE_PARAMETERS = true;
javaSettings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
doTest("void test123(int i, int j)", "test123asd");
}
Aggregations