Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to create an editor?
How to create an editor? [message #326383] Tue, 18 March 2008 15:08 Go to next message
Peter is currently offline PeterFriend
Messages: 14
Registered: July 2009
Junior Member
I want to know what do i need to do in order to create my own editor. Here is what i know so far:
I need an extension point org.eclipse.ui.editors -> specify my own class which at the very least extends the IEditorPart. I need to define an Editor input. Where should I do that? How should i do that. How do i tell my editor -> here is the bytes of this file use this to display. I don't understand how the editor works. If anyone can help and explain
Thanks,
Peter
Re: How to create an editor? [message #326385 is a reply to message #326383] Tue, 18 March 2008 15:31 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
I probably can't help much, but did you have a look at the template for
a simple editor plugin? File->new Project->Plugin..->Somewhere you can
select "Create a plubin from a template" or so.. There's an Editor example.

Felix
Re: How to create an editor? [message #326387 is a reply to message #326383] Tue, 18 March 2008 15:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomas.maurer.nospamierax.ch

"peterM" <regestrer@gmail.com> schrieb im Newsbeitrag
news:615350.3311205852986818.JavaMail.root@cp1.dzone.com...
> I want to know what do i need to do in order to create my own editor. Here
is what i know so far:
> I need an extension point org.eclipse.ui.editors -> specify my own class
which at the very least extends the IEditorPart. I need to define an Editor
input. Where should I do that? How should i do that. How do i tell my
editor -> here is the bytes of this file use this to display. I don't
understand how the editor works. If anyone can help and explain
> Thanks,
> Peter

I think this question can not be answered sensibly with one post. It
requires at least some study of the basic architecture. Even the platform
plugin help of Eclipse says: "There is no 'typical' implementation pattern
for an editor...".

I suggest reading Eclipse help "Platform Plug-in Developer Guide >
Programmer's Guide > Editors" for a start. Certainly creating a fully
functional sample with one of the wizards as the previous post suggests will
help a lot with understanding.

Thomas
Re: How to create an editor? [message #326394 is a reply to message #326387] Tue, 18 March 2008 17:33 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 64
Registered: July 2009
Member
Thomas Maurer a écrit :
> "peterM" <regestrer@gmail.com> schrieb im Newsbeitrag
> news:615350.3311205852986818.JavaMail.root@cp1.dzone.com...
>> I want to know what do i need to do in order to create my own editor. Here
> is what i know so far:
>> I need an extension point org.eclipse.ui.editors -> specify my own class
> which at the very least extends the IEditorPart. I need to define an Editor
> input. Where should I do that? How should i do that. How do i tell my
> editor -> here is the bytes of this file use this to display. I don't
> understand how the editor works. If anyone can help and explain
>> Thanks,
>> Peter
>
> I think this question can not be answered sensibly with one post. It
> requires at least some study of the basic architecture. Even the platform
> plugin help of Eclipse says: "There is no 'typical' implementation pattern
> for an editor...".
>
> I suggest reading Eclipse help "Platform Plug-in Developer Guide >
> Programmer's Guide > Editors" for a start. Certainly creating a fully
> functional sample with one of the wizards as the previous post suggests will
> help a lot with understanding.
>
> Thomas
>
>
if you speak french you can follow that
http://beuss.developpez.com/tutoriels/eclipse/plug-in/editor /colors/

it's really easy even If I have some trouble with the partitionscanner
(see my post)


a+++
Re: How to create an editor? [message #326467 is a reply to message #326394] Thu, 20 March 2008 10:33 Go to previous message
Peter is currently offline PeterFriend
Messages: 14
Registered: July 2009
Junior Member
I actually speak French. My question was somewhat incorrect. What i really want to know is how to bind the editorInput with editor itself and how to open it every time i open my perspective. Here is what i have. I have a custom perspective. Lets say MyPerspective . i have an editor(i am extending the MultiPageEditor, but have only one page) I have a treeViewer within my editor. It is used to display a special type of information which is provided via a custom object provided by an external engine. The problem is that i don't know why the framework doesn't call my editor when i try to open a file with the extension i specified in the plug-in xml. I tried to add a :
PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPage Listener(new IPageListener()
in the Activator class of the plug-in . I have a mock object for my content provide. so there is info for the treeViewer. The funny things is the listener doesn't work. I don't know why, maybe i have forgotten to add something or simply put the listener at the wrong place. Any ideas?
Previous Topic:[Databinding] Is it possible to create a Detail IObservableList based off an IObservableList?
Next Topic:The CursorLinePainter is not friendly ;)
Goto Forum:
  


Current Time: Sat Apr 27 07:54:35 GMT 2024

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

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

Back to the top