write custom string port label/add property role programatically [message #651701] |
Tue, 01 February 2011 05:54  |
Eclipse User |
|
|
|
Hi, i have two concrete questions=)...I have little knowledge about gmf and emf...
1-I want to write a "custom string" in the port label when i add a port to my diagram.I dont found in what method i would call to do this...
2-When i add a property elemento to a collaboration, i want that this property automatically be a collaboration role, i dont found what classes and what methods i would call to do a property role of collaboration programatically.(I dont want to use the element collaboration role)
Thanks
Andres
|
|
|
|
Re: write custom string port label/add property role programatically [message #656927 is a reply to message #651701] |
Mon, 28 February 2011 21:51  |
Eclipse User |
|
|
|
Thanks!
Following your instructions, i modificate in my custom common plugin, the class
AppliedStereotypeExternalNodeEditPolicy
and the method refreshStereotypeDisplay() ,
and i can write a string in the port label.
I have a new doubt, when a type is asigned to the port,
i want know the name of the type of the port, and i want know the the classes that the type extends, and the interfaces that the type implements.
For example if i have a class X that extends a class A, and implements Interface I, and the type of my port is X.
How can get this values(A,I), i am trying with the function ((Element)getView().getElement(); ) and casting the return type to TypeElement, but i cant obtain this values..
Can you help me?
Andres
[Updated on: Mon, 28 February 2011 21:51] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03612 seconds