void (@NotNull PsiElement element, @NotNull Settings settings) { final PsiElement owner = element.getParent().getParent(); if (element instanceof GrVariable && owner instanceof GrVariableDeclarationOwner) { ((GrVariableDeclarationOwner)owner).removeVariable(((GrVariable)element)); } if (element instanceof GrMethod) { element.delete(); } }