Custom Attributes in GMF [message #172698] |
Sat, 16 February 2008 08:30  |
Eclipse User |
|
|
|
Hi ,
I am converting an GEF application to GMF application as a process of
learning , I am trying to reuse my old figures as much as possible, in doing
that am facing a small issue (prbly. dont know how to do ) -
The issue is ,
I have added a custom figure - mapping to my Old Figure - ,
1. the old figure has constructors which takes the various parms , how do i
set values of constructor using Custom Attribute Feature of the Custom
Figure ?
2. Is that possible to pass any other figure that exists in my GMFGraph as
an attribute to the Custom Figure?
e.g I have a label defined in my Gmf Graph and i want to pass that value
to the Custom Attribute
3. What does the Multistatement proeperties in the Custom Attribute is for
and how it can be used .
Is there any documentation that defines the GMF Graph figures and the
attribute that it denotes , what to pass etc.,
It will be great if some pointer are available to these or any suggestions.
Thanks,
Kamesh
|
|
|
|
Re: Custom Attributes in GMF [message #172950 is a reply to message #172820] |
Tue, 19 February 2008 08:54  |
Eclipse User |
|
|
|
Thanks for the input Alex :)
"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e61e27b8ca406991a3eec8@news.eclipse.org...
> Hello Kamesh,
>
>> 1. the old figure has constructors which takes the various parms , how
>> do i set values of constructor using Custom Attribute Feature of the
>> Custom Figure ?
> No. Custom figure should always has default constructor. You can create
> one in java code.
>
>> 2. Is that possible to pass any other figure that exists in my
>> GMFGraph as an attribute to the Custom Figure?
> No, it's not possible - generated code will looks like:
> <customFigureInstance>.<customAttributeName>(<customAttributeValue >);
>
>> 3. What does the Multistatement proeperties in the Custom Attribute is
>> for and how it can be used .
> This is a way to plug in some custom code - new temporary variable can be
> assigned inside this code + used as a parameter for the corresponding
> setxxx() method call.
> In this case "name" is a name of local temporary variable, "value" -
> expression using {0} (like java message format) placeholder for this
> variable.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.06940 seconds