storageeditorinput and SAVE ??? [message #332659] |
Tue, 04 November 2008 10:15  |
Eclipse User |
|
|
|
Hi all,
I have an object model that represents object in a database .
I have got an input stream / output stream to use during the load / save
operation .
The question is:
I did a MyEditorInput which extends a IStorageEditorInput .
Based on the extension file I open the eclipse default editor for that db
object (ie. Structured for xml file . texteditor for txt) .
No problem in opening the editor . but what shall I do to save it?
I don't want to implement the IPersistableElement what I need is press the
save button and be sure that the information will be passed to the output
stream ...
I have done previously this extending the (StructuredTextEditor) ... but
what shall I do to use the normal editors?
Thanks
Kar
|
|
|
Re: storageeditorinput and SAVE ??? [message #332660 is a reply to message #332659] |
Tue, 04 November 2008 10:32   |
Eclipse User |
|
|
|
Kar wrote:
> I have done previously this extending the (StructuredTextEditor) ... but
> what shall I do to use the normal editors?
Extend the editor's doSave(IProgressMonitor) and write to your
OutputStream there...?
|
|
|
Re: storageeditorinput and SAVE ??? [message #332665 is a reply to message #332660] |
Tue, 04 November 2008 11:27   |
Eclipse User |
|
|
|
Hi Remy,
the problem is that I'm giving the user the possibility to open any possible
eclipse editor ...
or I do remove this option or I have to find a way to stick a listener on
the opened editor when this will get opened ..
any suggestion?
"Remy Chi Jian Suen" <remy.suen@gmail.com> wrote in message
news:gep89h$2p1$1@build.eclipse.org...
> Kar wrote:
> > I have done previously this extending the (StructuredTextEditor) ... but
> > what shall I do to use the normal editors?
>
> Extend the editor's doSave(IProgressMonitor) and write to your
> OutputStream there...?
|
|
|
|
Re: storageeditorinput and SAVE ??? [message #332673 is a reply to message #332666] |
Tue, 04 November 2008 15:31  |
Eclipse User |
|
|
|
what about a file ... I mean I could export the memory information on a file
and create a filestoreeditorinput
would it be of any help ...
guess not I cannot see any link to save operation ... but I could probably
set some resource change listener ... but again this probably will work if
the file is inside eclipse and not only in the filesystem ...
"Remy Chi Jian Suen" <remy.suen@gmail.com> wrote in message
news:gepe73$hgr$1@build.eclipse.org...
> Kar, there is no way you can know whether an editor supports saving back
> to a given IEditorInput. If you check the API for the ISEI, it doesn't
> even mention saving back to the underlying IStorage and suggests that a
> new file resource be created for writing the contents.
>
> "File-oriented editors should support this as a valid input type, and
> display its content for viewing (but not allow modification). Within the
> editor, the "save" and "save as" operations should create a new file
> resource within the workspace."
>
> http://help.eclipse.org/stable/nftopic/org.eclipse.platform. doc.isv/reference/api/org/eclipse/ui/IStorageEditorInput.htm l
|
|
|
Powered by
FUDForum. Page generated in 0.26093 seconds