Manipulating Multiple Nodes in GMF Editor [message #204413] |
Thu, 04 September 2008 14:45  |
Eclipse User |
|
|
|
Hi All,
I am trying to allow my GMF editor to rewrite/append a particular property
of multiple nodes (of the same type) at the same time.
What the user should be able to do is:
1) select multiple nodes using Ctrl and the mouse cursor (clicking on them)
2) right click on them for a pop-up menu
3) by selecting one of the options get a SWT interface
4) write in the new property
5) save the property so all nodes are updated
Ive got the menu bar for multiple nodes and SWT but Im not sure how to
manipulate multiple nodes/change one of their properties at one time.
Ive had success doing something similar for a single node but Im not
sure how to proceed if there are multiple nodes involved.
Ive tried to something like this to try and capture the XXX nodes I
want to manipulate but this is probably only suitable for a single node.
public void run(IAction action) {
final IGraphicalEditPart editPart = (IGraphicalEditPart) editPart_for_xxx;
EObject modelElement = editPart.resolveSemanticElement();
final XXX dialogue_elementer = (XXX) modelElement;
TransactionalEditingDomain editingDomain =
TransactionUtil.getEditingDomain(modelElement);
Thank you very much for your help,
Gaff
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02383 seconds