private static void invoke(final PsiClass aClass, Editor editor) { final PsiTypeParameterList typeParameterList = aClass.getTypeParameterList(); Project project = aClass.getProject(); if (typeParameterList == null) { final String message = RefactoringBundle.getCannotRefactorMessage( RefactoringBundle.message("changeClassSignature.no.type.parameters")); CommonRefactoringUtil.showErrorHint( project, editor, message, REFACTORING_NAME, HelpID.CHANGE_CLASS_SIGNATURE); return; } if (!CommonRefactoringUtil.checkReadOnlyStatus(project, aClass)) return; ChangeClassSignatureDialog dialog = new ChangeClassSignatureDialog(aClass); dialog.show(); }
private static boolean invoke(final PsiClass aClass, Editor editor) { final PsiTypeParameterList typeParameterList = aClass.getTypeParameterList(); Project project = aClass.getProject(); if (typeParameterList == null) { final String message = RefactoringBundle.getCannotRefactorMessage( RefactoringBundle.message("changeClassSignature.no.type.parameters")); CommonRefactoringUtil.showErrorHint( project, editor, message, REFACTORING_NAME, HelpID.CHANGE_CLASS_SIGNATURE); return false; } if (!CommonRefactoringUtil.checkReadOnlyStatus(project, aClass)) return false; ChangeClassSignatureDialog dialog = new ChangeClassSignatureDialog(aClass, true); // if (!ApplicationManager.getApplication().isUnitTestMode()){ return dialog.showAndGet(); // }else { // dialog.showAndGetOk() // } }