Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Converting a View to an Editor
Converting a View to an Editor [message #139869] Mon, 06 October 2003 01:34 Go to next message
Mitch Christensen is currently offline Mitch ChristensenFriend
Messages: 35
Registered: July 2009
Member
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] Mon, 06 October 2003 02:32 Go to previous messageGo to next message
Syed Rizvi is currently offline Syed RizviFriend
Messages: 145
Registered: July 2009
Senior Member
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 14:17 Go to previous message
Mitch Christensen is currently offline Mitch ChristensenFriend
Messages: 35
Registered: July 2009
Member
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: Sun Oct 06 08:41:14 GMT 2024

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

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

Back to the top