use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class UnnecessaryFullyQualifiedNameFixTest method doTest.
private void doTest(@Language("JAVA") @NotNull @NonNls String before, @Language("JAVA") @NotNull @NonNls String after, @MagicConstant(intValues = { JavaCodeStyleSettings.FULLY_QUALIFY_NAMES_ALWAYS, JavaCodeStyleSettings.FULLY_QUALIFY_NAMES_IF_NOT_IMPORTED, JavaCodeStyleSettings.SHORTEN_NAMES_ALWAYS_AND_ADD_IMPORT }) int classNamesInJavadoc, String fileName) {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
final JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class);
final int oldClassNamesInJavadoc = javaSettings.CLASS_NAMES_IN_JAVADOC;
try {
javaSettings.CLASS_NAMES_IN_JAVADOC = classNamesInJavadoc;
doTest(InspectionGadgetsBundle.message("unnecessary.fully.qualified.name.replace.quickfix"), before, after, fileName);
} finally {
javaSettings.CLASS_NAMES_IN_JAVADOC = oldClassNamesInJavadoc;
}
}
use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class CopyClassTest method testLibraryClass.
public void testLibraryClass() throws Exception {
// IDEADEV-28791
JavaCodeStyleSettings javaSettings = getCurrentCodeStyleSettings().getCustomSettings(JavaCodeStyleSettings.class);
javaSettings.CLASS_NAMES_IN_JAVADOC = JavaCodeStyleSettings.FULLY_QUALIFY_NAMES_ALWAYS;
doTest("java.util.ArrayList", "Bar");
}
use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class FullyQualifiedNamesInJavadocOptionProvider method reset.
public void reset(@NotNull CodeStyleSettings settings) {
JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class);
QualifyJavadocOptions option = QualifyJavadocOptions.fromIntValue(javaSettings.CLASS_NAMES_IN_JAVADOC);
myComboBox.setSelectedItem(option);
}
use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class JavaReferenceAdjuster method process.
@Override
public ASTNode process(@NotNull ASTNode element, boolean addImports, boolean incompleteCode, Project project) {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(project);
JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class);
return process(element, addImports, incompleteCode, javaSettings.useFqNamesInJavadocAlways(), settings.USE_FQ_CLASS_NAMES);
}
use of com.intellij.psi.codeStyle.JavaCodeStyleSettings in project intellij-community by JetBrains.
the class JavaReferenceAdjuster method processRange.
@Override
public void processRange(@NotNull ASTNode element, int startOffset, int endOffset, Project project) {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(project);
JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class);
processRange(element, startOffset, endOffset, javaSettings.useFqNamesInJavadocAlways(), settings.USE_FQ_CLASS_NAMES);
}
Aggregations