Plugin Design - Expanding the Sample XML Editor [need help] Innngo - Apr 25, 2008 - 03:36 AM Post subject: Expanding the Sample XML Editor [need help]
Hello forum,
seems like I really need help. After about 2 weeks of reading about the topic, I still don't have much of a clue as of how to contribute to Eclipse.
Let's assume I am using the XML Editor that comes with Eclipse 3.3..
I *have to* write a plugin for Eclipse that adds a submenu entry to the context menu of the navigators views, such as "New -> Special XML" file.
Clicking that should then open a new XML file and and already write some stuff in it.. then in the XML Editor's view, I should be able to right-click an element and have another entry in the context menu appear that lets me add another sub-element automatically with 5 attributes.
Could anyone point me in the right direction? I wouldn't mind a detailed describtion,
thanks in advance.
jlvschagen - May 11, 2008 - 09:14 AM Post subject:
create an extension based on the eclipse.ui.editor, in this extension you can specify a class location. this class has to inherit the IEditorPart interface, if you wanna make life easy you can just extend the StructuredTextEditor from the sse plugin.
im not to sure how to contribute a context menu on the string data tho, you could just do that from the contentoutline page. you can initiate that from the getAdapter method within your editor class.