Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EuGENia link attributes
EuGENia link attributes [message #21991] Sat, 11 July 2009 00:05 Go to next message
No real name is currently offline No real name
Messages: 92
Registered: July 2009
Member
Hi there,

I'm using EuGENia to help with a diagram editor of mine, which creates
components including GMF links. I can specify labels for these links using
gmf annotations such as, @gmf.link(... label="name"). I'm now wondering
whether there is an easy way to go abouts adding labels to the ends of the
link (e.g., as you might have when defining association multiplicities in
a standard UML editor)?

All the best,

Edd
Re: EuGENia link attributes [message #22080 is a reply to message #21991] Sat, 11 July 2009 21:13 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

This is not supported by EuGENia at the moment but I'll have a look to
see how it could be. Does your metamodel like this?

class Class {

}

class AssociationEnd {
attr String name;
ref Class type;
}

class Association {
val AssociationEnd[2] ends;
}

or like this?

class Class {

}

class Association {
val Class[2] ends;
}

Cheers,
Dimitris

Edward Turner wrote:
> Hi there,
>
> I'm using EuGENia to help with a diagram editor of mine, which creates
> components including GMF links. I can specify labels for these links
> using gmf annotations such as, @gmf.link(... label="name"). I'm now
> wondering whether there is an easy way to go abouts adding labels to the
> ends of the link (e.g., as you might have when defining association
> multiplicities in a standard UML editor)?
>
> All the best,
>
> Edd
>
Re: EuGENia link attributes [message #22866 is a reply to message #22080] Tue, 14 July 2009 12:39 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 92
Registered: July 2009
Member
Dimitris Kolovos wrote:

It is more like the latter, but with 'ref's instead of 'val's -- so more
than one association can comprise the same class:

class Association {
...
ref Class xEnd;
ref Class yEnd;
}


> Cheers,
> Dimitris
Ta,

Edd
Re: EuGENia link attributes [message #22998 is a reply to message #22866] Tue, 14 July 2009 16:29 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

Thanks. I'll have a look at this shortly and get back to you.

Cheers,
Dimitris

Edward Turner wrote:
> Dimitris Kolovos wrote:
>
> It is more like the latter, but with 'ref's instead of 'val's -- so more
> than one association can comprise the same class:
>
> class Association {
> ...
> ref Class xEnd;
> ref Class yEnd;
> }
>
>
>> Cheers,
>> Dimitris
> Ta,
>
> Edd
>
Re: EuGENia link attributes [message #23083 is a reply to message #22998] Mon, 20 July 2009 09:36 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I've put together an example that does this and it's now available under

http://www.eclipse.org/gmt/epsilon/examples/index.php?exampl e=org.eclipse.epsilon.eugenia.examples.endlabels

I've had to use the "polishing" feature of EuGENia

http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/

as multiple connection labels are not currently supported by the
annotations. If you have any trouble adapting the EOL code to your
example please let me know.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Edd,
>
> Thanks. I'll have a look at this shortly and get back to you.
>
> Cheers,
> Dimitris
>
> Edward Turner wrote:
>> Dimitris Kolovos wrote:
>>
>> It is more like the latter, but with 'ref's instead of 'val's -- so
>> more than one association can comprise the same class:
>>
>> class Association {
>> ...
>> ref Class xEnd;
>> ref Class yEnd;
>> }
>>
>>
>>> Cheers,
>>> Dimitris
>> Ta,
>>
>> Edd
>>
Re: EuGENia link attributes [message #23123 is a reply to message #23083] Tue, 21 July 2009 14:45 Go to previous message
No real name is currently offline No real name
Messages: 92
Registered: July 2009
Member
Ahh, brilliant :) Thanks Dimitris -- just what was needed. And I'm sure
this will be handy to know in the long run for everyone!

Ta,

Edd
Re: EuGENia link attributes [message #570485 is a reply to message #21991] Sat, 11 July 2009 21:13 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

This is not supported by EuGENia at the moment but I'll have a look to
see how it could be. Does your metamodel like this?

class Class {

}

class AssociationEnd {
attr String name;
ref Class type;
}

class Association {
val AssociationEnd[2] ends;
}

or like this?

class Class {

}

class Association {
val Class[2] ends;
}

Cheers,
Dimitris

Edward Turner wrote:
> Hi there,
>
> I'm using EuGENia to help with a diagram editor of mine, which creates
> components including GMF links. I can specify labels for these links
> using gmf annotations such as, @gmf.link(... label="name"). I'm now
> wondering whether there is an easy way to go abouts adding labels to the
> ends of the link (e.g., as you might have when defining association
> multiplicities in a standard UML editor)?
>
> All the best,
>
> Edd
>
Re: EuGENia link attributes [message #570815 is a reply to message #22080] Tue, 14 July 2009 12:39 Go to previous message
No real name is currently offline No real name
Messages: 92
Registered: July 2009
Member
Dimitris Kolovos wrote:

It is more like the latter, but with 'ref's instead of 'val's -- so more
than one association can comprise the same class:

class Association {
...
ref Class xEnd;
ref Class yEnd;
}


> Cheers,
> Dimitris
Ta,

Edd
Re: EuGENia link attributes [message #570924 is a reply to message #22866] Tue, 14 July 2009 16:29 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

Thanks. I'll have a look at this shortly and get back to you.

Cheers,
Dimitris

Edward Turner wrote:
> Dimitris Kolovos wrote:
>
> It is more like the latter, but with 'ref's instead of 'val's -- so more
> than one association can comprise the same class:
>
> class Association {
> ...
> ref Class xEnd;
> ref Class yEnd;
> }
>
>
>> Cheers,
>> Dimitris
> Ta,
>
> Edd
>
Re: EuGENia link attributes [message #570958 is a reply to message #22998] Mon, 20 July 2009 09:36 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I've put together an example that does this and it's now available under

http://www.eclipse.org/gmt/epsilon/examples/index.php?exampl e=org.eclipse.epsilon.eugenia.examples.endlabels

I've had to use the "polishing" feature of EuGENia

http://epsilonblog.wordpress.com/2009/06/15/eugenia-polishin g-your-gmf-editor/

as multiple connection labels are not currently supported by the
annotations. If you have any trouble adapting the EOL code to your
example please let me know.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Edd,
>
> Thanks. I'll have a look at this shortly and get back to you.
>
> Cheers,
> Dimitris
>
> Edward Turner wrote:
>> Dimitris Kolovos wrote:
>>
>> It is more like the latter, but with 'ref's instead of 'val's -- so
>> more than one association can comprise the same class:
>>
>> class Association {
>> ...
>> ref Class xEnd;
>> ref Class yEnd;
>> }
>>
>>
>>> Cheers,
>>> Dimitris
>> Ta,
>>
>> Edd
>>
Re: EuGENia link attributes [message #570970 is a reply to message #23083] Tue, 21 July 2009 14:45 Go to previous message
No real name is currently offline No real name
Messages: 92
Registered: July 2009
Member
Ahh, brilliant :) Thanks Dimitris -- just what was needed. And I'm sure
this will be handy to know in the long run for everyone!

Ta,

Edd
Previous Topic:how to give an Ecore DataType to an attribute
Next Topic:ETL rule execution
Goto Forum:
  


Current Time: Thu Oct 23 06:56:19 GMT 2014

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

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