public class WorkspaceProvider extends DefaultProvider
InternalProvider.LifecycleEventECPDisposable.DisposeListener| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
The Provider Name.
|
static String |
PROP_ROOT_URI
Root URI Property Name.
|
static String |
VIRTUAL_ROOT_URI
Constant which is used to indicated the the
root uri is not existing yet. |
EMF_ADAPTER_FACTORYTYPE| Constructor and Description |
|---|
WorkspaceProvider()
Instantiates a new workspace provider.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
doDelete(InternalProject project,
Collection<Object> objects)
Executes the delete opertation.
|
protected void |
doDispose()
This method is called when a provider is disposed.
|
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.
|
addDisposeListener, createCommandStack, delete, dispose, getAdapter, getAdapter, getDescription, getLabel, getLinkElements, getModelContextFromAdapter, getOpenProjects, getProvider, getType, getUIProvider, getUnsupportedEPackages, isDisposed, isSlow, modelExists, notifyProviderChangeListeners, registerChangeListener, removeDisposeListener, setDescription, setLabel, setUIProvider, unregisterChangeListenercompareTo, equals, getName, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNamecompareTopublic static final String NAME
public static final String PROP_ROOT_URI
public static final String VIRTUAL_ROOT_URI
root uri is not existing yet.public WorkspaceProvider()
public void handleLifecycle(ECPContainer context, InternalProvider.LifecycleEvent event)
handleLifecycle in interface InternalProviderhandleLifecycle in class DefaultProvidercontext - the context to handle the lifecycle forevent - the lifecycle event to handleprotected void doDispose()
DefaultProviderdoDispose in class DefaultProviderpublic boolean hasCreateRepositorySupport()
DefaultProviderhasCreateRepositorySupport in interface ECPProviderhasCreateRepositorySupport in class DefaultProviderpublic void fillChildren(ECPContainer context, Object parent, InternalChildrenList childrenList)
DefaultProviderfillChildren in interface InternalProviderfillChildren in class DefaultProvidercontext - 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 forpublic boolean contains(InternalProject project, Object object)
DefaultProvidercontains in interface InternalProvidercontains in class DefaultProviderproject - the project to checkobject - the object to checkpublic void reload(InternalProject project)
project - the project to be reloaded.public 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 forNotifier that is the model root of this projectpublic void doSave(InternalProject project)
DefaultProviderdoSave in interface InternalProviderdoSave in class DefaultProviderproject - the project to savepublic boolean isDirty(InternalProject project)
DefaultProviderisDirty in interface InternalProviderisDirty in class DefaultProviderproject - the project to checkpublic org.eclipse.emf.edit.domain.EditingDomain createEditingDomain(InternalProject project)
DefaultProvidercreateEditingDomain in interface InternalProvidercreateEditingDomain in class DefaultProviderproject - the InternalProject to create the domain for.EditingDomainpublic ECPContainer getModelContext(Object element)
DefaultProviderECPContainer that can be found for the provided Object.getModelContext in interface ECPModelContextProvidergetModelContext in class DefaultProviderelement - the element to search the ECPContainer forECPContainer of this elementpublic boolean hasCreateProjectWithoutRepositorySupport()
DefaultProviderhasCreateProjectWithoutRepositorySupport in interface ECPProviderhasCreateProjectWithoutRepositorySupport in class DefaultProviderpublic boolean isThreadSafe()
EList of model elements
ot this provider.InternalProvider.isThreadSafe()public void doDelete(InternalProject project, Collection<Object> objects)
doDelete in class DefaultProviderproject - the project from where to deleteobjects - the Collection if Objects to deleteDefaultProvider.doDelete(org.eclipse.emf.ecp.spi.core.InternalProject,
java.util.Collection)Copyright © 2019. All rights reserved.