Create a connection on a newly created object [message #191315] |
Thu, 05 June 2008 21:08 |
Eclipse User |
|
|
|
Originally posted by: megiddo.meg-tech.com
Hello all,
I'm trying to figure out how to create a connection between two newly
created nodes. The node creation works fine, but I don't know how to get
the nodes I just created in order to use them to create the connection.
I can get the View, with the code below:
final CreateViewRequest cRequest = ...
... (create the node)
IAdaptable adapter = (IAdaptable) ((List) cRequest.getNewObject()).get(0);
View view = (View) adapter.getAdapter(View.class);
But I don't know where to go from there to get the EditPart(s) I need for
the connection. Any tips in this area would be greatly appreciated.
-Brett
|
|
|
Re: Create a connection on a newly created object [message #191323 is a reply to message #191315] |
Fri, 06 June 2008 07:06 |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Did you already have a look on the third part of the GMF tutorial?
http://wiki.eclipse.org/GMF_Tutorial_Part_3#Custom_Actions
I think this is exactly what you need.
Regards,
Tobias
Brett schrieb:
> Hello all,
>
> I'm trying to figure out how to create a connection between two newly
> created nodes. The node creation works fine, but I don't know how to get
> the nodes I just created in order to use them to create the connection.
>
> I can get the View, with the code below:
> final CreateViewRequest cRequest = ...
> .. (create the node)
> IAdaptable adapter = (IAdaptable) ((List) cRequest.getNewObject()).get(0);
> View view = (View) adapter.getAdapter(View.class);
>
> But I don't know where to go from there to get the EditPart(s) I need
> for the connection. Any tips in this area would be greatly appreciated.
>
>
> -Brett
>
|
|
|
Powered by
FUDForum. Page generated in 0.02468 seconds