|
|||||||||
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 Element
public final InternalProvider getProvider()
getProvider
in interface ECPProviderAware
ECPProvider
public final String getLabel()
getLabel
in interface ECPProvider
getLabel
in interface InternalRegistryElement
public final void setLabel(String label)
setLabel
in interface InternalRegistryElement
label
- the Label to setpublic final String getDescription()
getDescription
in interface InternalRegistryElement
public final void setDescription(String description)
setDescription
in interface InternalRegistryElement
description
- the Description to setpublic final AdapterProvider getUIProvider()
getUIProvider
in interface InternalProvider
public final void setUIProvider(AdapterProvider uiProvider)
setUIProvider
in interface InternalProvider
uiProvider
- the uiProvider to setpublic final Set<InternalProject> getOpenProjects()
getOpenProjects
in interface InternalProvider
public final boolean isDisposed()
isDisposed
in interface ECPDisposable
public final void dispose()
dispose
in interface ECPDisposable
public final void addDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener
to this instance.
addDisposeListener
in interface ECPDisposable
listener
- the listener to addpublic final void removeDisposeListener(ECPDisposable.DisposeListener listener)
ECPDisposable.DisposeListener
from this instance.
removeDisposeListener
in interface ECPDisposable
listener
- the listener to removepublic <T> T getAdapter(Object adaptable, Class<T> adapterType)
getAdapter
in interface AdapterProvider
public 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.IAdaptable
adapterType
- the class to adapt to
null
IAdaptable.getAdapter(Class)
public org.eclipse.emf.edit.domain.EditingDomain createEditingDomain(InternalProject project)
createEditingDomain
in interface InternalProvider
project
- the InternalProject
to create the domain for.
EditingDomain
public boolean hasCreateRepositorySupport()
hasCreateRepositorySupport
in interface ECPProvider
public boolean isSlow(Object parent)
isSlow
in interface InternalProvider
parent
- to check
public ECPContainer getModelContext(Object element)
ECPContainer
that can be found for the provided Object.
getModelContext
in interface ECPModelContextProvider
element
- the element to search the ECPContainer
for
ECPContainer
of this elementpublic void fillChildren(ECPContainer context, Object parent, InternalChildrenList childrenList)
fillChildren
in interface InternalProvider
context
- the context to useparent
- the parent to read the children fromchildrenList
- the list to fillpublic void handleLifecycle(ECPContainer context, InternalProvider.LifecycleEvent event)
handleLifecycle
in interface InternalProvider
context
- the context to handle the lifecycle forevent
- the lifecycle event to handlepublic 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 EPackage
s are supported.
getUnsupportedEPackages
in interface InternalProvider
packages
- available packagesrepository
- the repository to check
Collection
of EPackages
unsupported by this provider for the specified
repositorypublic 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 InternalProvider
project
- 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 InternalProvider
project
- the project to savepublic boolean isDirty(InternalProject project)
isDirty
in interface InternalProvider
project
- the project to check
public boolean modelExists(InternalProject project)
modelExists
in interface InternalProvider
project
- the project to check
public boolean hasCreateProjectWithoutRepositorySupport()
hasCreateProjectWithoutRepositorySupport
in interface ECPProvider
public boolean contains(InternalProject project, Object object)
contains
in interface InternalProvider
project
- the project to checkobject
- the object to check
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |