Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Creating a NonExistingFileEditorInput with content?
Creating a NonExistingFileEditorInput with content? [message #334532] Mon, 16 February 2009 13:58 Go to next message
Eclipse UserFriend
Originally posted by: vs.iist.unu.edu

Dear all,
I'm looking for a way to open a default text editor and set some content
programatically. Specifically, I'd like to avoid having to create a
temporary file with the initial content anywhere. The content of the
editor is very often just inspected by the use, or parts of it are
cut'n'pasted into other applications, but not saved. Occasionally, I'd
like to save the (possibly edited) content, and I'd like to have a Save
As... dialog pop up on closing this editor's window.

I've been peeking into the "Untitled Textfile Wizard", but couldn't find
a way to set the content of the NonExistingFileEditorInput. I appreciate
any suggestions.

Volker

--
United Nations University -
Re: Creating a NonExistingFileEditorInput with content? [message #334586 is a reply to message #334532] Thu, 19 February 2009 07:18 Go to previous message
Eclipse UserFriend
Originally posted by: vs.iist.unu.edu

In article <gniq3j$td6$1@build.eclipse.org>,
"Prakash G.R." <grprakash@gmail.com> wrote:

> http://blog.eclipse-tips.com/2008/06/opening-editor-without- ifile.html
> Does this helps?

Marvellous, the pointer to IStorageEditorInput was exactly the link I
missed. I'm setting isReadOnly(), because the Save-functionality
otherwise *pretends* to be working (at least with regard to the
edit->mark dirty->save->unmark dirty cycle), but no file is produced.
"Save As" works as expected, though.

Thanks a lot!

Volker

--
United Nations University -
Previous Topic:Plug-in Development Perspective without Plugin Development in Windows Preference
Next Topic:getService() without the UI?!
Goto Forum:
  


Current Time: Fri Apr 26 08:31:26 GMT 2024

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

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

Back to the top