Author: dazarov
Date: 2012-01-05 18:54:07 -0500 (Thu, 05 Jan 2012)
New Revision: 37665
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/ELReferencesQueryParticipant.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
Log:
EL refactoring for @Named beans doesn't work properly
https://issues.jboss.org/browse/JBIDE-10210
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-01-05
21:13:59 UTC (rev 37664)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-01-05
23:54:07 UTC (rev 37665)
@@ -165,16 +165,6 @@
protected IProject[] getProjects() {
return new IProject[]{baseFile.getProject()};
}
-
- @Override
- protected IContainer getViewFolder(IProject project) {
- IPath path = ProjectHome.getFirstWebContentPath(project);
-
- if(path != null)
- return project.getFolder(path.removeFirstSegments(1));
-
- return null;
- }
}
@Override
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java 2012-01-05
21:13:59 UTC (rev 37664)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/el/refactoring/ELRenameProcessor.java 2012-01-05
23:54:07 UTC (rev 37665)
@@ -147,18 +147,7 @@
return result;
}
-
@Override
- protected IContainer getViewFolder(IProject project) {
- IPath path = ProjectHome.getFirstWebContentPath(project);
-
- if(path != null)
- return project.getFolder(path.removeFirstSegments(1));
-
- return null;
- }
-
- @Override
protected void match(IFile file, int offset, int length) {
if(isFileReadOnly(file)){
status.addFatalError(NLS.bind(ElCoreMessages.EL_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE,
file.getFullPath().toString()));
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2012-01-05
21:13:59 UTC (rev 37664)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/el/refactoring/RenameMethodParticipant.java 2012-01-05
23:54:07 UTC (rev 37665)
@@ -203,12 +203,7 @@
return projectSet.getViewFolder(project);
}
- IPath path = ProjectHome.getFirstWebContentPath(project);
-
- if(path != null)
- return project.getFolder(path.removeFirstSegments(1));
-
- return null;
+ return super.getViewFolder(project);
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/ELReferencesQueryParticipant.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/ELReferencesQueryParticipant.java 2012-01-05
21:13:59 UTC (rev 37664)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/ELReferencesQueryParticipant.java 2012-01-05
23:54:07 UTC (rev 37665)
@@ -105,12 +105,7 @@
return projectSet.getViewFolder(project);
}
- IPath path = ProjectHome.getFirstWebContentPath(project);
-
- if(path != null)
- return project.getFolder(path.removeFirstSegments(1));
-
- return null;
+ return super.getViewFolder(project);
}
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-05
21:13:59 UTC (rev 37664)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-05
23:54:07 UTC (rev 37665)
@@ -43,6 +43,7 @@
import org.jboss.tools.common.el.core.resolver.IRelevanceCheck;
import org.jboss.tools.common.el.core.resolver.SimpleELContext;
import org.jboss.tools.common.el.core.resolver.Var;
+import org.jboss.tools.common.model.project.ProjectHome;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.util.BeanUtil;
import org.jboss.tools.common.util.FileUtil;
@@ -153,7 +154,14 @@
protected abstract IProject[] getProjects();
- protected abstract IContainer getViewFolder(IProject project);
+ protected IContainer getViewFolder(IProject project) {
+ IPath path = ProjectHome.getFirstWebContentPath(project);
+
+ if(path != null)
+ return project.getFolder(path.removeFirstSegments(1));
+
+ return null;
+ }
private boolean scanForJava(IContainer container){
if(container.getName().startsWith(".")) //$NON-NLS-1$