Skip navigation links
oracle.ide.controller
Class ContextMenuListenersHook
java.lang.Object
javax.ide.extension.ElementVisitor
javax.ide.extension.ExtensionHook
oracle.ide.extension.HashStructureHook
oracle.ide.controller.ContextMenuListenersHook
-
public final class ContextMenuListenersHook
- extends HashStructureHook
Declarative hook for context menu listeners.
This class provides access to context menu listeners for a specific site registered in extension manifests. A single instance of ContextMenuListener
is provided for a specific site which lazily creates and delegates to the specific implementations registered in extension manifests.
Obtain an instance of this class using ExtensionRegistry.getHook(javax.ide.extension.ElementName)
, providing ELEMENT
as the ElementName parameter.
- Since:
- 11.0
Field Summary |
static ElementName |
ELEMENT
The XML element for this custom hook. |
protected static java.util.logging.Logger |
LOGGER
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ELEMENT
public static final ElementName ELEMENT
- The XML element for this custom hook.
LOGGER
protected static final java.util.logging.Logger LOGGER
getListener
public ContextMenuListener getListener(java.lang.String siteId)
- Returns the declarative context menu listener for the specified site. The returned ContextMenuListener will delegate to all registered listeners for the specified site.
-
- Parameters:
siteId
- the id of a context menu listener site.
- Returns:
- a context menu listener for the specified site.
addListenerForSite
public void addListenerForSite(java.lang.String siteId,
MetaClass listenerClass)
- Allow contextMenuHook to add listeners to ContextMenuListenersHook.
-
- Parameters:
siteId
-
listenerClass
-
Skip navigation links
Copyright © 1997, 2012, Oracle. All rights reserved.