Categories
- Food (2)
- Investing (11)
- Kids (3)
- Programming (61)
- Thoughts (55)
- Uncategorized (1)
Tags
action android Argentina bond book Book review code code generation complexity craft delek nadlan Discworld donate eclipse editor EMF framework funny GEF graph help internals Investing investing guidelines israel java JGraph JUNG management mauldin novel opm passion programming research review Science fiction software software development style tase terry pratchett tutorial UML visual programmingFeeds
Tag Archives: GEF
Enabling Select-All Action in a GEF Editor
Today I was working on a model using my OPM GEF editor, and wanted to select all elements of the model… but for some strange reason the “Select All” action in the “Edit” menu was disabled… So I started to investigate. First, the “Select All” action should be similar to other eclipse standard actions, like “Undo” and “Delete”, so I expected some treatment similar to these actions – a SelectAllRetargetAction or something similar. There is a SelectAllAction class in the GEF framework, but I was not sure how to plug it in. First, I saw that this action was already … Continue reading
Creating an OPM GEF Editor – Part 21: Adding Keyboard Shortcuts
Previous Tutorial: Creating an OPM GEF Editor – Part 20: Creating a Context Menu and Adding Custom Actions Keyboard shortcuts are very useful for activating actions. There are many shortcuts that are common in all environments – and for better usability, enabling this shortcuts give the user a better user experience. In my case, I wanted to let the user edit the name of a thing (or state) using the F2 key, which is commonly used for this purpose. Adding keyboard shortcuts to GEF is fairly easy. You only need to define a <code>KeyHandler</code> and attach it to the graphical viewer. … Continue reading
GEF Internals Part 2 – Mouse Interaction and the Creation Tool
After investigating the complex interactions that occur with the a title=”GEF Internals Part 1 – Mouse Interaction and the Selection Tool” href=”http://www.vainolo.com/2012/01/01/gef-internals-part-1-mouse-interaction-and-the-selection-tool/”selection tool in my previous post/a, we will now focus on a simpler case, the creation tool. When the mouse moves over the canvas, the codeLightweightSystem/code system catches the mouse move event and forwards it to the codeDomainEventDispatched/code. If the event was not previously captured by the domain codeDomainEventDispatcher/code executes direct codedraw2d/code interaction. I am not completely sure what “captured by the domain” means, but for example when there is a mouse click, which is translated into a codemouseDown/code … Continue reading
Posted in Programming
Tagged diagram, eclipse, editor, framework, GEF, internals, tutorial
Leave a comment
GEF Internals Part 1 – Mouse Interaction and the Selection Tool
There are some explanations on the net on how GEF works (see here ) but I have not found a good description on how GEF really works, so I will try to unravel the secret and post it here for the world to know. My investigation began when I found that although GEF EditPolicy instances are installed in the EditPart using a key, this key was never used (well, everything works even if I changed all the keys to “chukumuku”). I started reading more and mode code and was fascinated about how the framework works. So here it goes, what … Continue reading
Posted in Programming
Tagged diagram, eclipse, editor, framework, GEF, internals, tutorial
2 Comments
