Package org.eclipse.emf.ecp.spi.core
Interface InternalProject
-
- All Superinterfaces:
java.lang.Cloneable
,java.lang.Comparable<ECPElement>
,ECPContainer
,ECPElement
,ECPProject
,ECPProjectAware
,ECPPropertiesAware
,ECPProviderAware
,ECPRepositoryAware
,org.eclipse.emf.edit.domain.IEditingDomainProvider
,PropertiesStore.StorableElement
- All Known Implementing Classes:
ECPProjectImpl
public interface InternalProject extends ECPProject, ECPProjectAware, PropertiesStore.StorableElement, java.lang.Cloneable
- Since:
- 1.1
- Author:
- Eike Stepper, Eugen Neufeld
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emf.ecp.core.ECPProject
TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description InternalProject
clone(java.lang.String name)
This method clones a project.boolean
contains(java.lang.Object object)
Check whether a project contains an Object.InternalProvider
getProvider()
This method returns the provider of this project.java.lang.Object
getProviderSpecificData()
This method returns the provider specific data of this project.java.util.Iterator<org.eclipse.emf.ecore.EObject>
getReferenceCandidates(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference)
Get all possibleEObject
s from the provider to which a reference can be added from a certainEObject
based on the type of theEReference
.InternalRepository
getRepository()
This method returns the repository this project is shared on.java.util.Set<org.eclipse.emf.ecore.EPackage>
getUnsupportedEPackages()
Returns a collection ofEPackage
s which are not supported by the provider.java.util.Set<org.eclipse.emf.ecore.EClass>
getVisibleEClasses()
Get the currently visibleEClass
es.java.util.Set<org.eclipse.emf.ecore.EPackage>
getVisiblePackages()
Get the currently visibleEPackage
s.boolean
isModelRoot(java.lang.Object object)
This method checks whether the provided object is the model root of the project.void
notifyObjectsChanged(java.util.Collection<java.lang.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 aInternalProvider.LifecycleEvent
of this project.void
saveProperties()
Deprecated.As of 1.1 properties are saved automatically when they're changed.void
setProviderSpecificData(java.lang.Object data)
This method sets the provider specific data of this project.void
setVisibleEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> visibleEClasses)
Set the visibleEClass
es.void
setVisiblePackages(java.util.Set<org.eclipse.emf.ecore.EPackage> visiblePackages)
Set the visibleEPackage
s.void
undispose(InternalRepository repository)
This method undisposes the project based on a repository.-
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPContainer
canDelete, delete
-
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPElement
getName
-
Methods inherited from interface org.eclipse.emf.ecp.core.ECPProject
close, deleteElements, getContents, hasDirtyContents, isOpen, open, saveContents
-
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPProjectAware
getProject
-
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPPropertiesAware
getProperties
-
Methods inherited from interface org.eclipse.emf.edit.domain.IEditingDomainProvider
getEditingDomain
-
Methods inherited from interface org.eclipse.emf.ecp.internal.core.util.PropertiesStore.StorableElement
isStorable, write
-
-
-
-
Method Detail
-
getRepository
InternalRepository getRepository()
This method returns the repository this project is shared on.- Specified by:
getRepository
in interfaceECPRepositoryAware
- Returns:
- the repository of this project or null if not shared
-
getProvider
InternalProvider getProvider()
This method returns the provider of this project.- Specified by:
getProvider
in interfaceECPProviderAware
- Returns:
- the provider of this project
-
getProviderSpecificData
java.lang.Object getProviderSpecificData()
This method returns the provider specific data of this project.- Returns:
- the provider specific data of this project
-
setProviderSpecificData
void setProviderSpecificData(java.lang.Object data)
This method sets the provider specific data of this project.- Parameters:
data
- the provider specific data of this project
-
notifyObjectsChanged
void notifyObjectsChanged(java.util.Collection<java.lang.Object> objects, boolean structural)
This method is a callback for the provider to notify the project about changes.- Parameters:
objects
- the objects that have changedstructural
- if the changes where structural (e.g. delete)
-
undispose
void undispose(InternalRepository repository)
This method undisposes the project based on a repository.- Parameters:
repository
- the repository
-
notifyProvider
void notifyProvider(InternalProvider.LifecycleEvent event)
This method is used to notify the provider about aInternalProvider.LifecycleEvent
of this project.- Parameters:
event
- to pass to the provider
-
clone
InternalProject clone(java.lang.String name)
This method clones a project.- Parameters:
name
- the name of the project to create- Returns:
- the cloned project
-
saveProperties
@Deprecated void saveProperties()
Deprecated.As of 1.1 properties are saved automatically when they're changed.Saves the properties, such as visible packages or the name of the project into the workspace.
-
getReferenceCandidates
java.util.Iterator<org.eclipse.emf.ecore.EObject> getReferenceCandidates(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference eReference)
Get all possibleEObject
s from the provider to which a reference can be added from a certainEObject
based on the type of theEReference
.- Parameters:
eObject
- - theEObject
for which the reference should be set.eReference
- - theEReference
to be set.- Returns:
Iterator
over allEObject
that can be added as a reference
-
isModelRoot
boolean isModelRoot(java.lang.Object object)
This method checks whether the provided object is the model root of the project.- Parameters:
object
- the object to check- Returns:
- true if the object is the root of the model of this project, false otherwise
-
getUnsupportedEPackages
java.util.Set<org.eclipse.emf.ecore.EPackage> getUnsupportedEPackages()
Returns a collection ofEPackage
s which are not supported by the provider. EObjects from these packages cannot be created within the project.- Returns:
Collection
of unsupportedEPackage
s
-
setVisiblePackages
void setVisiblePackages(java.util.Set<org.eclipse.emf.ecore.EPackage> visiblePackages)
Set the visibleEPackage
s. New model elements can only be created fromEPackage
s contained in the visiblePackages and thesetVisibleEClasses(Set)
.- Parameters:
visiblePackages
- theEPackage
s to be visible
-
getVisiblePackages
java.util.Set<org.eclipse.emf.ecore.EPackage> getVisiblePackages()
Get the currently visibleEPackage
s. If no filter is set, then allEPackage
s supported by the provider are returned.- Returns:
Set
ofEPackage
s that should be available, or all supported EPackages
-
getVisibleEClasses
java.util.Set<org.eclipse.emf.ecore.EClass> getVisibleEClasses()
Get the currently visibleEClass
es. If no visibleEClass
es are set, then an emptySet
is returned.- Returns:
Set
ofEClass
es that should be available, or empty.
-
setVisibleEClasses
void setVisibleEClasses(java.util.Set<org.eclipse.emf.ecore.EClass> visibleEClasses)
Set the visibleEClass
es.- Parameters:
visibleEClasses
- the classes that should be available
-
contains
boolean contains(java.lang.Object object)
Check whether a project contains an Object.- Parameters:
object
- the object to check for containment- Returns:
- true if the object is in the project, false otherwise
-
-