If you want to save all the dirty editors before doing any project level operation (such as build/refactor), you might want to show the user the "Save Resources" dialog with the list of dirty editors. This tip tells you how to do that.
{Update}
The first version of this tip had a roundabout way (read: nasty way) of doing it. Thanks to Boris for pointing the right API which does the trick.
PlatformUI.getWorkbench().saveAllEditors(true)
This returns a boolean value, in case the user presses Cancel button and you want to cancel the operation.
Mar 7, 2007
Saving dirty editors
Subscribe to:
Post Comments (Atom)

1 comments:
Why don't you just call PlatformUI.getWorkbench().saveAllEditors(true) ??
Post a Comment