Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom Attributes in GMF
Custom Attributes in GMF [message #172698] Sat, 16 February 2008 13:30 Go to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
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 #172820 is a reply to message #172698] Mon, 18 February 2008 16:19 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
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
Re: Custom Attributes in GMF [message #172950 is a reply to message #172820] Tue, 19 February 2008 13:54 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
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
>
>
Previous Topic:compartments not using scrollpane or viewports
Next Topic:Shared Editing Domain - Issue
Goto Forum:
  


Current Time: Tue Apr 23 11:28:11 GMT 2024

Powered by FUDForum. Page generated in 0.03644 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top