Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.emf.type.core
Class ClientContextManager

java.lang.Object
  extended by 
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.


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 IClientContexts 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

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
Method Detail

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 IClientContexts

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 IClientContexts 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

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire