Changing Link Arrows [message #206388] |
Tue, 23 September 2008 01:11  |
Eclipse User |
|
|
|
Originally posted by: nuclearpsyche.gmail.com
Hello,
Let's suppose I have Link objects with a boolean property called
"bidirectional".
I want the link on the diagram to show arrows on both sides of the line
when that property==true and only an arrow on one side if
bidirectional==false.
Is there a way to do that assuming I have a property sheet that allows
changing the boolean value?
Thank you!
tamer
|
|
|
|
|
|
|
Re: Changing Link Arrows [message #206884 is a reply to message #206506] |
Wed, 24 September 2008 10:27  |
Eclipse User |
|
|
|
Originally posted by: nuclearpsyche.gmail.com
Tobias,
Thank you! I will definitely try this out.
Regards,
tamer
Tobias wrote:
> In addition to Alex' sugestion -- which surely is more in the sense of
> model driven engineering -- it is also possible to do some changes in
> the code, which might have advantages depending on the number of
> settings for a link or a node (and the possible combinations thereof).
>
> Add a method setBidirectional(boolean) to your link's figure (normally
> found in the link's edit part), adding/removing the link's second
> decoration (see the code for the first decoration, to find out how to do
> this). Now you have to implement the link edit part's notifyChanged
> method, testing notification.getFeatureID(YourPackage.class) and calling
> the setBidirectional method followed by calling refreshVisuals() on the
> right feature ID.
>
> Finally, don't forget to mark both methods "@generated NOT", so they
> will not be overwritten on the next code generation.
>
> Regards,
> Tobias
>
>
>
> Tamer schrieb:
>> Hello,
>> Let's suppose I have Link objects with a boolean property called
>> "bidirectional".
>> I want the link on the diagram to show arrows on both sides of the
>> line when that property==true and only an arrow on one side if
>> bidirectional==false.
>> Is there a way to do that assuming I have a property sheet that allows
>> changing the boolean value?
>> Thank you!
>>
>> tamer
|
|
|
Powered by
FUDForum. Page generated in 0.52675 seconds