Modelers

org.topcased.modeler.extensions
Class DiagramsManager

java.lang.Object
  extended by AbstractExtensionManager
      extended by org.topcased.modeler.extensions.DiagramsManager

public final class DiagramsManager
extends AbstractExtensionManager

Class that stores the diagrams registered with the diagrams extension point.


Method Summary
protected  void addExtension(org.eclipse.core.runtime.IExtension extension)
           
 DiagramDescriptor find(java.lang.String id)
          Find a descriptor in the registry.
 IConfiguration getConfiguration(java.lang.String id)
          Returns the Diagram configuration for the given id.
 DiagramDescriptor[] getDiagrams()
          Get an enumeration of diagram descriptors.
 DiagramDescriptor[] getDiagrams(EObject containerEObject, java.lang.String editorID)
          Get an enumeration of diagram descriptors that can be associated with the given model object
static DiagramsManager getInstance()
          Get the shared instance.
protected  void removeExtension(org.eclipse.core.runtime.IExtension extension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DiagramsManager getInstance()
Get the shared instance.

Returns:
the diagrams manager

getConfiguration

public IConfiguration getConfiguration(java.lang.String id)
                                throws org.eclipse.core.runtime.CoreException
Returns the Diagram configuration for the given id.

Parameters:
id - the diagram id
Returns:
the configuration. If no DiagramDescriptor is associated with this ID, throw a RuntimeException.
Throws:
org.eclipse.core.runtime.CoreException - is the class does not exist or cannot be loaded

find

public DiagramDescriptor find(java.lang.String id)
Find a descriptor in the registry.

Parameters:
id - the searched diagram id
Returns:
the diagram or null if not found

getDiagrams

public DiagramDescriptor[] getDiagrams()
Get an enumeration of diagram descriptors.

Returns:
The registered diagrams

getDiagrams

public DiagramDescriptor[] getDiagrams(EObject containerEObject,
                                       java.lang.String editorID)
Get an enumeration of diagram descriptors that can be associated with the given model object

Parameters:
containerEObject - the model object
Returns:
The registered diagrams

addExtension

protected void addExtension(org.eclipse.core.runtime.IExtension extension)
See Also:
org.topcased.facilities.extensions.AbstractExtensionManager#addExtension(org.eclipse.core.runtime.IExtension)

removeExtension

protected void removeExtension(org.eclipse.core.runtime.IExtension extension)
See Also:
org.topcased.facilities.extensions.AbstractExtensionManager#removeExtension(org.eclipse.core.runtime.IExtension)

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.