Author: dazarov
Date: 2009-10-23 08:54:48 -0400 (Fri, 23 Oct 2009)
New Revision: 18260
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/plugin.xml
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5037
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/plugin.xml 2009-10-23 12:09:25 UTC
(rev 18259)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/plugin.xml 2009-10-23 12:54:48 UTC
(rev 18260)
@@ -24,6 +24,11 @@
value="org.eclipse.jdt.core.IMethod">
</instanceof>
</or>
+ <or>
+ <instanceof
+ value="org.eclipse.jdt.core.IType">
+ </instanceof>
+ </or>
</with>
</enablement>
</renameParticipant>
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-10-23
12:09:25 UTC (rev 18259)
+++
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-10-23
12:54:48 UTC (rev 18260)
@@ -19,6 +19,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.internal.ui.search.JavaSearchResultPage;
import org.eclipse.jdt.ui.search.ElementQuerySpecification;
import org.eclipse.jdt.ui.search.IMatchPresentation;
@@ -51,7 +52,7 @@
if(querySpecification instanceof ElementQuerySpecification){
ElementQuerySpecification qs = (ElementQuerySpecification)querySpecification;
- if(qs.getElement() instanceof IMethod){
+ if(qs.getElement() instanceof IMethod || qs.getElement() instanceof IType){
IFile file = (IFile)qs.getElement().getResource();
String name = qs.getElement().getElementName();
@@ -100,6 +101,7 @@
@Override
protected void match(IFile file, int offset, int length) {
+ //System.out.println("match - "+file.getFullPath()+" offset -
"+offset+" len - "+length);
Match match = new Match(file, offset, length);
requestor.reportMatch(match);
}