Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Preform Routing Style Action(How should I call the Routing Style Action within an other action?)
Preform Routing Style Action [message #1098019] Fri, 30 August 2013 13:33 Go to next message
svdwoude V is currently offline svdwoude VFriend
Messages: 3
Registered: August 2013
Junior Member

I made a new "Group Generalization" Action which basically should set the routing style for the selected generalizations (ConnectorImpl figure) to "Tree Style Routing" along with some other stuff that is irrelevant to this post.

How can I call the right RouterAction command/method/request to preform a tree style routing on the collection of selected Generalizations? I tried to just set the router for each GeneralizationEditPart, but get "Cannot modify resource set without a write transaction" errors. So I'm guessing only the proper commands will do the trick.


Below a code snippet of the aforementioned "Group Generalization" Action class:

public class GeneralizationTypeAction implements IObjectActionDelegate {

    private Shell shell;
    private ArrayList<GeneralizationEditPart> selectedElements;
     * Constructor for Action.
    public GeneralizationTypeAction() {

     * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
    public void setActivePart(IAction action, IWorkbenchPart targetPart) {
         shell = targetPart.getSite().getShell();

     * @see IActionDelegate#run(IAction)
    public void run(IAction action) {
        String menu = action.getId();
            // Check if one of the Generalizations is already part of a Group
            // Create Generalization Category
            for (GeneralizationEditPart element : selectedElements) {
                GeneralizationImpl gen = (GeneralizationImpl)((View)element.getModel()).getElement();
                // Set Generalization Category in selected Generalizations
                // Set Tree Routing for selected GeneralizationImpl (= ConnectorImpl)

Re: Preform Routing Style Action [message #1110744 is a reply to message #1098019] Tue, 17 September 2013 09:25 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member

maybe this can help you


[Updated on: Tue, 17 September 2013 11:19]

Report message to a moderator

Previous Topic:Multiple GMF Editors out of one Ecore-Model
Next Topic:create diagram from .ecore file by GMF
Goto Forum:

Current Time: Tue Mar 02 19:44:04 GMT 2021

Powered by FUDForum. Page generated in 0.01968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top