Author: dazarov
Date: 2009-04-09 10:06:58 -0400 (Thu, 09 Apr 2009)
New Revision: 14635
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077 progress monitor is shown while searching
references
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-04-09
14:04:17 UTC (rev 14634)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-04-09
14:06:58 UTC (rev 14635)
@@ -118,9 +118,6 @@
this.newName = componentName;
annotation = getAnnotation(file);
-
- changes.clear();
- findReferences();
}
private IAnnotation getAnnotation(IFile file){
@@ -361,6 +358,10 @@
OperationCanceledException {
if(annotation == null)
return null;
+
+ changes.clear();
+ findReferences();
+
CompositeChange root = new CompositeChange("Rename Seam Component");
TextFileChange change = new TextFileChange(file.getName(), file);
TextEdit edit = new ReplaceEdit(annotation.getSourceRange().getOffset(),
annotation.getSourceRange().getLength(),
"@"+annotation.getElementName()+"(\""+newName+"\")");