Get EditPart from Impl [message #717190] |
Fri, 19 August 2011 14:47 |
vincent988923 Messages: 29 Registered: June 2011 |
Junior Member |
|
|
Hi. Do you guys know how can I get the EditPart from its correspondent Impl model? Actually, I should change some attributes in run time, so I create a request. But in the code below, I should at first create "selection" which is a EditPart element.
IGraphicalEditPart editpart = (IGraphicalEditPart) selection;
SetRequest requestTirerTransition = new SetRequest(
editpart.getEditingDomain(),
ViewUtil.resolveSemanticElement((View) editpart.getModel()),//The semantic model
RdpPackage.Literals.TRANSITION__TIRER,//Name feature of activity
1);//New name value
SetValueCommand command = new SetValueCommand(requestTirerTransition);
editpart.getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy(command));
Do you have any ideas?
Thanks
Vincent
[Updated on: Fri, 19 August 2011 14:48] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.11678 seconds