|
Eclipse PDE Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A generic model. Classes that implement this interface are expected to be able to:
Method Summary | |
---|---|
String |
getResourceString(String key)
Returns a string found in the resource bundle associated with this model for the provided key. |
long |
getTimeStamp()
Returns the last modification time stamp. |
IResource |
getUnderlyingResource()
Returns a workspace resource that this model is created from. |
boolean |
isInSync()
Tests if this model is in sync with the storage object it was loaded from. |
boolean |
isLoaded()
Tests if this model is loaded and can be used. |
boolean |
isReconcilingModel()
Returns whether this model needs to react to changes in source and reconcile them. |
void |
load()
Loads the model directly from an underlying resource. |
void |
load(InputStream source,
boolean outOfSync)
Loads the model from the provided input stream. |
void |
reload(InputStream source,
boolean outOfSync)
Reload is a version of 'load' operation that has the following steps: Reset the model Load the model Fire "world changed" event Reload operation is used when a model that is already in use is invalidated by a change in the underlying buffer or resource. |
Methods inherited from interface org.eclipse.pde.core.IBaseModel |
---|
dispose, isDisposed, isEditable, isValid |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
public String getResourceString(String key)
key
- the name to use for bundle lookup
public IResource getUnderlyingResource()
With the caveat of stepped loading, all other properties of the underlying resource could be used directly (path, project etc.).
public boolean isLoaded()
true
if the model has been loadedpublic boolean isInSync()
true
if the model is in sync with the file system.public long getTimeStamp()
public void load() throws CoreException
CoreException
- if errors are encountered during the loading.public void load(InputStream source, boolean outOfSync) throws CoreException
source
- an input stream that should be parsed to load the modeloutOfSync
- if true, time stamp will not be updated to maintain
out-of-sync state of the model.
CoreException
- if errors are encountered during the loading.public void reload(InputStream source, boolean outOfSync) throws CoreException
source
- an input stream that should be parsed to load the model.outOfSync
- if true, the timestamp will not be updated to maintain
out-of-sync state of the model.
CoreException
- if errors are encountered during the reloading.public boolean isReconcilingModel()
true
if this is a reconciling model,
false
otherwise.
|
Eclipse PDE Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |