|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.emf.type.core.ClientContextManager
public final class ClientContextManager
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.
Field Summary | |
---|---|
static java.lang.String |
ELEMENT_TYPE_BINDINGS_EXT_P_NAME
Extension point name for the element type bindings extension point. |
Method Summary | |
---|---|
IClientContext |
getBinding(org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.IEditHelperAdviceDescriptor advice)
Finds the IClientContext that is bound to the advice . |
IClientContext |
getBinding(IElementType elementType)
Finds the IClientContext s that are bound to the
elementType . |
IClientContext |
getBinding(IElementTypeDescriptor elementTypeDescriptor)
Finds the IClientContext that is bound to the
elementTypeDescriptor . |
IClientContext |
getClientContext(java.lang.String contextId)
Obtains a client context by its unique identifier. |
IClientContext |
getClientContextFor(org.eclipse.emf.ecore.EObject eObject)
Obtains the client contexts to which the specified object belongs. |
java.util.Set |
getClientContexts()
Obtains all of the client contexts registered in the system. |
static IClientContext |
getDefaultClientContext()
Gets the default client context. |
static ClientContextManager |
getInstance()
Obtains the singleton instance of this class. |
void |
registerClientContext(IClientContext clientContext)
Registers the clientContext . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ELEMENT_TYPE_BINDINGS_EXT_P_NAME
Method Detail |
---|
public static final ClientContextManager getInstance()
public static final IClientContext getDefaultClientContext()
public IClientContext getClientContext(java.lang.String contextId)
contextId
- the client context ID to look for
null
if none is
registered under this IDpublic java.util.Set getClientContexts()
IClientContext
spublic IClientContext getClientContextFor(org.eclipse.emf.ecore.EObject eObject)
eObject
- a model element
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.public IClientContext getBinding(IElementTypeDescriptor elementTypeDescriptor)
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.
elementTypeDescriptor
- the element type descriptor
IClientContext
that is bound to the
elementTypeDescriptor
. May be a multi-context.public IClientContext getBinding(IElementType elementType)
IClientContext
s that are bound to the
elementType
. If there are more than one contexts bound,
returns a MultiClientContext
representing them all.
elementType
- the element type
IClientContext
that is bound to the
elementType
. May be a multi-context.public IClientContext getBinding(org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.IEditHelperAdviceDescriptor advice)
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.
elementType
- the element type
IClientContext
that is bound to the
advice
. May be a multi-context.public void registerClientContext(IClientContext clientContext)
clientContext
. Does nothing if the context
has already been registered.
clientContext
- the client context
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.