Yet another article on GMF.

If you want to add a static label to a GMF connection, like on the right:

  1. .gmfgraph > Figure Gallery > Figure Descriptor your_figure > Polyline Connection: Add a Label, set Descriptor and Name, and with the desired Text (e.g. “navigate”).
  2. .gmfgraph > Figure Gallery > Figure Descriptor your_figure: Add a Child Access to the new Label that you created, and give it a name.
  3. .gmfgraph: Add a new Diagram Label (at the bottom) and link Accessor to your Child Access; Figure to your_figure; and give it a Name.
  4. .gmfmap > Link Mapping <your_link_mapping>: Add a Design Label Mapping, and link it to the Diagram Label. Set Read Only to true.
  5. Re-generate the .gmfgen and diagram code!

Also see GMF Troubleshooting.