|
|
Re: Strange problem [message #550901 is a reply to message #550639] |
Wed, 04 August 2010 15:21 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
bachra04 ![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=bechirasma%40yahoo.com) Messages: 148 Registered: April 2010 |
Senior Member |
|
|
It seems the problem was resolved using ICommandProxy;
SetRequest reqSet = new SetRequest(editPart.getEditingDomain(),
SuperNode, XXX, name);
SetValueCommand operation = new SetValueCommand(reqSet);
editPart.getDiagramEditDomain().getDiagramCommandStack().exe cute(
new ICommandProxy(operation));
But My problem is I want to do two operations :
- set the name
- add another subnode
So I created two operations and followed the above code:
for operation1 and operation2 like this:
SetRequest reqSet1 = new SetRequest(editPart.getEditingDomain(),
SuperNode, XXX, name);
SetValueCommand operation1 = new SetValueCommand(reqSet1);
editPart.getDiagramEditDomain().getDiagramCommandStack().exe cute(
new ICommandProxy(operation1));
SetRequest reqSet2 = new SetRequest(editPart.getEditingDomain(),
SuperNode, XXX, name);
SetValueCommand operation2 = new SetValueCommand(reqSet2);
editPart.getDiagramEditDomain().getDiagramCommandStack().exe cute(
new ICommandProxy(operation2));
At this time I got the exception.
So bottom line it works for one operation but not for two.
Any hints, help ? Thanks
|
|
|
Re: Strange problem [message #550920 is a reply to message #550901] |
Wed, 04 August 2010 15:50 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Ed Merks![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ed.merks%40gmail.com) Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
The stack trace you show involves doing a save. How does that fit in
with what you're describing here?
bachra04 wrote:
> It seems the problem was resolved using ICommandProxy;
>
> SetRequest reqSet = new
> SetRequest(editPart.getEditingDomain(),
> SuperNode, XXX, name);
> SetValueCommand operation = new SetValueCommand(reqSet);
> editPart.getDiagramEditDomain().getDiagramCommandStack().exe
> cute(
> new ICommandProxy(operation));
>
> But My problem is I want to do two operations :
>
> - set the name
> - add another subnode
>
> So I created two operations and followed the above code:
>
> for operation1 and operation2 like this:
>
>
> SetRequest reqSet1 = new
> SetRequest(editPart.getEditingDomain(),
> SuperNode, XXX, name);
> SetValueCommand operation1 = new SetValueCommand(reqSet1);
> editPart.getDiagramEditDomain().getDiagramCommandStack().exe
> cute(
> new ICommandProxy(operation1));
>
>
>
> SetRequest reqSet2 = new
> SetRequest(editPart.getEditingDomain(),
> SuperNode, XXX, name);
> SetValueCommand operation2 = new SetValueCommand(reqSet2);
> editPart.getDiagramEditDomain().getDiagramCommandStack().exe
> cute(
> new ICommandProxy(operation2));
>
>
>
>
> At this time I got the exception.
>
> So bottom line it works for one operation but not for two.
>
> Any hints, help ? Thanks
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04107 seconds