Author: dazarov
Date: 2009-05-14 04:03:37 -0400 (Thu, 14 May 2009)
New Revision: 15246
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
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-05-13
18:39:30 UTC (rev 15245)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-14
08:03:37 UTC (rev 15246)
@@ -429,7 +429,17 @@
}
}
+ private boolean isBadLocation(ISeamTextSourceReference location){
+ if(location.getStartPosition() == 0 && location.getLength() == 0)
+ return true;
+ else
+ return false;
+ }
+
private void changeXMLNode(ISeamTextSourceReference location, IFile file){
+ if(isBadLocation(location))
+ return;
+
String content = null;
try {
content = FileUtil.readStream(file.getContents());
@@ -456,6 +466,9 @@
}
private void changeAnnotation(ISeamTextSourceReference location, IFile file){
+ if(isBadLocation(location))
+ return;
+
String content = null;
try {
content = FileUtil.readStream(file.getContents());