use of com.intellij.refactoring.invertBoolean.InvertBooleanProcessor in project intellij-community by JetBrains.
the class InvertBooleanTest method perform.
@Override
protected void perform() {
PsiElement element = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED);
assertTrue(element instanceof PsiNamedElement);
final PsiNamedElement namedElement = (PsiNamedElement) element;
final String name = namedElement.getName();
new InvertBooleanProcessor(namedElement, name + "Inverted").run();
}
use of com.intellij.refactoring.invertBoolean.InvertBooleanProcessor in project intellij-community by JetBrains.
the class PyInvertBooleanTest method doTest.
private void doTest(List<String> files) {
files.add(0, "refactoring/invertBoolean/" + getTestName(true) + ".before.py");
myFixture.configureByFiles(files.toArray(new String[files.size()]));
final PsiElement element = myFixture.getElementAtCaret();
assertTrue(element instanceof PsiNamedElement);
final PsiNamedElement target = (PsiNamedElement) element;
final String name = target.getName();
assertNotNull(name);
new InvertBooleanProcessor(target, "not" + StringUtil.toTitleCase(name)).run();
myFixture.checkResultByFile("refactoring/invertBoolean/" + getTestName(true) + ".after.py");
}
Aggregations