diff options
Diffstat (limited to 'bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EModelService.java')
-rw-r--r-- | bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EModelService.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EModelService.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EModelService.java index 857533c1a34..4c14c1811bd 100644 --- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EModelService.java +++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EModelService.java @@ -14,6 +14,8 @@ package org.eclipse.e4.ui.workbench.modeling; import java.util.List; import org.eclipse.e4.core.contexts.IEclipseContext; import org.eclipse.e4.ui.model.application.MApplicationElement; +import org.eclipse.e4.ui.model.application.commands.MHandler; +import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor; import org.eclipse.e4.ui.model.application.ui.MElementContainer; import org.eclipse.e4.ui.model.application.ui.MSnippetContainer; @@ -67,6 +69,12 @@ public interface EModelService { /** Returned Location if the element is in an MTrimBar */ public static final int IN_TRIM = 0x10; + /** Returned Location if the element is in a main menu of an MWindow */ + public static final int IN_MAIN_MENU = 0x20; + + /** Returned Location if the element is in a menu or a tool bar of an MPart */ + public static final int IN_PART = 0x40; + // 'Standard' searches /** Searches for elements in the UI that the user is currently seeing (excluding trim) */ @@ -75,7 +83,7 @@ public interface EModelService { /** Searches for elements in the UI that the user is currently seeing */ public static final int ANYWHERE = OUTSIDE_PERSPECTIVE | IN_ANY_PERSPECTIVE | IN_SHARED_AREA - | IN_TRIM; + | IN_TRIM | IN_MAIN_MENU | IN_PART; /** * Searches for elements in the UI that the user is currently seeing that are OUTSIDE the @@ -255,6 +263,17 @@ public interface EModelService { public MUIElement findSnippet(MSnippetContainer snippetContainer, String id); /** + * Finds a handler by ID in a particular container + * + * @param handlerContainer + * The container to look in + * @param id + * The ID of the handler + * @return The handler or <code>null</code> if none is found + */ + public MHandler findHandler(MHandlerContainer handlerContainer, String id); + + /** * Return the count of the children whose 'toBeRendered' flag is true * * @param element |