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

java.lang.Object
  extended by org.eclipse.gmt.umlx.editor.domain.SharedEditDomain
All Implemented Interfaces:
IModelChangeListener

public class SharedEditDomain
extends java.lang.Object
implements IModelChangeListener

A SharedEditDomain instance manages the SharedResourceSet and SharedCommandStack that are shared by multiple (possiblythemseelves multi-sheet) editors that reference common Ecore resources, for which independent Undo sequencing for each editor is not supported.


Nested Class Summary
 class SharedEditDomain.ResourceSetListener
           
 
Method Summary
 void attach(IActiveEditDomain editDomain)
           
static java.lang.String createDomainId(java.lang.String string)
           
 org.eclipse.emf.ecore.resource.Resource createResource(EcoreURI ecoreURI, org.eclipse.emf.ecore.EObject contents)
           
 void detach(IActiveEditDomain editDomain)
           
 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.
static SharedEditDomain getDomain(java.lang.String domainId)
           
static int getDomainCount()
           
 java.lang.String getDomainId()
           
static java.lang.String getFilePath(java.lang.String domainId)
           
 org.eclipse.emf.ecore.resource.Resource getResource(GImport gImport)
           
 org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
           
static int getUriUsageCount()
           
 boolean isDirty()
          Returns true if any resource is modified
 void modelChanged(org.eclipse.emf.common.notify.Notification notification)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createDomainId

public static java.lang.String createDomainId(java.lang.String string)

getDomain

public static SharedEditDomain getDomain(java.lang.String domainId)

getDomainCount

public static int getDomainCount()

getFilePath

public static java.lang.String getFilePath(java.lang.String domainId)

getUriUsageCount

public static int getUriUsageCount()

attach

public void attach(IActiveEditDomain editDomain)

createResource

public org.eclipse.emf.ecore.resource.Resource createResource(EcoreURI ecoreURI,
                                                              org.eclipse.emf.ecore.EObject contents)

detach

public void detach(IActiveEditDomain editDomain)

getCommandStack

public SharedCommandStack getCommandStack()

getDefaultDefaultPackage

public org.eclipse.emf.ecore.EPackage getDefaultDefaultPackage()
Return the first writeable package.

Returns:
the package, null if none available

getDefaultDefaultResource

public org.eclipse.emf.ecore.resource.Resource getDefaultDefaultResource()
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.

Returns:
the resource

getDomainId

public java.lang.String getDomainId()

getResource

public org.eclipse.emf.ecore.resource.Resource getResource(GImport gImport)

getResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()

isDirty

public boolean isDirty()
Returns true if any resource is modified

See Also:
ISaveablePart.isDirty()

modelChanged

public void modelChanged(org.eclipse.emf.common.notify.Notification notification)
Specified by:
modelChanged in interface IModelChangeListener

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object