Search code examples
javaeclipseeclipse-plugingraphiti

How do you use a custom editor with the graphiti framework?


I've been doing research on this issue for two days now with no luck, I've looked at a couple of eclipse forum questions such as: http://www.eclipse.org/forums/index.php/t/441641/ which says to

  • subclass DiagramEditor
  • override that single method and create your behavior instance>
  • register your editor class with the org.eclipse.ui.editors extension point (probably for your own diagram file extension)

My ultimate goal is to provide my own behavior and the way it's done according to what I've read in the documentation is to do the above, which I did. Here's a picture of how I added the extension point and used the class (which extends DiagramEditor) that I created.

enter image description here

But when I start it, it does not go through my editor, is there something I'm doing wrong or something else I also need to do?


Solution

  • As far as I can see on your screenshot, you have not set the extension. Add the extension of your model file to the 'extensions' block on the right. Then your editor will either become the default editor, or will be available in the Open with pop-up menu.