void () { PsiElement element = TargetElementUtil.findTargetElement(getEditor(), TargetElementUtil.ELEMENT_NAME_ACCEPTED); assertTrue(element instanceof PsiNamedElement); final PsiNamedElement namedElement = (PsiNamedElement)element; final String name = namedElement.getName(); new InvertBooleanProcessor(namedElement, name + "Inverted").run(); }