I have a plugin which creates a new view. In my view I display certain information about certain Java classes in the project. I want to allow the user to double click on a class in my view and when s/he does, I want to open that class for editing in the editor. Basically similarly to what the Hierarchy View does: it displays the tree of classes and when the user double-clicks on one of them, it goes into the editor. How do I do that if what I have is an object of type IType?
I have a plugin which creates a new view. In my view I display
Share
I will be showing a high-level implementation for your requirement. You have to do following steps.
Plugin.xmlfor the class which extendsviewPartandeditorPartfor a view and editor respectively.ViewPart.To open a file in the editor, use the following code to open the editor.