|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecp.internal.core.util.Element
org.eclipse.emf.ecp.spi.core.DefaultProvider
org.eclipse.emf.ecp.workspace.internal.core.WorkspaceProvider
public class WorkspaceProvider
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.emf.ecp.spi.core.InternalProvider |
---|
InternalProvider.LifecycleEvent |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecp.spi.core.util.ECPDisposable |
---|
ECPDisposable.DisposeListener |
Field Summary | |
---|---|
static String |
NAME
The Provider Name. |
static String |
PROP_ROOT_URI
Root URI Property Name. |
Fields inherited from interface org.eclipse.emf.ecp.spi.core.InternalProvider |
---|
EMF_ADAPTER_FACTORY |
Fields inherited from interface org.eclipse.emf.ecp.core.ECPProvider |
---|
TYPE |
Constructor Summary | |
---|---|
WorkspaceProvider()
Instantiates a new workspace provider. |
Method Summary | |
---|---|
void |
cloneProject(InternalProject projectToClone,
InternalProject targetProject)
This method clones a project. |
boolean |
contains(InternalProject project,
Object object)
Checks whether a specific project contains a specific object. |
org.eclipse.emf.edit.domain.EditingDomain |
createEditingDomain(InternalProject project)
This method creates an editing domain each time it is called. |
void |
delete(InternalProject project,
Collection<Object> objects)
Deletes a collection of EObjects from the model. |
void |
doSave(InternalProject project)
Convenient implementation where nothing happens. |
void |
fillChildren(ECPContainer context,
Object parent,
InternalChildrenList childrenList)
Fills the elements of a certain parent object, depending on the context into the childrenList. |
org.eclipse.emf.common.util.EList<? extends Object> |
getElements(InternalProject project)
This method returns an EList of the root elements. |
ECPContainer |
getModelContext(Object element)
Returns the first ECPContainer that can be found for the provided Object. |
org.eclipse.emf.common.notify.Notifier |
getRoot(InternalProject project)
Method checking whether an object is the root of the model container. |
void |
handleLifecycle(ECPContainer context,
InternalProvider.LifecycleEvent event)
This method is called to handle a specific life cycle. |
boolean |
hasCreateProjectWithoutRepositorySupport()
Convenient implementation that return false. |
boolean |
hasCreateRepositorySupport()
Check whether a new repository can be added to this ECPProvider. |
boolean |
isDirty(InternalProject project)
Convenient implementation where the provider saves changes of the project automatically, so a project never gets dirty. |
boolean |
isThreadSafe()
Whether it is safe to modify the EList of model elements
ot this provider. |
void |
reload(InternalProject project)
Reloads the project. |
Methods inherited from class org.eclipse.emf.ecp.spi.core.DefaultProvider |
---|
addDisposeListener, dispose, getAdapter, getAdapter, getDescription, getLabel, getLinkElements, getOpenProjects, getProvider, getType, getUIProvider, getUnsupportedEPackages, isDisposed, isSlow, modelExists, removeDisposeListener, setDescription, setLabel, setUIProvider |
Methods inherited from class org.eclipse.emf.ecp.internal.core.util.Element |
---|
compareTo, equals, getName, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPElement |
---|
getName |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
public static final String NAME
public static final String PROP_ROOT_URI
Constructor Detail |
---|
public WorkspaceProvider()
Method Detail |
---|
public void handleLifecycle(ECPContainer context, InternalProvider.LifecycleEvent event)
handleLifecycle
in interface InternalProvider
handleLifecycle
in class DefaultProvider
context
- the context to handle the lifecycle forevent
- the lifecycle event to handlepublic boolean hasCreateRepositorySupport()
DefaultProvider
hasCreateRepositorySupport
in interface ECPProvider
hasCreateRepositorySupport
in class DefaultProvider
public void fillChildren(ECPContainer context, Object parent, InternalChildrenList childrenList)
DefaultProvider
fillChildren
in interface InternalProvider
fillChildren
in class DefaultProvider
context
- the context to useparent
- the parent to read the children fromchildrenList
- the list to fillpublic org.eclipse.emf.common.util.EList<? extends Object> getElements(InternalProject project)
EList
of the root elements.
project
- the project to get the root elements for
public boolean contains(InternalProject project, Object object)
DefaultProvider
contains
in interface InternalProvider
contains
in class DefaultProvider
project
- the project to checkobject
- the object to check
public void reload(InternalProject project)
project
- the project to be reloaded.public void delete(InternalProject project, Collection<Object> objects)
project
- the project from where to deleteobjects
- the Collection
if Objects
to deletepublic void cloneProject(InternalProject projectToClone, InternalProject targetProject)
projectToClone
- the project to be clonedtargetProject
- the project to add the cloned data topublic org.eclipse.emf.common.notify.Notifier getRoot(InternalProject project)
project
- to check the root container for
Notifier
that is the model root of this projectpublic void doSave(InternalProject project)
DefaultProvider
doSave
in interface InternalProvider
doSave
in class DefaultProvider
project
- the project to savepublic boolean isDirty(InternalProject project)
DefaultProvider
isDirty
in interface InternalProvider
isDirty
in class DefaultProvider
project
- the project to check
public org.eclipse.emf.edit.domain.EditingDomain createEditingDomain(InternalProject project)
DefaultProvider
createEditingDomain
in interface InternalProvider
createEditingDomain
in class DefaultProvider
project
- the InternalProject
to create the domain for.
EditingDomain
public ECPContainer getModelContext(Object element)
DefaultProvider
ECPContainer
that can be found for the provided Object.
getModelContext
in interface ECPModelContextProvider
getModelContext
in class DefaultProvider
element
- the element to search the ECPContainer
for
ECPContainer
of this elementpublic boolean hasCreateProjectWithoutRepositorySupport()
DefaultProvider
hasCreateProjectWithoutRepositorySupport
in interface ECPProvider
hasCreateProjectWithoutRepositorySupport
in class DefaultProvider
public boolean isThreadSafe()
EList
of model elements
ot this provider.
InternalProvider.isThreadSafe()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |