public interface IModel extends IBaseModel
Modifier and Type | Method and Description |
---|---|
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.
|
dispose, isDisposed, isEditable, isValid
getAdapter
String getResourceString(String key)
key
- the name to use for bundle lookupIResource getUnderlyingResource()
With the caveat of stepped loading, all other properties of the underlying resource could be used directly (path, project etc.).
boolean isLoaded()
true
if the model has been loadedboolean isInSync()
true
if the model is in sync with the file system.long getTimeStamp()
void load() throws CoreException
CoreException
- if errors are encountered during the loading.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.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.boolean isReconcilingModel()
true
if this is a reconciling model,
false
otherwise.
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.