use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class BindFieldsFromParametersTest method tearDown.
@Override
protected void tearDown() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.FIELD_NAME_PREFIX = "";
settings.PREFER_LONGER_NAMES = myPreferLongNames;
super.tearDown();
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class CreateConstructorParameterFromFieldTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
enableInspectionTools(new UnusedDeclarationInspection(), new MissortedModifiersInspection(), new UnqualifiedFieldAccessInspection());
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
myPreferLongNames = settings.PREFER_LONGER_NAMES;
if (getTestName(false).contains("SameParameter")) {
settings.PREFER_LONGER_NAMES = false;
}
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class Lambda2MethodReferenceInspectionTest method tearDown.
@Override
protected void tearDown() throws Exception {
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.REPLACE_CAST = settings.REPLACE_INSTANCEOF = false;
super.tearDown();
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class AddSingleStaticImportActionTest method testSingleImportWhenConflictingWithOnDemand.
public void testSingleImportWhenConflictingWithOnDemand() throws Exception {
myFixture.addClass("package foo; class Foo {public static void foo(int i){}}");
myFixture.addClass("package foo; class Bar {public static void foo(String s){}}");
myFixture.configureByFile(getTestName(false) + ".java");
CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(getProject()).getCurrentSettings();
int old = settings.NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND;
settings.NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND = 1;
try {
IntentionAction intention = myFixture.findSingleIntention("Add static import for 'foo.Foo.foo'");
assertNotNull(intention);
myFixture.launchAction(intention);
myFixture.checkResultByFile(getTestName(false) + "_after.java");
} finally {
settings.NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND = old;
}
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class CopyAbstractMethodImplementationTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject()).clone();
settings.INSERT_OVERRIDE_ANNOTATION = false;
CodeStyleSettingsManager.getInstance(getProject()).setTemporarySettings(settings);
}
Aggregations