protected void doOKAction() {
   CommandProcessor.getInstance()
       .executeCommand(
           myProject,
           new Runnable() {
             public void run() {
               final Runnable action =
                   new Runnable() {
                     public void run() {
                       String directoryName =
                           myTargetDirectoryField.getText().replace(File.separatorChar, '/');
                       try {
                         myTargetDirectory =
                             DirectoryUtil.mkdirs(
                                 PsiManager.getInstance(myProject), directoryName);
                       } catch (IncorrectOperationException e) {
                       }
                     }
                   };
               ApplicationManager.getApplication().runWriteAction(action);
             }
           },
           RefactoringBundle.message("create.directory"),
           null);
   if (myTargetDirectory == null) {
     CommonRefactoringUtil.showErrorMessage(
         getTitle(), RefactoringBundle.message("cannot.create.directory"), myHelpID, myProject);
     return;
   }
   myCallback.run(this);
 }
 protected void doAction() {
   if (!myCallback.checkConflicts(this)) return;
   JavaRefactoringSettings.getInstance().PULL_UP_MEMBERS_JAVADOC = myJavaDocPanel.getPolicy();
   final PsiClass superClass = getSuperClass();
   String name = superClass.getQualifiedName();
   if (name != null) {
     StatisticsManager.getInstance()
         .incUseCount(
             new StatisticsInfo(PULL_UP_STATISTICS_KEY + myClass.getQualifiedName(), name));
   }
   List<MemberInfo> infos = getSelectedMemberInfos();
   invokeRefactoring(
       new PullUpProcessor(
           myClass,
           superClass,
           infos.toArray(new MemberInfo[infos.size()]),
           new DocCommentPolicy(getJavaDocPolicy())));
   close(OK_EXIT_CODE);
 }
 @Override
 protected boolean checkConflicts() {
   return myCallback.checkConflicts(this);
 }
Beispiel #4
0
 private static void ok1(String[] output, int selected_row) {
   if (callback != null) {
     callback.ok(new OutputData(output, selected_row));
   }
 }