|EditorPart.doSaveAs() for native file system or workspace [message #514201]
||Fri, 12 February 2010 19:15
| Tom Morris
Registered: July 2009
I've got an app that runs as both a plugin and a standalone RCP application.|
When running as a plugin, Save As allows the user to pick a project/folder/file in the workspace, but when it's running as a standalone RCP app, I'd like the user to be able to just save to the native file system.
- Is there a recommended best practice description somewhere that covers this case?
- The current EditorPart code (which I inherited) instantiates and calls org.eclipse.ui.dialogs.SaveAsDialog directly. Is that the right way to be getting the file name?
- How can I tell whether there's a workspace available? Currently the standard dialog comes up in a crippled mode where it will let you create projects and folders, but they're invisible in the selection dialog. I can call org.eclipse.swt.widgets.FileDialog to get a native file name if I know there's no workspace available.
My goals are two-fold:
1. Replicate the user experience in the current standalone product (which is not RCP based).
2. Minimize the size of the download by not having to pull in all the heavyweight IDE components when they'd only be trivially used.
Thanks for any pointers or tips!
Powered by FUDForum
. Page generated in 0.03368 seconds