|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
An ISaveableModel represents an editable subset of the domain
model that may contain unsaved changes. Different workbench parts (editors
and views) may present the same model(s) in different ways. This interface
allows the workbench to provide more appropriate handling of operations such
as saving and closing workbench parts. For example, if two editors sharing
the same model with unsaved changes are closed simultaneously, the user is
only prompted to save the changes once for the shared model, rather than once
for each editor.
Workbench parts that work in terms of saveable models should implement
ISaveableModelSource.
ISaveableModelSource| Method Summary | |
|---|---|
void |
doSave(IProgressMonitor monitor)
Saves the contents of this model. |
ImageDescriptor |
getImageDescriptor()
Returns the image descriptor for this model. |
String |
getName()
Returns the name of this model for display purposes. |
String |
getToolTipText()
Returns the tool tip text for this model. |
boolean |
isDirty()
Returns whether the contents of this model have changed since the last save operation. |
| Method Detail |
public String getName()
null.public String getToolTipText()
nullpublic ImageDescriptor getImageDescriptor()
null
if there is no image
public void doSave(IProgressMonitor monitor)
throws CoreException
If the save is cancelled through user action, or for any other reason,
the part should invoke setCancelled on the
IProgressMonitor to inform the caller.
This method is long-running; progress and cancellation are provided by the given progress monitor.
monitor - the progress monitor
CoreException - if the save fails; it is the caller's responsibility to
report the failure to the userpublic boolean isDirty()
Note: this method is called frequently, for example by actions to determine their enabled status.
true if the contents have been modified and need
saving, and false if they have not changed since
the last save
|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.