public interface IFileMetaModelDescriptorCache
Modifier and Type | Method and Description |
---|---|
void |
addDescriptor(org.eclipse.core.resources.IFile file,
IMetaModelDescriptor mmDescriptor)
|
void |
clearOldDescriptors()
Clears cached old
meta-model descriptor s. |
void |
moveDescriptor(org.eclipse.core.resources.IFile oldFile,
org.eclipse.core.resources.IFile newFile)
|
void |
removeDescriptor(org.eclipse.core.resources.IFile file)
Removes cached
meta-model descriptor for given file . |
void addDescriptor(org.eclipse.core.resources.IFile file, IMetaModelDescriptor mmDescriptor)
file
- The file
for the whom meta-model descriptor
need to be
registered.mmDescriptor
- The meta-model descriptor
to register for the given file
.#getDescriptor(IFile)
void moveDescriptor(org.eclipse.core.resources.IFile oldFile, org.eclipse.core.resources.IFile newFile)
meta-model descriptor
from specified old file
, if any, to
specified new file
. The previous meta-model descriptor
of specified
old file
is put on a separate cache and can still be queried by calling
#getOldDescriptor(IFile)
.
Clients should call this method in the following two situations:
file
has been moved from oldFile
to newFile
. The cached
meta-model descriptor
must then be updated in order to be accurate.oldFile
- The old file
whose meta-model descriptor
is to be moved.newFile
- The new file
to which the old file
's meta-model descriptor
is to be moved.#getDescriptor(IFile)
,
#getOldDescriptor(IFile)
void removeDescriptor(org.eclipse.core.resources.IFile file)
meta-model descriptor
for given file
. This has the
effect that upon the next call to #getDescriptor(IFile)
for the same file
the meta-model
descriptor will be re-detected rather just taken from the cache. The previous meta-model descriptor
is put on a separate cache and can still be queried by calling
#getOldDescriptor(IFile)
.
Clients should call this method in the following two situations:
file
has been deleted. The cached meta-model descriptor
must then be removed in order to avoid obsolete cache entries and unnecessary memory consumption.file
's meta-model
descriptor
has changed (e.g. because the file
's content has changed). The cached
meta-model descriptor
must then be removed because it is potentially invalid.file
- The file
whose cached meta-model descriptor
is to be
discarded.#getDescriptor(IFile)
,
#getOldDescriptor(IFile)
void clearOldDescriptors()
meta-model descriptor
s.
Clients should call this method in the following two situations:
file
s have been deleted and hadn't been loaded in any model before. The
cached old meta-model descriptor
must then be removed in order to avoid obsolete
cache entries and unnecessary memory consumption.resource
s have been unloaded from a model and don't exist anymore. The
cached old meta-model descriptor
must then be removed in order to avoid obsolete
cache entries and unnecessary memory consumption.#getDescriptor(IFile)
,
#getOldDescriptor(IFile)