Tags

This exercise describes how to use ILOG JViews Graph Layout for Eclipse to add powerful Layout capabilities to Eclipse/GMF modelers. The movie explains the types of services you can expect from this integration and shows how to take a pure GMF application and enable JViews algorithms on it. Prerequisites : This step-by-step exercise assumes that you have already installed Eclipse 3.4 with its modeling extensions (EMF, GMF and GEF), and that you have installed and integrated JViews Graph Layout for Eclipse . A full evaluation version can be requested here . Project for Step 1 :Download this zipped Plugin Project corresponding to the first step of this exercise. You will have to import this project into your Eclipse environment. It contains a generic modeler, based on GMF. The following movie describes how to import this project (at 5 minutes and 28 seconds in the movie). The following movie is best viewed in full screen mode: Code Snippets: To make things easier, here are some code snippets you can use to complete the exercise: Step1: public class MyDiagramEditPart extends DiagramEditPart implements IGrapherEditPart { private GMFLayoutSource myLayoutSource; // reference on the layout source implementation public void activate() { myLayoutSource = new GMFLayoutSource(this); // BEFORE CALLING super.activate(); IlvHierarchicalLayout layout = new IlvHierarchicalLayout(); // Create a hierarchical layout layout.setGlobalLinkStyle(IlvHierarchicalLayout.ORTHOGONAL_STYLE); //... [More]