diff options
author | nitind | 2009-01-07 20:17:54 +0000 |
---|---|---|
committer | nitind | 2009-01-07 20:17:54 +0000 |
commit | f08e57cad75a40cd89ac0353cb15e5446a2156d1 (patch) | |
tree | d5c5c3f559dcb66d7dbfee68f7d24f9fc0ba09dc | |
parent | 55d3ec1ffa186f04eb4d5b27f656838e86564bc2 (diff) | |
download | webtools.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.java | 23 |
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; } |