org.eclipse.gmf.runtime.emf.type.core
Class ClientContextManager
java.lang.Object
org.eclipse.gmf.runtime.emf.type.core.ClientContextManager
-
public final class ClientContextManager
- extends java.lang.Object
The context manager loads contexts from the elementTypeBindings
extension point and makes them available to the element type registry.
There is also a default client context,
getDefaultClientContext()
,
that is implicitly bound to all types and advice that otherwise have no
explicit binding.
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
ELEMENT_TYPE_BINDINGS_EXT_P_NAME
public static final java.lang.String ELEMENT_TYPE_BINDINGS_EXT_P_NAME
- Extension point name for the element type bindings extension point.
-
See Also:
-
Constant Field Values
getInstance
public static final
ClientContextManager getInstance()
- Obtains the singleton instance of this class.
-
-
Returns:
- the singleton context manager
getDefaultClientContext
public static final
IClientContext getDefaultClientContext()
- Gets the default client context.
-
-
Returns:
- the default context
getClientContext
public
IClientContext getClientContext(java.lang.String contextId)
- Obtains a client context by its unique identifier.
-
-
Parameters:
-
contextId
- the client context ID to look for
-
Returns:
- the matching context, or
null
if none is
registered under this ID
getClientContexts
public java.util.Set getClientContexts()
- Obtains all of the client contexts registered in the system.
-
-
Returns:
- the available
IClientContext
s
getClientContextFor
public
IClientContext getClientContextFor(org.eclipse.emf.ecore.EObject eObject)
- Obtains the client contexts to which the specified object belongs.
-
-
Parameters:
-
eObject
- a model element
-
Returns:
- the client context to which the
eObject
belongs.
This may be null
if no context matches this
element. It will be a MultiClientContest
if more
than one context matches the element.
getBinding
public
IClientContext getBinding(
IElementTypeDescriptor elementTypeDescriptor)
- Finds the
IClientContext
that is bound to the
elementTypeDescriptor
. If more than one context is bound
to the elementTypeDescriptor
, the context that is
returned will be a MultiClientContext
representing them
all.
-
-
Parameters:
-
elementTypeDescriptor
- the element type descriptor
-
Returns:
- the
IClientContext
that is bound to the
elementTypeDescriptor
. May be a multi-context.
getBinding
public
IClientContext getBinding(
IElementType elementType)
- Finds the
IClientContext
s that are bound to the
elementType
. If there are more than one contexts bound,
returns a MultiClientContext
representing them all.
-
-
Parameters:
-
elementType
- the element type
-
Returns:
- the
IClientContext
that is bound to the
elementType
. May be a multi-context.
getBinding
public
IClientContext getBinding(org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.IEditHelperAdviceDescriptor advice)
- Finds the
IClientContext
that is bound to the advice
.
If more than one context is bound to the advice
, the
context that is returned will be a MultiClientContext
representing them all.
-
-
Parameters:
-
elementType
- the element type
-
Returns:
- the
IClientContext
that is bound to the
advice
. May be a multi-context.
registerClientContext
public void registerClientContext(
IClientContext clientContext)
- Registers the
clientContext
. Does nothing if the context
has already been registered.
-
-
Parameters:
-
clientContext
- the client context
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.