Vainolo's Blog

GEF Tutorials

10 comments

Creating an EMF and GEF based OPM Editor: the tutorial shows, step by step, how to create a graphical editor based on the Eclipse Modeling Framework (EMF) and the Graphical Modeling Framework (GEF).

  1. Creating a GEF editor – Part 1: Defining the Model
  2. Creating a GEF Editor – Part 2: EMF Code Generation
  3. Creating a GEF Editor – Part 3: Basic GEF Editor
  4. Creating a GEF Editor – Part 4: Showing the Model on the Editor
  5. Creating a GEF Editor – Part 5: Loading the Model from an EMF File
  6. Creating a GEF Editor – Part 6: Model Refactoring and Editing Diagram Entities
  7. Creating a GEF Editor – Part 7: Moving Elements and Direct Editing
  8. Creating a GEF Editor – Part 8: Delete, Undo and Redo
  9. Creating a GEF Editor – Part 9: Connections
  10. Creating a GEF Editor – Part 10: Deleting Connections and Fixing of Thing Delete Command
  11. Creating a GEF Editor – Part 11: Creating Link Bendpoints
  12. Creating a GEF Editor – Part 12: Enable Save Action on the Editor
  13. Creating an OPM GEF Editor – Part 13: Adding Procedural Links
  14. Creating an OPM GEF Editor – Part 14: Refactoring, Refactoring and More Refactoring
  15. Creating an OPM GEF Editor – Part 15: Adding Structural Link
  16. Creating an OPM GEF Editor – Part 16: Displaying EMF Properties in a GEF Editor
  17. Creating an OPM GEF Editor – Part 17: How to Define Container Edit Parts
  18. Creating an OPM GEF Editor – Part 18: Snapping to Grid and to Geometry
  19. Creating an OPM GEF Editor – Part 19: Displaying Tooltips
  20. Creating an OPM GEF Editor – Part 20: Creating a Context Menu and Adding Custom Actions
  21. Creating an OPM GEF Editor – Part 21: Adding Keyboard Shortcuts
  22. Creating an OPM GEF Editor – Part 22: Enabling Select-All Action in a GEF Editor
  23. Creating an OPM GEF Editor – Part 23: Drag & Drop from the Palette
  24. Creating an OPM GEF Editor – Part 24: Showing Feedback to the User
  25. Creating an OPM GEF Editor – Part 25: “Smart” Multi-line Text Figure
  26. Creating an OPM GEF Editor – Part 26: Activating Tools from the Context Menu

Some investigative work on how GEF works:

  1. GEF Internals Part 1 – Mouse Interaction and the Selection Tool
  2. GEF Internals Part 2 – Mouse Interaction and the Creation Tool

GEF EditPolicy Reference Card

Eclipse Draw2d Layouts Reference Card

Short introductory tutorial to GEF given at JJTV meetup.

Written by admin

July 21st, 2012 at 11:04 pm

Posted in

10 Responses to 'GEF Tutorials'

Subscribe to comments with RSS or TrackBack to 'GEF Tutorials'.

  1. […] I am currently developing a GEF-based editor for an EMF-based model with the help of the GEF Book, and vainolo’s incredibly helpful blog posts. […]

  2. […] of a GEF editor for an EMF-based model, using both the GEF book and vainolo‘s great GEF tutorials. The model consists of several types of nodes and connections, with different layout requirements […]

  3. This literally taught me how to use GEF and I’m beyond thankful for the assistance you provided here. I’m pretty sure I’d be about a year behind where I am today in the development of my GEF/EMF editor. Looking back, I’d probably have gone with GMF from the get-go but even so, I would be pretty dead in the water after generating the model if I had gone that approach. Thank you, so much, for the time and effort you put towards this effort. It has made all of the difference.

    brian

    14 Oct 15 at 16:25

  4. Thanks! Glad to hear :-)

    vainolo

    14 Oct 15 at 18:17

  5. Is there any way, we can export this plugin to Java Web Start , so that it can be distributed like a web application ?

    Swaroop Shastri

    5 Nov 15 at 14:46

  6. Oh I wish I knew :-(. Tried a couple of times but never managed to make it work. If you do, please share your results.

    vainolo

    8 Nov 15 at 16:08

  7. Sure, I will try out and will let you know /post if I am successful.

    Thanks

    Swaroop Shastri

    9 Nov 15 at 06:23

  8. We have created our GEF plugin and we are seeing number of issues.Like
    1. High CPU utilization
    2. High heap and old gen memory used
    3. Sluggishness in tool if we keep it idle for long time.

    We are suspecting that there are memory leak issues present in the code/draw2.
    Any Idea if you have seen these issues before. we are trying to hunt for these memory leaks .
    You have any other thought where should we target them ?
    Thanks,

    Swaroop Shastri

    18 Nov 15 at 13:53

  9. Not sure of memory leaks in the framework, but I know it has some performance problems with large diagrams. Good luck on tracing the source of the problem.

    vainolo

    19 Nov 15 at 14:17

  10. Hi,

    You can overcome high CPU utilization using following implementation . If this will not put your application in infinite loop , otherwise , there will keep on looping

    @Override
    protected void paintFigure(Graphics graphics) {
    nameLabel.setSize(getBounds().getSize());
    shape.setSize(getBounds().getSize());
    this.setBounds(shape.getBounds());
    super.paintFigure(graphics);
    }

    Swaroop Shastri

    21 Dec 15 at 18:30

Leave a Reply

%d bloggers like this: