Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Can't save editor content
Can't save editor content [message #732165] Tue, 04 October 2011 02:19 Go to next message
Greg Cottman is currently offline Greg Cottman
Messages: 5
Registered: July 2009
Junior Member
I'm creating an editor using the NonExistingFileEditorInput class as the IEditorInput. When I click the save button for the editor, I expected to get a normal file save dialog, whose directory was set to the path in my plug-in's metadata directory.

Instead I get the Save As dialog that's attached, which has no way of specifying a parent folder, and makes it impossible to save a file.

I've read all the doc I can find, but unfortunately it all shows examples with existing files. If I open my editor with an existing file and do Save or Save As then it all works fine.

Is there something I should be setting to say save the content of new editor instances as a normal text file in the local file system?

Thanks,
Greg.
  • Attachment: saveAs.jpg
    (Size: 20.37KB, Downloaded 73 times)
Re: Can't save editor content [message #734946 is a reply to message #732165] Mon, 10 October 2011 09:40 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 04.10.2011 08:19, Greg Cottman wrote:
> I'm creating an editor using the NonExistingFileEditorInput class as the IEditorInput. When I click the save button for the editor, I expected to get a normal file save dialog, whose directory was set to the path in my plug-in's metadata directory.
>
> Instead I get the Save As dialog that's attached, which has no way of specifying a parent folder, and makes it impossible to save a file.
>
> I've read all the doc I can find, but unfortunately it all shows examples with existing files. If I open my editor with an existing file and do Save or Save As then it all works fine.
>
> Is there something I should be setting to say save the content of new editor instances as a normal text file in the local file system?
You need to implement this in your editor by your own.

Dani
>
> Thanks,
> Greg.
Re: Can't save editor content [message #735084 is a reply to message #734946] Mon, 10 October 2011 17:41 Go to previous message
Greg Cottman is currently offline Greg Cottman
Messages: 5
Registered: July 2009
Junior Member
Actually, I've just resolved this problem by changing my IEditorInput implementation to extend FileStoreEditorInput. Now any save operations treat the editor contents as a text file, and save them to the local file system.
Previous Topic:IReusableEditor : is a file rename a "change of input"?
Next Topic:Feature based export does not work
Goto Forum:
  


Current Time: Thu Aug 21 00:38:09 EDT 2014

Powered by FUDForum. Page generated in 0.01609 seconds