Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornitind2009-01-07 20:17:54 +0000
committernitind2009-01-07 20:17:54 +0000
commitf08e57cad75a40cd89ac0353cb15e5446a2156d1 (patch)
treed5c5c3f559dcb66d7dbfee68f7d24f9fc0ba09dc
parent55d3ec1ffa186f04eb4d5b27f656838e86564bc2 (diff)
downloadwebtools.sourceediting-f08e57cad75a40cd89ac0353cb15e5446a2156d1.tar.gz
webtools.sourceediting-f08e57cad75a40cd89ac0353cb15e5446a2156d1.tar.xz
webtools.sourceediting-f08e57cad75a40cd89ac0353cb15e5446a2156d1.zip
[nobug] treat FindOccurrencesProcessor as a provision configuration
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java
index 1d09715613..d797f10a43 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java
@@ -26,6 +26,7 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;
import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
import org.eclipse.wst.sse.ui.internal.search.FindOccurrencesProcessor;
import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
@@ -82,12 +83,26 @@ public abstract class FindOccurrencesHandler extends AbstractHandler {
String partition = tr != null ? tr.getType() : ""; //$NON-NLS-1$
Iterator it = getProcessors().iterator();
- FindOccurrencesProcessor action = null;
+ FindOccurrencesProcessor processor = null;
while (it.hasNext()) {
- action = (FindOccurrencesProcessor) it.next();
+ processor = (FindOccurrencesProcessor) it.next();
// we just choose the first action that can handle the partition
- if (action.enabledForParitition(partition))
- return action;
+ if (processor.enabledForParitition(partition))
+ return processor;
+ }
+
+ List extendedFindOccurrencesProcessors = ExtendedConfigurationBuilder.getInstance().getConfigurations(FindOccurrencesProcessor.class.getName(), partition);
+ for (int i = 0; i < extendedFindOccurrencesProcessors.size(); i++) {
+ Object o = extendedFindOccurrencesProcessors.get(i);
+ if (o instanceof FindOccurrencesProcessor) {
+ /*
+ * We just choose the first registered processor that
+ * explicitly says it can handle the partition
+ */
+ processor = (FindOccurrencesProcessor) it.next();
+ if (processor.enabledForParitition(partition))
+ return processor;
+ }
}
return null;
}

Back to the top