use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class DataPointHolderConversionIntentionTest method tearDown.
@Override
protected void tearDown() throws Exception {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.STATIC_FIELD_NAME_PREFIX = "";
settings.STATIC_FIELD_NAME_SUFFIX = "";
super.tearDown();
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class ExtractMethodTest method doTestReturnTypeChanged.
private void doTestReturnTypeChanged(PsiType type) throws PrepareFailedException {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.ELSE_ON_NEW_LINE = true;
settings.CATCH_ON_NEW_LINE = myCatchOnNewLine;
configureByFile(BASE_PATH + getTestName(false) + ".java");
boolean success = performExtractMethod(true, true, getEditor(), getFile(), getProject(), false, type, false, null);
assertTrue(success);
checkResultByFile(BASE_PATH + getTestName(false) + "_after.java");
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class ExtractMethodTest method testDefaultNamesConflictResolution.
public void testDefaultNamesConflictResolution() throws Exception {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
final String oldPrefix = settings.LOCAL_VARIABLE_NAME_PREFIX;
try {
settings.LOCAL_VARIABLE_NAME_PREFIX = "_";
doTest();
} finally {
settings.LOCAL_VARIABLE_NAME_PREFIX = oldPrefix;
}
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class ExtractMethodTest method testReassignedVarAfterCall.
public void testReassignedVarAfterCall() throws Exception {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
boolean oldGenerateFinalLocals = settings.GENERATE_FINAL_LOCALS;
try {
settings.GENERATE_FINAL_LOCALS = true;
doTest();
} finally {
settings.GENERATE_FINAL_LOCALS = oldGenerateFinalLocals;
}
}
use of com.intellij.psi.codeStyle.CodeStyleSettings in project intellij-community by JetBrains.
the class ExtractMethodTest method doTestPassFieldsAsParams.
private void doTestPassFieldsAsParams() throws PrepareFailedException {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
settings.ELSE_ON_NEW_LINE = true;
settings.CATCH_ON_NEW_LINE = myCatchOnNewLine;
configureByFile(BASE_PATH + getTestName(false) + ".java");
boolean success = performExtractMethod(true, true, getEditor(), getFile(), getProject(), false, null, true, null);
assertTrue(success);
checkResultByFile(BASE_PATH + getTestName(false) + "_after.java");
}
Aggregations