|
|||||||||
| 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
public abstract class DefaultProvider
| 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 |
|---|
| 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 |
| Method Summary | ||
|---|---|---|
void |
addDisposeListener(ECPDisposable.DisposeListener listener)
Adds a ECPDisposable.DisposeListener to this instance. |
|
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 |
dispose()
Disposes the current instance. |
|
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. |
|
Object |
getAdapter(Class adapterType)
Returns an object which is an instance of the given class associated with this object. |
|
|
getAdapter(Object adaptable,
Class<T> adapterType)
|
|
String |
getDescription()
Return the description. |
|
String |
getLabel()
Label of the ECPProvider. |
|
Iterator<org.eclipse.emf.ecore.EObject> |
getLinkElements(InternalProject project,
org.eclipse.emf.ecore.EObject modelElement,
org.eclipse.emf.ecore.EReference eReference)
Convenient implementation of the getLinkElements(InternalProject, EObject, EReference) method to use the
ItemPropertyDescriptor to get all object of an object. |
|
ECPContainer |
getModelContext(Object element)
Returns the first ECPContainer that can be found for the provided Object. |
|
Set<InternalProject> |
getOpenProjects()
Array of all ECPProjects based on this ECPProvider which are open. |
|
InternalProvider |
getProvider()
The Provider this class references in any way. |
|
String |
getType()
This return the type of the object. |
|
AdapterProvider |
getUIProvider()
Allows access of the corresponding UI Adapter. |
|
Set<org.eclipse.emf.ecore.EPackage> |
getUnsupportedEPackages(Collection<org.eclipse.emf.ecore.EPackage> packages,
InternalRepository repository)
Convenient implementation of the getUnsupportedEPackages(Collection,InternalRepository) method to return
an empty list. |
|
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 |
isDisposed()
Whether this instance is already disposed. |
|
boolean |
isSlow(Object parent)
Whether this provider is slow or not. |
|
boolean |
modelExists(InternalProject project)
Convenient implementation that return true during this check. |
|
void |
removeDisposeListener(ECPDisposable.DisposeListener listener)
Removed a ECPDisposable.DisposeListener from this instance. |
|
void |
setDescription(String description)
Sets the description. |
|
void |
setLabel(String label)
Sets the label. |
|
void |
setUIProvider(AdapterProvider uiProvider)
Allows to set the uiProvider. |
|
| 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.spi.core.InternalProvider |
|---|
cloneProject, delete, getElements, getRoot, isThreadSafe |
| Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPElement |
|---|
getName |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
public final String getType()
getType in class Elementpublic final InternalProvider getProvider()
getProvider in interface ECPProviderAwareECPProviderpublic final String getLabel()
getLabel in interface ECPProvidergetLabel in interface InternalRegistryElementpublic final void setLabel(String label)
setLabel in interface InternalRegistryElementlabel - the Label to setpublic final String getDescription()
getDescription in interface InternalRegistryElementpublic final void setDescription(String description)
setDescription in interface InternalRegistryElementdescription - the Description to setpublic final AdapterProvider getUIProvider()
getUIProvider in interface InternalProviderpublic final void setUIProvider(AdapterProvider uiProvider)
setUIProvider in interface InternalProvideruiProvider - the uiProvider to setpublic final Set<InternalProject> getOpenProjects()
getOpenProjects in interface InternalProviderpublic final boolean isDisposed()
isDisposed in interface ECPDisposablepublic final void dispose()
dispose in interface ECPDisposablepublic final void addDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener to this instance.
addDisposeListener in interface ECPDisposablelistener - the listener to addpublic final void removeDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener from this instance.
removeDisposeListener in interface ECPDisposablelistener - the listener to remove
public <T> T getAdapter(Object adaptable,
Class<T> adapterType)
getAdapter in interface AdapterProviderpublic Object getAdapter(Class adapterType)
null
if
no such object can be found.
This implementation of the method declared by IAdaptable passes the request along to the platform's
adapter manager; roughly Platform.getAdapterManager().getAdapter(this, adapter). Subclasses may
override this method (however, if they do so, they should invoke the method on their superclass to ensure that
the Platform's adapter manager is consulted).
getAdapter in interface org.eclipse.core.runtime.IAdaptableadapterType - the class to adapt to
nullIAdaptable.getAdapter(Class)public org.eclipse.emf.edit.domain.EditingDomain createEditingDomain(InternalProject project)
createEditingDomain in interface InternalProviderproject - the InternalProject to create the domain for.
EditingDomainpublic boolean hasCreateRepositorySupport()
hasCreateRepositorySupport in interface ECPProviderpublic boolean isSlow(Object parent)
isSlow in interface InternalProviderparent - to check
public ECPContainer getModelContext(Object element)
ECPContainer that can be found for the provided Object.
getModelContext in interface ECPModelContextProviderelement - the element to search the ECPContainer for
ECPContainer of this element
public void fillChildren(ECPContainer context,
Object parent,
InternalChildrenList childrenList)
fillChildren in interface InternalProvidercontext - the context to useparent - the parent to read the children fromchildrenList - the list to fill
public void handleLifecycle(ECPContainer context,
InternalProvider.LifecycleEvent event)
handleLifecycle in interface InternalProvidercontext - the context to handle the lifecycle forevent - the lifecycle event to handle
public Set<org.eclipse.emf.ecore.EPackage> getUnsupportedEPackages(Collection<org.eclipse.emf.ecore.EPackage> packages,
InternalRepository repository)
getUnsupportedEPackages(Collection,InternalRepository) method to return
an empty list. The
provider has to Override this method if not all EPackages are supported.
getUnsupportedEPackages in interface InternalProviderpackages - available packagesrepository - the repository to check
Collection of EPackages unsupported by this provider for the specified
repository
public Iterator<org.eclipse.emf.ecore.EObject> getLinkElements(InternalProject project,
org.eclipse.emf.ecore.EObject modelElement,
org.eclipse.emf.ecore.EReference eReference)
getLinkElements(InternalProject, EObject, EReference) method to use the
ItemPropertyDescriptor to get all object of an object.
getLinkElements in interface InternalProviderproject - the project the call is frommodelElement - EObject to add the EReference toeReference - the EReference to add
Iterator of EObject that can be linkedpublic void doSave(InternalProject project)
doSave in interface InternalProviderproject - the project to savepublic boolean isDirty(InternalProject project)
isDirty in interface InternalProviderproject - the project to check
public boolean modelExists(InternalProject project)
modelExists in interface InternalProviderproject - the project to check
public boolean hasCreateProjectWithoutRepositorySupport()
hasCreateProjectWithoutRepositorySupport in interface ECPProvider
public boolean contains(InternalProject project,
Object object)
contains in interface InternalProviderproject - the project to checkobject - the object to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||