|
|||||||||
| 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.internal.core.util.PropertiesElement
org.eclipse.emf.ecp.internal.core.ECPProjectImpl
public final class ECPProjectImpl
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.emf.ecp.core.ECPProject |
|---|
TYPE |
| Constructor Summary | |
|---|---|
ECPProjectImpl(ECPRepository repository,
String name,
ECPProperties properties)
Constructor used when an online project is created. |
|
ECPProjectImpl(InternalProvider provider,
String name,
ECPProperties properties)
Constructor used when an offline project is created. |
|
ECPProjectImpl(ObjectInput in)
Constructor used to load persisted projects on startup. |
|
| Method Summary | |
|---|---|
boolean |
canDelete()
Whether this instance can be deleted or not. |
InternalProject |
clone(String name)
This method clones a project. |
void |
close()
This closes an opened object. |
boolean |
contains(Object object)
Check whether a project contains an Object. |
void |
delete()
Deletes the current instance. |
void |
deleteElements(Collection<Object> objects)
Deletes a collection of Objects by delegating the task to the provider. |
void |
disposed(ECPDisposable disposable)
Callback method being used to notify listeners about a dispose. |
Object |
getAdapter(Class adapterType)
Returns an object which is an instance of the given class associated with this object. |
org.eclipse.emf.common.util.EList<Object> |
getContents()
Returns the list of the direct content objects; each is of type Object. |
org.eclipse.emf.edit.domain.EditingDomain |
getEditingDomain()
|
InternalProject |
getProject()
This returns the project this object belongs to or references in any way. |
InternalProvider |
getProvider()
This method returns the provider of this project. |
Object |
getProviderSpecificData()
This method returns the provider specific data of this project. |
Iterator<org.eclipse.emf.ecore.EObject> |
getReferenceCandidates(org.eclipse.emf.ecore.EObject modelElement,
org.eclipse.emf.ecore.EReference eReference)
Get all possible EObjects from the provider to which a reference can be added from a certain
EObject based
on the type of the EReference. |
InternalRepository |
getRepository()
This method returns the repository this project is shared on. |
String |
getType()
This return the type of the object. |
Set<org.eclipse.emf.ecore.EPackage> |
getUnsupportedEPackages()
Returns a collection of EPackages which are not supported by the provider. |
Set<org.eclipse.emf.ecore.EClass> |
getVisibleEClasses()
Get the currently visible EClasses. |
Set<org.eclipse.emf.ecore.EPackage> |
getVisiblePackages()
Get the currently visible EPackages. |
boolean |
hasDirtyContents()
Checks whether the model, associated with this project is dirty. |
boolean |
isModelRoot(Object object)
This method checks whether the provided object is the model root of the project. |
boolean |
isOpen()
Whether an object is open or not. |
boolean |
isStorable()
|
void |
notifyObjectsChanged(Collection<Object> objects,
boolean structural)
This method is a callback for the provider to notify the project about changes. |
void |
notifyProvider(InternalProvider.LifecycleEvent event)
This method is used to notify the provider about a InternalProvider.LifecycleEvent of this project. |
void |
open()
This opens a closed object. |
void |
saveContents()
Saves the currently pending changes of the model. |
void |
saveProperties()
Deprecated. |
void |
setProviderSpecificData(Object providerSpecificData)
This method sets the provider specific data of this project. |
void |
setVisibleEClasses(Set<org.eclipse.emf.ecore.EClass> filteredEClasses)
Set the visible EClasses. |
void |
setVisiblePackages(Set<org.eclipse.emf.ecore.EPackage> filteredPackages)
Set the visible EPackages. |
void |
undispose(InternalRepository repository)
This method undisposes the project based on a repository. |
void |
write(ObjectOutput out)
|
| Methods inherited from class org.eclipse.emf.ecp.internal.core.util.PropertiesElement |
|---|
getProperties |
| 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 |
| Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPPropertiesAware |
|---|
getProperties |
| Constructor Detail |
|---|
public ECPProjectImpl(InternalProvider provider,
String name,
ECPProperties properties)
provider - the InternalProvider of this projectname - the name of the projectproperties - the properties of the project
public ECPProjectImpl(ECPRepository repository,
String name,
ECPProperties properties)
repository - the ECPRepository of this projectname - the name of the projectproperties - the properties of the project
public ECPProjectImpl(ObjectInput in)
throws IOException
in - the ObjectInput to parse
IOException - is thrown when file can't be read.| Method Detail |
|---|
public void write(ObjectOutput out)
throws IOException
PropertiesElement
write in interface PropertiesStore.StorableElementwrite in class PropertiesElementIOExceptionpublic String getType()
getType in class Elementpublic void disposed(ECPDisposable disposable)
disposed in interface ECPDisposable.DisposeListenerdisposable - the object being disposedpublic boolean isStorable()
isStorable in interface PropertiesStore.StorableElementpublic InternalProject getProject()
getProject in interface ECPProjectAwareECPProjectpublic InternalRepository getRepository()
getRepository in interface ECPRepositoryAwaregetRepository in interface InternalProjectpublic InternalProvider getProvider()
getProvider in interface ECPProviderAwaregetProvider in interface InternalProjectpublic Object getProviderSpecificData()
getProviderSpecificData in interface InternalProjectpublic void setProviderSpecificData(Object providerSpecificData)
setProviderSpecificData in interface InternalProjectproviderSpecificData - the provider specific data of this project
public void notifyObjectsChanged(Collection<Object> objects,
boolean structural)
notifyObjectsChanged in interface InternalProjectobjects - the objects that have changedstructural - if the changes where structural (e.g. delete)public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
getEditingDomain in interface org.eclipse.emf.edit.domain.IEditingDomainProviderpublic 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).
adapterType - the class to adapt to
nullIAdaptable#getAdapter(Class)public boolean canDelete()
canDelete in interface ECPContainerpublic void delete()
delete in interface ECPContainerpublic boolean isOpen()
isOpen in interface ECPProjectpublic void open()
open in interface ECPProjectpublic void close()
close in interface ECPProjectpublic void notifyProvider(InternalProvider.LifecycleEvent event)
InternalProvider.LifecycleEvent of this project.
notifyProvider in interface InternalProjectevent - to pass to the providerpublic void undispose(InternalRepository repository)
undispose in interface InternalProjectrepository - the repositorypublic org.eclipse.emf.common.util.EList<Object> getContents()
getContents in interface ECPProjectObjectpublic Set<org.eclipse.emf.ecore.EPackage> getUnsupportedEPackages()
EPackages which are not supported by the provider. EObjects from these packages
cannot be created within the project.
getUnsupportedEPackages in interface InternalProjectCollection of unsupported EPackagespublic void setVisiblePackages(Set<org.eclipse.emf.ecore.EPackage> filteredPackages)
EPackages. New model elements can only be created from EPackages contained in
the visiblePackages and the InternalProject.setVisibleEClasses(Set).
setVisiblePackages in interface InternalProjectfilteredPackages - the EPackages to be visiblepublic Set<org.eclipse.emf.ecore.EPackage> getVisiblePackages()
EPackages. If no filter is set, then all EPackages supported by the
provider are returned.
getVisiblePackages in interface InternalProjectSet of EPackages that should be available, or all supported EPackagespublic Set<org.eclipse.emf.ecore.EClass> getVisibleEClasses()
EClasses. If no visible EClasses are set, then an empty Set is
returned.
getVisibleEClasses in interface InternalProjectSet of EClasses that should be available, or empty.public void setVisibleEClasses(Set<org.eclipse.emf.ecore.EClass> filteredEClasses)
EClasses.
setVisibleEClasses in interface InternalProjectfilteredEClasses - the classes that should be available
public Iterator<org.eclipse.emf.ecore.EObject> getReferenceCandidates(org.eclipse.emf.ecore.EObject modelElement,
org.eclipse.emf.ecore.EReference eReference)
EObjects from the provider to which a reference can be added from a certain
EObject based
on the type of the EReference.
getReferenceCandidates in interface InternalProjectmodelElement - - the EObject for which the reference should be set.eReference - - the EReference to be set.
Iterator over all EObject that can be added as a referencepublic void saveContents()
saveContents in interface ECPProjectpublic boolean hasDirtyContents()
hasDirtyContents in interface ECPProjectpublic void deleteElements(Collection<Object> objects)
Objects by delegating the task to the provider.
deleteElements in interface ECPProjectobjects - the collection of Objects to deletepublic InternalProject clone(String name)
clone in interface InternalProjectname - the name of the project to create
@Deprecated public void saveProperties()
saveProperties in interface InternalProjectpublic boolean isModelRoot(Object object)
isModelRoot in interface InternalProjectobject - the object to check
public boolean contains(Object object)
contains in interface InternalProjectobject - the object to check for containment
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||