Author: scabanovich
Date: 2010-10-21 05:12:56 -0400 (Thu, 21 Oct 2010)
New Revision: 25961
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
Log:
JBIDE-7312
https://jira.jboss.org/browse/JBIDE-7312
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2010-10-21
09:09:17 UTC (rev 25960)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2010-10-21
09:12:56 UTC (rev 25961)
@@ -30,6 +30,8 @@
import org.eclipse.text.edits.TextEdit;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
+import org.jboss.tools.common.el.core.resolver.ELResolver;
+import org.jboss.tools.common.el.core.resolver.IRelevanceCheck;
import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.BijectedAttributeType;
@@ -455,6 +457,20 @@
super(declarationFile, oldName/*, component*/);
}
+ protected IRelevanceCheck[] getRelevanceChecks(ELResolver[] resolvers) {
+ if(resolvers == null) return new IRelevanceCheck[0];
+ IRelevanceCheck[] result = new IRelevanceCheck[resolvers.length];
+ IRelevanceCheck check = new IRelevanceCheck() {
+ public boolean isRelevant(String content) {
+ if(content == null) return true;
+ return content.indexOf(oldName) >= 0;
+ }
+
+ };
+ for (int i = 0; i < result.length; i++) result[i] = check;
+ return result;
+ }
+
@Override
protected boolean isFileCorrect(IFile file) {
return SeamRenameProcessor.this.isFileCorrect(file);