Package org.eclipse.ui.internal
Class ObjectActionContributorManager
java.lang.Object
org.eclipse.ui.internal.ObjectContributorManager
org.eclipse.ui.internal.ObjectActionContributorManager
- All Implemented Interfaces:
IExtensionChangeHandler
This manager is used to populate a popup menu manager with actions for a
given type.
-
Field Summary
Fields inherited from class org.eclipse.ui.internal.ObjectContributorManager
adaptableLookup, contributorRecordSet, contributors, objectLookup, resourceAdapterLookup
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtension
(IExtensionTracker tracker, IExtension addedExtension) This method is called whenever an extension conforming to the extension point filter is being added to the registry.boolean
contributeObjectActions
(IWorkbenchPart part, IMenuManager popupMenu, ISelectionProvider selProv, Set<IObjectActionContributor> alreadyContributed) Contributes submenus and/or actions applicable to the selection in the provided viewer into the provided popup menu.static void
Disposes instance if it was createdprotected String
Return the extension point id (local to org.eclipse.ui) that this manager is associated with.Returns the shared instance of this manager.Methods inherited from class org.eclipse.ui.internal.ObjectContributorManager
addContributorsFor, computeClassOrder, computeCombinedOrder, computeInterfaceOrder, dispose, flushLookup, getAdaptableContributors, getContributors, getContributors, getContributors, getObjectContributors, getResourceContributors, hasContributorsFor, isApplicableTo, isApplicableTo, registerContributor, removeCommonAdapters, removeExtension, unregisterAllContributors, unregisterContributor, unregisterContributors
-
Constructor Details
-
ObjectActionContributorManager
public ObjectActionContributorManager()PopupMenuManager constructor.
-
-
Method Details
-
contributeObjectActions
public boolean contributeObjectActions(IWorkbenchPart part, IMenuManager popupMenu, ISelectionProvider selProv, Set<IObjectActionContributor> alreadyContributed) Contributes submenus and/or actions applicable to the selection in the provided viewer into the provided popup menu.- Parameters:
part
- the part being contributed topopupMenu
- the menu being contributed toselProv
- the selection provideralreadyContributed
- the set of contributors that already contributed to the menu- Returns:
- whether anything was contributed
-
getManager
Returns the shared instance of this manager.- Returns:
- the shared instance of this manager
-
disposeManager
public static void disposeManager()Disposes instance if it was created -
addExtension
Description copied from interface:IExtensionChangeHandler
This method is called whenever an extension conforming to the extension point filter is being added to the registry. This method does not automatically register objects to the tracker.- Parameters:
tracker
- a tracker to which the handler has been registeredaddedExtension
- the extension being added
-
getExtensionPointFilter
Description copied from class:ObjectContributorManager
Return the extension point id (local to org.eclipse.ui) that this manager is associated with. Default implementation returns null, which implies no relationship with a particular extension.- Overrides:
getExtensionPointFilter
in classObjectContributorManager
- Returns:
- the extension point id
-