Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EuGENia] attribute declarations with multiplicity expressions
[EuGENia] attribute declarations with multiplicity expressions [message #550767] Wed, 04 August 2010 10:01 Go to next message
Syed Imran is currently offline Syed ImranFriend
Messages: 25
Registered: January 2010
Location: Cork, Ireland
Junior Member
Hi All,

I am looking for some example in Eugenia about attribute declarations with multiplicity expressions.
For example
class workshop {
attr String[0..10]  student;
attr String[*] participant;
}

I have a workshop model in which I want to specify students with their names as attributes. I do not want to specify it like.
val student [*]  student. 
.
.
class student {
attr String name;
}

As I want student attribute to be the part of workshop not an extra node in canvas. Some tip would be helpful.

Kindly,
Syed Imran
Re: [EuGENia] attribute declarations with multiplicity expressions [message #550844 is a reply to message #550767] Wed, 04 August 2010 13:40 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Syed,

Would it be feasible to use a compartment for the students? Something like the following code:

@gmf.node(foo="bar")
class Workshop {
  @gmf.compartment(layout="list")
  val Student[*] students
}

@gmf.node(label="name")
class Student {
  attr String name;
}


This will allow Student nodes to be placed inside Workshops.

If this is not feasible, then it might be best to post the question on the GMF forums. Once you have a GMF editor that you're satisfied with, we may be able to extract a further annotation for EuGENia...

Cheers,
Louis.
Re: [EuGENia] attribute declarations with multiplicity expressions [message #550857 is a reply to message #550844] Wed, 04 August 2010 14:05 Go to previous messageGo to next message
Syed Imran is currently offline Syed ImranFriend
Messages: 25
Registered: January 2010
Location: Cork, Ireland
Junior Member
Hi Louis,

I have also tried the compartment option, but the problem is if the number of students is 10 or 20, it gets real messy in the view. Further, one cannot get the whole informaiton just by clicking the workshop icon "Show Properties View" and a click on each compartment is required to view their properties.

Else if there is any way possible to show the node and its compartment properties in one view. For example if I click workshop icon "Show Properties View" all the properties of its compartments also become visible.

I am basically trying to solve this problem at Eugenia level level before posting it on the GMF forums.

kindly,
Syed Imran
Re: [EuGENia] attribute declarations with multiplicity expressions [message #551103 is a reply to message #550857] Thu, 05 August 2010 09:13 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Syed,

You're right - the compartment view takes up on awful lot of room because each student is represented as a node. It might be better if we could achieve something like in the Ecore diagram editor where properties are displayed inside classes. I don't think there's any support in EuGENia for this yet though...

As you mention that it might be desirable to customise the properties view, it may be best to post a question on the GMF forums. EuGENia can't do this right now, and I'm not sure to what extent GMF supports customisation of other views.

Sorry that I can't be any more constructive. If you do find an answer, please do let us know and we'll consider capturing the pattern in EuGENia -- it does sound very useful.

Cheers,
Louis.
Re: [EuGENia] attribute declarations with mul tiplicity expressions [message #551147 is a reply to message #551103] Thu, 05 August 2010 12:48 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Syed,

You could reduce the space taken by nodes in the compartment using a
polishing transformation as shown in the class diagram example in
http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-poli shing/

Cheers,
Dimitris

Louis Rose <louis@cs.york.ac.uk> wrote:
> Hi Syed,
>
> You're right - the compartment view takes up on awful lot of room
> because each student is represented as a node. It might be better if
> we could achieve something like in the Ecore diagram editor where
> properties are displayed inside classes. I don't think there's any
> support in EuGENia for this yet though...
>
> As you mention that it might be desirable to customise the properties
> view, it may be best to post a question on the GMF forums. EuGENia
> can't do this right now, and I'm not sure to what extent GMF supports
> customisation of other views.
>
> Sorry that I can't be any more constructive. If you do find an answer,
> please do let us know and we'll consider capturing the pattern in
> EuGENia -- it does sound very useful.
>
> Cheers,
> Louis.
>
Re: [EuGENia] attribute declarations with mul tiplicity expressions [message #551149 is a reply to message #551147] Thu, 05 August 2010 12:54 Go to previous messageGo to next message
Syed Imran is currently offline Syed ImranFriend
Messages: 25
Registered: January 2010
Location: Cork, Ireland
Junior Member
Hi Dimitris,

Yes, you are right as this is the only option left to make it look better, as I have not recieved any reply of the same post from GMF forums.

regards
Syed Imran
Re: [EuGENia] attribute declarations with mul tiplicity expressions [message #592710 is a reply to message #551147] Thu, 05 August 2010 12:54 Go to previous message
Syed Imran is currently offline Syed ImranFriend
Messages: 25
Registered: January 2010
Location: Cork, Ireland
Junior Member
Hi Dimitris,

Yes, you are right as this is the only option left to make it look better, as I have not recieved any reply of the same post from GMF forums.

regards
Syed Imran
Previous Topic:Re: [EuGENia] attribute declarations with multiplicity expressions
Next Topic:How to not append a result model each time running an etl transformation
Goto Forum:
  


Current Time: Thu Apr 25 17:41:20 GMT 2024

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

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

Back to the top