I'd like to create an Eclipse extension modelling a decision tree/diagram. The actual modelling would be done using a graphical interface (nodes, connections etc). I'd like this plugin to generate code based on nodes and their interconnections. I have basic model classes ready; however, my diagrams are very large and it's difficult to manage all the connections only through code. I imagine I would build the whole diagram using GUI. When I double-click on a connection, I'd like to be able to override some of its methods, thus creating an anonymous subclass.

I found GEF used in similar plugins. Is my goal plugin "doable" in GEF? Do you have any advice?

有帮助吗?

解决方案

Yes. GEF is the foundation for building any graphical editor in Eclipse. It has basic support for moving nodes, placing connection, palette, etc. Other frameworks sit on top of GEF to make the task of creating a graphical editor even easier if your requirements fit with their supported scenarios. Take a look at Eclipse Graphiti project.

其他提示

I would say that GMF is something that would help your life. GMF generates quite big parts for free, and also includes EMF.

Also GMF is highly extendeable, so if you don't like something it has generated, you can just override those parts.

There are good GMF tutorial here: http://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top