Author: vrubezhny
Date: 2008-12-30 10:05:20 -0500 (Tue, 30 Dec 2008)
New Revision: 12857
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/handlers/FindSeamHandler.java
Log:
JBIDE-3474 Find Seam References/Declarations (Shift-Ctrl-G/Ctrl-G) doesn't work.
Issue is fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java 2008-12-30
15:03:29 UTC (rev 12856)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java 2008-12-30
15:05:20 UTC (rev 12857)
@@ -55,6 +55,7 @@
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.search.SeamSearchQuery;
import org.jboss.tools.seam.ui.search.SeamSearchScope;
@@ -186,15 +187,14 @@
if (seamProject == null)
return;
-// List<ELOperandToken> tokens =
SeamELCompletionEngine.findTokensAtOffset(document, selectionOffset);
+ ELInvocationExpression expression = SeamELCompletionEngine.findExpressionAtOffset(
+ document, selectionOffset, 0, document.getLength());
- ELInvocationExpression tokens = null; //TODO
-
- if (tokens == null)
+ if (expression == null)
return; // No EL Operand found
try {
- performNewSearch(tokens, file);
+ performNewSearch(expression, file);
} catch (JavaModelException jme) {
SeamGuiPlugin.getPluginLog().logError(jme);
} catch (InterruptedException ie) {
@@ -306,8 +306,8 @@
*/
abstract protected int getLimitTo();
- private void performNewSearch(ELInvocationExpression tokens, IFile sourceFile) throws
JavaModelException, InterruptedException {
- SeamSearchQuery query= createQuery(tokens, sourceFile);
+ private void performNewSearch(ELInvocationExpression expression, IFile sourceFile)
throws JavaModelException, InterruptedException {
+ SeamSearchQuery query= createQuery(expression, sourceFile);
if (query.canRunInBackground()) {
/*
* This indirection with Object as parameter is needed to prevent the loading
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/handlers/FindSeamHandler.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/handlers/FindSeamHandler.java 2008-12-30
15:03:29 UTC (rev 12856)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/handlers/FindSeamHandler.java 2008-12-30
15:05:20 UTC (rev 12857)
@@ -53,6 +53,7 @@
import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.search.SeamSearchQuery;
import org.jboss.tools.seam.ui.search.SeamSearchScope;
@@ -172,15 +173,14 @@
if (seamProject == null)
return null;
-// List<ELOperandToken> tokens =
SeamELCompletionEngine.findTokensAtOffset(document, selectionOffset);
+ ELInvocationExpression expression = SeamELCompletionEngine.findExpressionAtOffset(
+ document, selectionOffset, 0, document.getLength());
- ELInvocationExpression tokens = null; //TODO
-
- if (tokens == null)
+ if (expression == null)
return null; // No EL Operand found
try {
- performNewSearch(tokens, file);
+ performNewSearch(expression, file);
} catch (JavaModelException jme) {
SeamGuiPlugin.getPluginLog().logError(jme);
} catch (InterruptedException ie) {
Show replies by date