| java.lang.Object org.eclipse.ui.internal.SaveablesList
addModelLifecycleListener | public void addModelLifecycleListener(ISaveablesLifecycleListener listener)(Code) | | Adds the given listener to the list of listeners. Has no effect if the
same (identical) listener has already been added. The listener will be
notified about changes to the models managed by this model manager. Event
types include:
POST_OPEN when models were added to the list of models
POST_CLOSE when models were removed from the list of models
DIRTY_CHANGED when the dirty state of models changed
Listeners should ignore all other event types, including PRE_CLOSE. There
is no guarantee that listeners are notified before models are closed.
Parameters: listener - |
getNonPartSources | public ISaveablesSource[] getNonPartSources()(Code) | | a list of ISaveablesSource objects registered with this saveableslist which are not workbench parts. |
getOpenModels | public Saveable[] getOpenModels()(Code) | | Returns the list of open models managed by this model manager.
a list of models |
handleLifecycleEvent | public void handleLifecycleEvent(SaveablesLifecycleEvent event)(Code) | | This implementation of handleModelLifecycleEvent must be called by
implementers of ISaveablesSource whenever the list of models of the model
source changes, or when the dirty state of models changes. The
ISaveablesSource instance must be passed as the source of the event
object.
This method may also be called by objects that hold on to models but are
not workbench parts. In this case, the event source must be set to an
object that is not an instanceof IWorkbenchPart.
Corresponding open and close events must originate from the same
(identical) event source.
This method must be called on the UI thread.
|
postClose | public void postClose(Object postCloseInfoObject)(Code) | | Parameters: postCloseInfoObject - |
preCloseParts | public Object preCloseParts(List partsToClose, boolean save, IWorkbenchWindow window)(Code) | | Parameters: partsToClose - Parameters: save - Parameters: window - the post close info to be passed to postClose |
promptForSaving | public boolean promptForSaving(List modelsToSave, IShellProvider shellProvider, IRunnableContext runnableContext, boolean canCancel, boolean stillOpenElsewhere)(Code) | | Prompt the user to save the given saveables.
Parameters: modelsToSave - the saveables to be saved Parameters: shellProvider - the provider used to obtain a shell in prompting isrequired. Clients can use a workbench window for this. Parameters: runnableContext - a runnable context that will be used to provide aprogress monitor while the save is taking place. Clients canuse a workbench window for this. Parameters: canCancel - whether the operation can be canceled Parameters: stillOpenElsewhere - whether the models are referenced by open parts true if the user canceled |
removeModelLifecycleListener | public void removeModelLifecycleListener(ISaveablesLifecycleListener listener)(Code) | | Removes the given listener from the list of listeners. Has no effect if
the given listener is not contained in the list.
Parameters: listener - |
saveModels | public boolean saveModels(List finalModels, IShellProvider shellProvider, IRunnableContext runnableContext)(Code) | | Save the given models.
Parameters: finalModels - the list of models to be saved Parameters: shellProvider - the provider used to obtain a shell in prompting isrequired. Clients can use a workbench window for this. Parameters: runnableContext - a runnable context that will be used to provide aprogress monitor while the save is taking place. Clients canuse a workbench window for this. true if the operation was canceled |
testGetSourcesForModel | public Object[] testGetSourcesForModel(Saveable model)(Code) | | For testing purposes. Not to be called by clients.
Parameters: model - |
|
|