Skip to main content



      Home
Home » Modeling » Epsilon » EuGENia link attributes
EuGENia link attributes [message #21991] Fri, 10 July 2009 20:05 Go to next message
Eclipse UserFriend
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 17:13 Go to previous messageGo to next message
Eclipse UserFriend
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 08:39 Go to previous messageGo to next message
Eclipse UserFriend
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 12:29 Go to previous messageGo to next message
Eclipse UserFriend
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 05:36 Go to previous messageGo to next message
Eclipse UserFriend
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 10:45 Go to previous message
Eclipse UserFriend
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 17:13 Go to previous message
Eclipse UserFriend
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 08:39 Go to previous message
Eclipse UserFriend
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 12:29 Go to previous message
Eclipse UserFriend
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 05:36 Go to previous message
Eclipse UserFriend
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 10:45 Go to previous message
Eclipse UserFriend
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: Wed Apr 23 22:54:30 EDT 2025

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

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

Back to the top