public class ModelDescriptor extends org.eclipse.core.runtime.PlatformObject implements IModelDescriptor
IModelDescriptor| Modifier and Type | Field and Description |
|---|---|
protected IMetaModelDescriptor |
mmDescriptor
The meta-model descriptor.
|
protected IResourceScope |
resourceScope
The
resource scope of the model described here. |
protected IMetaModelDescriptor |
targetMMDescriptor
The target meta-model descriptor.
|
| Constructor and Description |
|---|
ModelDescriptor(IMetaModelDescriptor mmDescriptor,
IMetaModelDescriptor targetMMDescriptor,
IResourceScope resourceScope)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
belongsTo(org.eclipse.core.resources.IFile file,
boolean includeReferencedScopes)
Indicates if the given
file is part of the model identified by this model
descriptor. |
boolean |
belongsTo(org.eclipse.emf.ecore.resource.Resource resource,
boolean includeReferencedScopes)
Indicates if the given
resource is part of the model identified by this model descriptor. |
boolean |
belongsTo(org.eclipse.emf.common.util.URI uri,
boolean includeReferencedScopes)
Indicates if the given
uri is part of the model identified by this model
descriptor. |
boolean |
didBelongTo(org.eclipse.core.resources.IFile file,
boolean includeReferencedScopes)
Indicates if the given
file has been part of the model identified by this model descriptor before it was changed or deleted. |
boolean |
didBelongTo(org.eclipse.emf.ecore.resource.Resource resource,
boolean includeReferencedScopes)
Indicates if the given
resource has been part of the model identified by this
model descriptor before it was changed or deleted. |
boolean |
didBelongTo(org.eclipse.emf.common.util.URI uri,
boolean includeReferencedScopes)
if the given
uri has been part of the model identified by this model
descriptor before relative file it was changed or deleted. |
boolean |
equals(java.lang.Object object) |
org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain() |
protected IMetaModelDescriptor |
getEffectiveMetaModelDescriptor() |
java.util.Collection<org.eclipse.emf.ecore.resource.Resource> |
getLoadedResources(boolean includeReferencedScopes) |
IMetaModelDescriptor |
getMetaModelDescriptor() |
java.util.Collection<org.eclipse.core.resources.IFile> |
getPersistedFiles(boolean includeReferencedScopes) |
java.util.Collection<org.eclipse.core.resources.IResource> |
getReferencedRoots() |
java.util.Collection<org.eclipse.core.resources.IResource> |
getReferencingRoots() |
org.eclipse.core.resources.IResource |
getRoot() |
IResourceScope |
getScope() |
IMetaModelDescriptor |
getTargetMetaModelDescriptor() |
int |
hashCode() |
boolean |
isShared(org.eclipse.core.resources.IFile file)
Determines if given
file is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not. |
boolean |
isShared(org.eclipse.emf.ecore.resource.Resource resource)
Determines if given
resource is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not. |
boolean |
isShared(org.eclipse.emf.common.util.URI uri)
Determines if given
URI is shared among multiple models, i.e., can simultaneously belong to multiple
models, or not. |
java.lang.String |
toString() |
protected IMetaModelDescriptor mmDescriptor
protected IMetaModelDescriptor targetMMDescriptor
protected IResourceScope resourceScope
resource scope of the model described here.public ModelDescriptor(IMetaModelDescriptor mmDescriptor, IMetaModelDescriptor targetMMDescriptor, IResourceScope resourceScope)
mmDescriptor - The meta-model descriptor.rootProject - The root project of the described model.public IMetaModelDescriptor getMetaModelDescriptor()
getMetaModelDescriptor in interface IModelDescriptormeta-model descriptor.public IMetaModelDescriptor getTargetMetaModelDescriptor()
getTargetMetaModelDescriptor in interface IModelDescriptortarget meta-model descriptor.protected IMetaModelDescriptor getEffectiveMetaModelDescriptor()
public IResourceScope getScope()
getScope in interface IModelDescriptorresourceScope of the model described here.public org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
getEditingDomain in interface IModelDescriptorpublic org.eclipse.core.resources.IResource getRoot()
getRoot in interface IModelDescriptorresource of the model described here.public java.util.Collection<org.eclipse.core.resources.IResource> getReferencedRoots()
getReferencedRoots in interface IModelDescriptorresources constituting the model described here.public java.util.Collection<org.eclipse.core.resources.IResource> getReferencingRoots()
getReferencingRoots in interface IModelDescriptorresources referencing the model described here.public java.util.Collection<org.eclipse.core.resources.IFile> getPersistedFiles(boolean includeReferencedScopes)
getPersistedFiles in interface IModelDescriptorfile(s) that belong to this model.public java.util.Collection<org.eclipse.emf.ecore.resource.Resource> getLoadedResources(boolean includeReferencedScopes)
getLoadedResources in interface IModelDescriptorpublic boolean belongsTo(org.eclipse.core.resources.IFile file,
boolean includeReferencedScopes)
IModelDescriptorfile is part of the model identified by this model
descriptor. Criteria applied in order to know that are the following ones:
meta-model descriptor must be equal to file's one;file must be a member of the encapsulated projectproject).belongsTo in interface IModelDescriptorfile - The file that may belongs to the model.file belongs to the identified model;public boolean belongsTo(org.eclipse.emf.ecore.resource.Resource resource,
boolean includeReferencedScopes)
IModelDescriptorresource is part of the model identified by this model descriptor. Criteria applied in order to know that are the following ones:
meta-model descriptor must be equal to file's one;file must be a member of the encapsulated projectproject).belongsTo in interface IModelDescriptorresource - The resource that may belongs to the model.file belongs to the identified model;public boolean belongsTo(org.eclipse.emf.common.util.URI uri,
boolean includeReferencedScopes)
IModelDescriptoruri is part of the model identified by this model
descriptor. Criteria applied in order to know that are the following ones:
meta-model descriptor must be equal to file's one;file must be a member of the encapsulated projectproject).belongsTo in interface IModelDescriptoruri - The uri that may belongs to the model.uri belongs to the identified model;public boolean didBelongTo(org.eclipse.core.resources.IFile file,
boolean includeReferencedScopes)
IModelDescriptorfile has been part of the model identified by this model descriptor before it was changed or deleted. Criteria applied in order to know that are the following
ones:
meta-model descriptor must be equal to file's old
meta-model descriptor;file must be a member of the encapsulated projectproject).file that may belongs to the model.didBelongTo in interface IModelDescriptorfile belongs to the identified model;public boolean didBelongTo(org.eclipse.emf.ecore.resource.Resource resource,
boolean includeReferencedScopes)
IModelDescriptorresource has been part of the model identified by this
model descriptor before it was changed or deleted. Criteria applied in order to know
that are the following ones:
meta-model descriptor must be equal to resource's
old meta-model descriptor;didBelongTo in interface IModelDescriptorresource belongs to the identified
model;public boolean didBelongTo(org.eclipse.emf.common.util.URI uri,
boolean includeReferencedScopes)
IModelDescriptoruri has been part of the model identified by this model
descriptor before relative file it was changed or deleted. Criteria applied in order to know that are the
following ones:
meta-model descriptor must be equal to uri's old
meta-model descriptor;uri must point on a member of the encapsulated projectproject).didBelongTo in interface IModelDescriptoruri point on an element that belongs to the
identified model;public boolean isShared(org.eclipse.core.resources.IFile file)
IModelDescriptorfile is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not.isShared in interface IModelDescriptorfile - The file to be investigated.true if given file is shared across multiple models, or false otherwise.public boolean isShared(org.eclipse.emf.ecore.resource.Resource resource)
IModelDescriptorresource is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not.isShared in interface IModelDescriptortrue if given resource is shared across multiple models, or false otherwise.public boolean isShared(org.eclipse.emf.common.util.URI uri)
IModelDescriptorURI is shared among multiple models, i.e., can simultaneously belong to multiple
models, or not.isShared in interface IModelDescriptortrue if the resource behind given URI is shared across multiple models, or
false otherwise.public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object