use of com.intellij.refactoring.makeStatic.Settings in project intellij-community by JetBrains.
the class MakeClassStaticTest method performWithFields.
private void performWithFields() throws Exception {
configureByFile(TEST_ROOT + getTestName(false) + ".java");
PsiElement element = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED);
assertTrue(element instanceof PsiClass);
PsiClass aClass = (PsiClass) element;
final ArrayList<VariableData> parametersForFields = new ArrayList<>();
final boolean addClassParameter = MakeStaticUtil.buildVariableData(aClass, parametersForFields);
new MakeClassStaticProcessor(getProject(), aClass, new Settings(true, addClassParameter ? "anObject" : null, parametersForFields.toArray(new VariableData[parametersForFields.size()]))).run();
checkResultByFile(TEST_ROOT + getTestName(false) + "_after.java");
}
Aggregations