Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Error using SetBoundCommand and CompoundCommand
Error using SetBoundCommand and CompoundCommand [message #170271] Tue, 29 January 2008 09:04 Go to next message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
Hello, I want to relocate a figure in the diagram. I have a
CompoundCommand where I add some commands, and when I insert the
SetBoundsCommand an error appears. The code is the following:

***********
CompoundCommand cc = new CompoundCommand();
cc.add(command);
SetBoundsCommand sbc = new SetBoundsCommand(editPart.getEditingDomain(),
"relocate new figure",
editPart.getParent(),
new Point(50, 50));
cc.add((ICommandProxy)sbc);
return cc;
***********

The error appears in the line 'cc.add((ICommandProxy)sbc)'. Anybody can
help me to resolve it? I don't know how to add this command to the
compoundCommand.

Thanks.
Re: Error using SetBoundCommand and CompoundCommand [message #170326 is a reply to message #170271] Tue, 29 January 2008 10:45 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Marc,

Looks like you are receiving class cast exception? ;-)
try: cc.add(new ICommandProxy(sbc));

-----------------
Alex Shatalin
Re: Error using SetBoundCommand and CompoundCommand [message #170388 is a reply to message #170326] Tue, 29 January 2008 12:01 Go to previous message
Marc Mising name is currently offline Marc Mising nameFriend
Messages: 193
Registered: July 2009
Location: Valencia, Spain
Senior Member
It really was a very good appreciation, jeje
Thanks Alex!

Marc.
Previous Topic:Default Grid View for GMF Editor
Next Topic:Ekeys with mutiple keys
Goto Forum:
  


Current Time: Sat Apr 27 03:47:38 GMT 2024

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

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

Back to the top