public abstract class SaveablesProvider extends Object implements IDisposable
Saveable
objects to the common navigator, and allows to map
between elements in the tree and models.
This class is intended to be subclassed by clients.
Instances of subclasses will be returned from content extensions that implementIAdaptable
.Modifier | Constructor and Description |
---|---|
protected |
SaveablesProvider()
Creates a new saveable model provider.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of this saveables provider.
|
protected void |
doInit()
May be overridden by clients.
|
protected void |
fireSaveablesClosed(Saveable[] models)
Notifies the listener that the given models were closed in this model
provider.
|
protected boolean |
fireSaveablesClosing(Saveable[] models,
boolean force)
Notifies the listener that the given models are about to be closed in
this model provider.
|
protected void |
fireSaveablesDirtyChanged(Saveable[] models)
Notifies the listener that the given models' dirty state has changed.
|
protected void |
fireSaveablesOpened(Saveable[] models)
Notifies the listener that the given models were opened in this model
provider.
|
abstract Object[] |
getElements(Saveable saveable)
Returns the elements representing the given saveable.
|
abstract Saveable |
getSaveable(Object element)
Returns the saveable for the given element, or null if the element does
not represent a saveable.
|
abstract Saveable[] |
getSaveables()
Returns the saveables reachable through this provider.
|
void |
init(ISaveablesLifecycleListener listener)
Initializes this SaveablesProvider with the given listener, and calls the hook method doInit().
|
protected SaveablesProvider()
public final void init(ISaveablesLifecycleListener listener)
listener
- protected void doInit()
protected final void fireSaveablesOpened(Saveable[] models)
models
- protected final boolean fireSaveablesClosing(Saveable[] models, boolean force)
models
- force
- true if the closing may be canceled by the userprotected final void fireSaveablesClosed(Saveable[] models)
models
- protected final void fireSaveablesDirtyChanged(Saveable[] models)
models
- public abstract Saveable[] getSaveables()
public abstract Object[] getElements(Saveable saveable)
saveable
- public abstract Saveable getSaveable(Object element)
element
- public void dispose()
dispose
in interface IDisposable
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.