Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Converting a View to an Editor
Converting a View to an Editor [message #139869] Sun, 05 October 2003 21:34 Go to next message
Eclipse UserFriend
I've successfully implemented/extended the table editor described in the
"Building and delivering a table editor with SWT/JFace" Eclipse Corner
article. Unfortunately, I need this editor to appear in the 'center'
frame of the Eclipse window. This appears to be reserved for Editors.

I've tried to convert the View to an Editor with no luck.

Can someone outline the steps necessary to make such a conversion?

Thanks,
-Mitch

FWIW, my approach was to do the following:

o Create a new Editor plugin project using PDE (based on the XML editor
example).
o Delete all XML Editor classes except for the class that extends
TextEditor.
o Added/Implemented creatPartControl() and copied code from the Table
Editor example.
o All compiles fine, but I can't bring up the table editor.
o I mapped the file extension of '.pgd'. But opening a file of that type
from the navigator opens a standard text editor.
Re: Converting a View to an Editor [message #139903 is a reply to message #139869] Sun, 05 October 2003 22:32 Go to previous messageGo to next message
Eclipse UserFriend
I am no specialist on editors but I think you need to use a different file
extension,as thats what Eclipse platform looks for when a editor is
invoked.

My reason for saying this is that when I created my javaeditor I had to
use a different file extension to make the platform know that it is my
editor not the Eclipse javaEditor.

You can get this done (i think) by specifying a different file extension
in the plugin.xml file for your editor.

I hope this helps.

Syed


Mitch Christensen wrote:

> I've successfully implemented/extended the table editor described in the
> "Building and delivering a table editor with SWT/JFace" Eclipse Corner
> article. Unfortunately, I need this editor to appear in the 'center'
> frame of the Eclipse window. This appears to be reserved for Editors.

> I've tried to convert the View to an Editor with no luck.

> Can someone outline the steps necessary to make such a conversion?

> Thanks,
> -Mitch

> FWIW, my approach was to do the following:

> o Create a new Editor plugin project using PDE (based on the XML editor
> example).
> o Delete all XML Editor classes except for the class that extends
> TextEditor.
> o Added/Implemented creatPartControl() and copied code from the Table
> Editor example.
> o All compiles fine, but I can't bring up the table editor.
> o I mapped the file extension of '.pgd'. But opening a file of that type
> from the navigator opens a standard text editor.
Re: Converting a View to an Editor [message #140143 is a reply to message #139903] Mon, 06 October 2003 10:17 Go to previous message
Eclipse UserFriend
Brilliant. Thank you.

I'm building a "Posting Grid", so a .pgd extension seemed natural. Just
my luck that I would choose an unacceptable extension.

Works now.

-Mitch

Syed wrote:

> I am no specialist on editors but I think you need to use a different file
> extension,as thats what Eclipse platform looks for when a editor is
> invoked.

> My reason for saying this is that when I created my javaeditor I had to
> use a different file extension to make the platform know that it is my
> editor not the Eclipse javaEditor.

> You can get this done (i think) by specifying a different file extension
> in the plugin.xml file for your editor.

> I hope this helps.

> Syed


> Mitch Christensen wrote:

> > I've successfully implemented/extended the table editor described in the
> > "Building and delivering a table editor with SWT/JFace" Eclipse Corner
> > article. Unfortunately, I need this editor to appear in the 'center'
> > frame of the Eclipse window. This appears to be reserved for Editors.

> > I've tried to convert the View to an Editor with no luck.

> > Can someone outline the steps necessary to make such a conversion?

> > Thanks,
> > -Mitch

> > FWIW, my approach was to do the following:

> > o Create a new Editor plugin project using PDE (based on the XML editor
> > example).
> > o Delete all XML Editor classes except for the class that extends
> > TextEditor.
> > o Added/Implemented creatPartControl() and copied code from the Table
> > Editor example.
> > o All compiles fine, but I can't bring up the table editor.
> > o I mapped the file extension of '.pgd'. But opening a file of that type
> > from the navigator opens a standard text editor.
Previous Topic:MessageBox from Plugin class?
Next Topic:Action set vanished
Goto Forum:
  


Current Time: Fri Jul 04 05:17:17 EDT 2025

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

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

Back to the top