views:

283

answers:

2

I want to use the default XML editor (org.eclipse.wst.xml.ui) of Eclipse in an RCP application. I need to read the DOM of the xml file currently open. The plugin doesn't offer any extension point, so I'm trying to access the internal classes. I am aware that the I should not access the internal classes, but I don't have another option.

My approach is to create a fragment and an extension point to be able to read data from the plugin. I'm trying not to recompile the plugin, that's why I thought that a fragment was necessary. I just want to load it and extract the data at runtime.

So, my question is: is there another way to access the classes of a plugin? if yes, how? Any tutorial, doc page or useful link for any of the methods is welcome.

+1  A: 

Since nobody answered my question and I found the answer after long searches, I will post the answer for others to use if they bump into this problem.

To access a plugin at runtime you must create and extension point and an extension attached to it into the plugin that you are trying to access.

Adding classes to a plugin using a fragment is not recommended if you want to access those classes from outside of the plugin.

So, the best solution for this is to get the plugin source from the CVS Repository and make the modifications directly into the source of the plugin. Add extension points, extensions and the code for functionality.

Tutorials:

Getting the plugin from the CVS Repository:

www.eclipse.org/webtools/community/tutorials/DevelopingWTP/DevelopingWTP.html

Creating extensions and extension points and accessing them:

www.vogella.de/articles/EclipseExtensionPoint/article.html

www.eclipsezone.com/eclipse/forums/t97608.rhtml

Andrei B.
A: 

how to use eclipse cvs plugins outside eclipse platform ? i want to use cvs plugins in my own editor

Dhananjay
Better post this as a new question ("Ask Question" button in the top right of the page). More people will see it that way.
sth