Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » open editor with java objects
open editor with java objects [message #759874] Wed, 30 November 2011 12:31 Go to next message
M Dahlem is currently offline M Dahlem
Messages: 6
Registered: November 2011
Junior Member

I try to set some fields of java objects (not Files) in existing editors and save them back in this data structure. Is there a way to do this?

The best I reached, was opening an editor with an extended IStorageEditorInput like shown in this post: hxxp:// But there are two problems with this idea:

  1. When opening this EditorInput with an StructuredEditor (i.e. css editor), the outline, code hightlighting, adding comment from the context menu and so on do not work, but no error is shown in the command line.
  2. The other problem is the save-operation. How can I catch the editor-internal operation and override it with my own operation?

I hope you understand the problems and have an idea how to fix them.
Perhabs there exists another idea how to set and get fields of a java objects in an editor.
Re: open editor with java objects [message #759920 is a reply to message #759874] Wed, 30 November 2011 15:11 Go to previous message
M Dahlem is currently offline M Dahlem
Messages: 6
Registered: November 2011
Junior Member
I found out, that it should work with document providers. I can use a provider to open a document depending on the myEditorInput with a given editor and handle the partinioning of the blocks with the help of line counters and a modification listener.

But one thing don't work properply:

How can I set the contenttype (extensionpoint?) for objects, that are not files and therefore have no file extension?

[Updated on: Wed, 30 November 2011 15:40]

Report message to a moderator

Previous Topic:Is the proper way to structure / develop my RCP App?
Next Topic:JVM crashed sometimes on ubuntu 64bit
Goto Forum:

Current Time: Wed Oct 22 01:43:16 GMT 2014

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

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