Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » EditorPart.doSaveAs() for native file system or workspace
EditorPart.doSaveAs() for native file system or workspace [message #514201] Fri, 12 February 2010 19:15
Tom Morris is currently offline Tom Morris
Messages: 89
Registered: July 2009
Member
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!

Tom
Previous Topic:Where is the RCP source when using EMF?
Next Topic:How to resize a SourceViewer inside a Dialog?
Goto Forum:
  


Current Time: Mon Sep 22 12:35:49 GMT 2014

Powered by FUDForum. Page generated in 0.01952 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software