Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » contributing 'before' and 'after' commands without using inheritance
contributing 'before' and 'after' commands without using inheritance [message #43214] Fri, 08 September 2006 12:47
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Is it possible to obtain the following behavior without using inheritance?

Basically, I need to wrap a command around two other commands. This is
needed because in some situations the default implementation in
GraphicalEditPart does not turn off the canonical mode of the correct
editPart.

class MyEditPart extends GraphicalEditPart {

public Command getCommand(Request req) {
if (req instanceof CreateConnectionRequest) {
Comand before = new ToggleCanonicalModeCommand( ..., true);
Comand after = new ToggleCanonicalModeCommand ( ...., false);


CompoundComand cc = ....
cc.add (before);
cc.add (super.getCommand(req));
cc.add (after);
}
}
}

thanks for looking
vlad
Previous Topic:Where is the GMF 1.0.1 daily build ?
Next Topic:Changing the property of the element during Runtime
Goto Forum:
  


Current Time: Sun Jul 13 07:57:03 EDT 2025

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

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

Back to the top