Merge remote-tracking branch 'origin/master'
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Sun, 22 Jan 2012 19:59:50 +0000 (20:59 +0100)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Sun, 22 Jan 2012 19:59:50 +0000 (20:59 +0100)
platform/lang-impl/src/com/intellij/refactoring/rename/RenameUtil.java
platform/platform-resources-en/src/messages/RefactoringBundle.properties

index b7a23cfdbaf9b877b9e44df210a7f532d5495ebc..db345b26cf9ad003d4c5801c84e0935a1d20290a 100644 (file)
@@ -194,7 +194,11 @@ public class RenameUtil {
     ApplicationManager.getApplication().invokeLater(new Runnable() {
       public void run() {
         final String helpID = RenamePsiElementProcessor.forElement(element).getHelpID(element);
-        CommonRefactoringUtil.showErrorMessage(RefactoringBundle.message("rename.title"), e.getMessage(), helpID, project);
+        String message = e.getMessage();
+        if (StringUtil.isEmpty(message)) {
+          message = RefactoringBundle.message("rename.not.supported");
+        }
+        CommonRefactoringUtil.showErrorMessage(RefactoringBundle.message("rename.title"), message, helpID, project);
       }
     });
   }
index b93a0850c19eda0bd5f2e3f93b2afb48c4dd61ab..aa005b83d9b7fa33079d149beb0f8cc4d15c0bde 100644 (file)
@@ -221,6 +221,7 @@ move.nonstatic.class.from.jsp.not.supported = Moving non-static classes from JSP
 package.occurs.in.package.prefixes.of.the.following.source.folders.n=Package {0} occurs in package prefixes of the following source folders:\n
 these.package.prefixes.will.be.changed=These package prefixes will be changed.
 rename.title=Rename
+rename.not.supported=Operation is not supported.
 multiple.directories.correspond.to.package=Multiple directories correspond to package\n
 directories.and.all.references.to.package.will.be.renamed=\n\nDo you want to rename the whole package or directory \n{0} only?
 rename.package.button.text=Rename &package