org.eclipse.gmt.umlx.editor.domain
Class AbstractEditDomain

java.lang.Object
  extended by org.eclipse.gef.EditDomain
      extended by org.eclipse.gmt.umlx.editor.domain.AbstractEditDomain
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.gef.commands.CommandStackListener, IActiveEditDomain
Direct Known Subclasses:
ActiveEditDomain

public abstract class AbstractEditDomain
extends org.eclipse.gef.EditDomain
implements IActiveEditDomain, org.eclipse.gef.commands.CommandStackListener


Constructor Summary
AbstractEditDomain()
           
 
Method Summary
<T> void
addTypedAdapter(java.lang.Class<? extends T> type, T adapter)
          Registers the adapter for the specified key.
 void commandStackChanged(java.util.EventObject event)
          When the command stack changes, the actions interested in the command stack are updated.
 void dispose()
           
 void execute(IAbstractCommand command)
           
 void execute(java.lang.Runnable runnable)
           
 java.lang.Object getAdapter(java.lang.Class type)
          Returns the adapter for the specified key.
 SharedCommandStack getCommandStack()
           
 org.eclipse.emf.ecore.EPackage getDefaultDefaultPackage()
          Return the first writeable package.
 org.eclipse.emf.ecore.resource.Resource getDefaultDefaultResource()
          Return a Resource into which orphan packages can be put.
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
           
 SharedEditDomain getSharedEditDomain()
           
 void loadDefaultTool()
           
 void setCommandStack(org.eclipse.gef.commands.CommandStack stack)
          Deprecated. 
 void setSharedEditDomainId(java.lang.String sharedEditDomainId)
           
 
Methods inherited from class org.eclipse.gef.EditDomain
addViewer, focusGained, focusLost, getActiveTool, getDefaultTool, getPaletteViewer, keyDown, keyTraversed, keyUp, mouseDoubleClick, mouseDown, mouseDrag, mouseHover, mouseMove, mouseUp, mouseWheelScrolled, nativeDragFinished, nativeDragStarted, removeViewer, setActiveTool, setDefaultTool, setPaletteRoot, setPaletteViewer, viewerEntered, viewerExited
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.editor.domain.IActiveEditDomain
createImport, getDomainEditor, getEditorPreferenceStore, getGcoreResource, getImports, getMouseLocation, getSelectionSupervisor, removeImport, updatePasteActions, updateStackActions
 

Constructor Detail

AbstractEditDomain

public AbstractEditDomain()
Method Detail

addTypedAdapter

public <T> void addTypedAdapter(java.lang.Class<? extends T> type,
                                T adapter)
Registers the adapter for the specified key.

Specified by:
addTypedAdapter in interface IActiveEditDomain

commandStackChanged

public void commandStackChanged(java.util.EventObject event)
When the command stack changes, the actions interested in the command stack are updated.

Specified by:
commandStackChanged in interface org.eclipse.gef.commands.CommandStackListener
Parameters:
event - the change event

dispose

public void dispose()
Specified by:
dispose in interface IActiveEditDomain

execute

public void execute(IAbstractCommand command)
Specified by:
execute in interface IActiveEditDomain

execute

public void execute(java.lang.Runnable runnable)
Specified by:
execute in interface IActiveEditDomain

getAdapter

public java.lang.Object getAdapter(java.lang.Class type)
Returns the adapter for the specified key.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable

getCommandStack

public SharedCommandStack getCommandStack()
Specified by:
getCommandStack in interface IActiveEditDomain
Overrides:
getCommandStack in class org.eclipse.gef.EditDomain

getDefaultDefaultPackage

public org.eclipse.emf.ecore.EPackage getDefaultDefaultPackage()
Description copied from interface: IActiveEditDomain
Return the first writeable package.

Specified by:
getDefaultDefaultPackage in interface IActiveEditDomain
Returns:
the package, null if none available

getDefaultDefaultResource

public org.eclipse.emf.ecore.resource.Resource getDefaultDefaultResource()
Description copied from interface: IActiveEditDomain
Return a Resource into which orphan packages can be put. Note that if more than one package is put in a resource the resulting Ecore file is not valid XML.

Specified by:
getDefaultDefaultResource in interface IActiveEditDomain
Returns:
the resource

getResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Specified by:
getResourceSet in interface IActiveEditDomain

getSharedEditDomain

public SharedEditDomain getSharedEditDomain()
Specified by:
getSharedEditDomain in interface IActiveEditDomain

loadDefaultTool

public void loadDefaultTool()
Overrides:
loadDefaultTool in class org.eclipse.gef.EditDomain

setCommandStack

@Deprecated
public void setCommandStack(org.eclipse.gef.commands.CommandStack stack)
Deprecated. 

Overrides:
setCommandStack in class org.eclipse.gef.EditDomain

setSharedEditDomainId

public void setSharedEditDomainId(java.lang.String sharedEditDomainId)