Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Eugenia beginner question: node borders
Eugenia beginner question: node borders [message #18756] Tue, 26 May 2009 11:09 Go to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi there,

I've been experimenting with Eugenia, and it is really handy. To get to
grips with it better, I was wondering whether there are some more emf
files with gmf annotations available? E.g., so that it's possible to see
the effect of all of the supported annotations, as documented in
http://epsilonlabs.wiki.sourceforge.net/EuGENia .

Also, would you be able to tell me how to define the portion of an
annotated emf file, which generates an editor that allows the addition of
a simple rectangle (representing a simple UML class)? More specifically,
the problem I'm having is how to allow the addition of multiple Attributes
to this class -- I've defined them as gmf nodes, which gives them a
border: I would like them to just look like a piece of text in the
containing node (representing a UML class).

Below is a portion of my emf:

@gmf.node(label = "name", figure="rectangle")
class Clazz {
attr String name;
@gmf.compartment(collapsible = "true", layout="list")
val Attribute[*] attributes;
...
}

@gmf.node(label = "name, type", border.width="-1", label.icon = "false",
label.format = "{0} : {1}")
class Attribute {
attr String name;
attr String type;
}

... but having this leads to an editor that allows adding 'Attribute's to
'Clazz'es, each of which has a border which I don't want. Any suggestions
how to do this properly?

Lastly, given the label.format = "{0} : {1}" annotation, I would like the
':' to be visible when I define attributes from the editor (currently I
get just a space between the name (i.e., {0}) and type (i.e., {1}).

If any help can be provided that would be really appreciated, or indeed
pointers to help which I've not been able to find.

Kind regards

Edd
Re: Eugenia beginner question: node borders [message #18779 is a reply to message #18756] Wed, 27 May 2009 08:01 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

Please see comments below.

Edward Turner wrote:
> Hi there,
>
> I've been experimenting with Eugenia, and it is really handy. To get to
> grips with it better, I was wondering whether there are some more emf
> files with gmf annotations available? E.g., so that it's possible to see
> the effect of all of the supported annotations, as documented in
> http://epsilonlabs.wiki.sourceforge.net/EuGENia .

I have quite a few examples but only locally. It sounds like a good idea
though to create something like a EuGENia gallery. Could you please file
a relevant enhancement request in the bugzilla?

>
> Also, would you be able to tell me how to define the portion of an
> annotated emf file, which generates an editor that allows the addition
> of a simple rectangle (representing a simple UML class)? More
> specifically, the problem I'm having is how to allow the addition of
> multiple Attributes to this class -- I've defined them as gmf nodes,
> which gives them a border: I would like them to just look like a piece
> of text in the containing node (representing a UML class).
>
> Below is a portion of my emf:
>
> @gmf.node(label = "name", figure="rectangle")
> class Clazz {
> attr String name;
> @gmf.compartment(collapsible = "true", layout="list")
> val Attribute[*] attributes;
> ...
> }
>
> @gmf.node(label = "name, type", border.width="-1", label.icon = "false",
> label.format = "{0} : {1}")
> class Attribute {
> attr String name;
> attr String type;
> }
>
> .. but having this leads to an editor that allows adding 'Attribute's to
> 'Clazz'es, each of which has a border which I don't want. Any
> suggestions how to do this properly?

I'm afraid EuGENia doesn't support specifying details about the border
of a node at the moment. However, the good news is that we've been
working on an extension mechanism where you'll be able to provide a
complementary .eol transformation next to your .ecore metamodel which
EuGENia will execute straight after the built-in transformation, and in
which you'll be able to specify your customizations over the default
generated models. This will hopefully be made available in an interim
version by the end of the week.

>
> Lastly, given the label.format = "{0} : {1}" annotation, I would like
> the ':' to be visible when I define attributes from the editor
> (currently I get just a space between the name (i.e., {0}) and type
> (i.e., {1}).

That happens because label.format should be label.pattern instead :(
I've just fixed this in the list of annotations.
>
> If any help can be provided that would be really appreciated, or indeed
> pointers to help which I've not been able to find.
>
> Kind regards
>
> Edd
>
Cheers,
Dimitris
Re: Eugenia beginner question: node borders [message #18801 is a reply to message #18779] Wed, 27 May 2009 09:07 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hia,

Ok thanks for the info -- looking forward to the interim

Here's the enhancement request:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=278000

Ta,

Edd
Re: Eugenia beginner question: node borders [message #18824 is a reply to message #18801] Wed, 27 May 2009 09:12 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Ahh -- whoops, sent that last message before I'd finished it!


> Ok thanks for the info -- looking forward to the interim

Instead read as:
... looking forward to the interim version (enabling complementary .eol
transformations used by Eugenia)!

:)
Re: Eugenia beginner question: node borders [message #18846 is a reply to message #18824] Wed, 27 May 2009 14:51 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I've finished implementing this and committed changes to the SVN. I've
also written a brief guide about this in
http://epsilonlabs.wiki.sourceforge.net/EuGENia+Customizatio n

Could you please try to reproduce this? Any comments/suggestions on the
extension or on the wiki page would of course be more than welcome!

Cheers,
Dimitris

Edd wrote:
> Ahh -- whoops, sent that last message before I'd finished it!
>
>
>> Ok thanks for the info -- looking forward to the interim
>
> Instead read as:
> .. looking forward to the interim version (enabling complementary .eol
> transformations used by Eugenia)!
>
> :)
>
>
>
Re: Eugenia beginner question: node borders [message #18913 is a reply to message #18846] Thu, 28 May 2009 11:08 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hia there -- wow, quick response -- looks like it's exactly what I need...
will do some experimenting this afternoon and get back to you :)

Thanks!

Edd
Re: Eugenia beginner question: node borders [message #18979 is a reply to message #18846] Fri, 29 May 2009 15:04 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi again,

(Apologies, I wasn't able to try out the new stuff until now!)...

To get the changes, I followed the standard SVN update procedure that I've
used in the past and I bumped into this error:

Some resources were not updated.
svn: Target path does not exist
svn: REPORT of
'/svnroot/modeling/org.eclipse.gmt.epsilon/!svn/vcc/default' : 500 Internal
Server Error (http://dev.eclipse.org)

Do you have any ideas what the problem could be? Is there something I've
done wrong or have you seen this kind of error before??

Any help would be great,

Cheers,

Edd
Re: Eugenia beginner question: node borders [message #19001 is a reply to message #18846] Fri, 29 May 2009 15:40 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi again,

Further to my most recent post -- despite the strange SVN error, which I
still do not understand -- it seems to have grabbed the necessary
resources, as I am now able to sort out the small diagramming
discrepancies in my original post (and also got your example to work)!
Great!

Since I'm certainly no GMF guru (very far from it), I especially like your
tip of:

1. using Eugenia to generate a diagram editor as normal
2. observing which bits of the diagramming you want to change (e.g., get
rid of borders)
3. identifying the culprits of the ugliness, call these X, within the
gmfgraph file using the GMFGraph model editor and the standard text
editor,
4. writing a customised Ecore2GMF.eol file to find the culprits X and deal
with the accordingly.

Ok, many thanks :)

Edd
Re: Eugenia beginner question: node borders [message #19023 is a reply to message #19001] Mon, 01 June 2009 08:24 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I've come across this SVN error a few times but in most cases I just
wait for a few minutes, try again and then it works.

Glad the extension does what you want :)

Cheers,
Dimitris

Edward Turner wrote:
> Hi again,
>
> Further to my most recent post -- despite the strange SVN error, which I
> still do not understand -- it seems to have grabbed the necessary
> resources, as I am now able to sort out the small diagramming
> discrepancies in my original post (and also got your example to work)!
> Great!
>
> Since I'm certainly no GMF guru (very far from it), I especially like
> your tip of:
>
> 1. using Eugenia to generate a diagram editor as normal
> 2. observing which bits of the diagramming you want to change (e.g., get
> rid of borders)
> 3. identifying the culprits of the ugliness, call these X, within the
> gmfgraph file using the GMFGraph model editor and the standard text editor,
> 4. writing a customised Ecore2GMF.eol file to find the culprits X and
> deal with the accordingly.
>
> Ok, many thanks :)
>
> Edd
>
>
Re: Eugenia beginner question: node borders [message #568432 is a reply to message #18756] Wed, 27 May 2009 08:01 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

Please see comments below.

Edward Turner wrote:
> Hi there,
>
> I've been experimenting with Eugenia, and it is really handy. To get to
> grips with it better, I was wondering whether there are some more emf
> files with gmf annotations available? E.g., so that it's possible to see
> the effect of all of the supported annotations, as documented in
> http://epsilonlabs.wiki.sourceforge.net/EuGENia .

I have quite a few examples but only locally. It sounds like a good idea
though to create something like a EuGENia gallery. Could you please file
a relevant enhancement request in the bugzilla?

>
> Also, would you be able to tell me how to define the portion of an
> annotated emf file, which generates an editor that allows the addition
> of a simple rectangle (representing a simple UML class)? More
> specifically, the problem I'm having is how to allow the addition of
> multiple Attributes to this class -- I've defined them as gmf nodes,
> which gives them a border: I would like them to just look like a piece
> of text in the containing node (representing a UML class).
>
> Below is a portion of my emf:
>
> @gmf.node(label = "name", figure="rectangle")
> class Clazz {
> attr String name;
> @gmf.compartment(collapsible = "true", layout="list")
> val Attribute[*] attributes;
> ...
> }
>
> @gmf.node(label = "name, type", border.width="-1", label.icon = "false",
> label.format = "{0} : {1}")
> class Attribute {
> attr String name;
> attr String type;
> }
>
> .. but having this leads to an editor that allows adding 'Attribute's to
> 'Clazz'es, each of which has a border which I don't want. Any
> suggestions how to do this properly?

I'm afraid EuGENia doesn't support specifying details about the border
of a node at the moment. However, the good news is that we've been
working on an extension mechanism where you'll be able to provide a
complementary .eol transformation next to your .ecore metamodel which
EuGENia will execute straight after the built-in transformation, and in
which you'll be able to specify your customizations over the default
generated models. This will hopefully be made available in an interim
version by the end of the week.

>
> Lastly, given the label.format = "{0} : {1}" annotation, I would like
> the ':' to be visible when I define attributes from the editor
> (currently I get just a space between the name (i.e., {0}) and type
> (i.e., {1}).

That happens because label.format should be label.pattern instead :(
I've just fixed this in the list of annotations.
>
> If any help can be provided that would be really appreciated, or indeed
> pointers to help which I've not been able to find.
>
> Kind regards
>
> Edd
>
Cheers,
Dimitris
Re: Eugenia beginner question: node borders [message #568454 is a reply to message #18779] Wed, 27 May 2009 09:07 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hia,

Ok thanks for the info -- looking forward to the interim

Here's the enhancement request:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=278000

Ta,

Edd
Re: Eugenia beginner question: node borders [message #568473 is a reply to message #18801] Wed, 27 May 2009 09:12 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Ahh -- whoops, sent that last message before I'd finished it!


> Ok thanks for the info -- looking forward to the interim

Instead read as:
... looking forward to the interim version (enabling complementary .eol
transformations used by Eugenia)!

:)
Re: Eugenia beginner question: node borders [message #568496 is a reply to message #18824] Wed, 27 May 2009 14:51 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I've finished implementing this and committed changes to the SVN. I've
also written a brief guide about this in
http://epsilonlabs.wiki.sourceforge.net/EuGENia+Customizatio n

Could you please try to reproduce this? Any comments/suggestions on the
extension or on the wiki page would of course be more than welcome!

Cheers,
Dimitris

Edd wrote:
> Ahh -- whoops, sent that last message before I'd finished it!
>
>
>> Ok thanks for the info -- looking forward to the interim
>
> Instead read as:
> .. looking forward to the interim version (enabling complementary .eol
> transformations used by Eugenia)!
>
> :)
>
>
>
Re: Eugenia beginner question: node borders [message #568552 is a reply to message #18846] Thu, 28 May 2009 11:08 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hia there -- wow, quick response -- looks like it's exactly what I need...
will do some experimenting this afternoon and get back to you :)

Thanks!

Edd
Re: Eugenia beginner question: node borders [message #568600 is a reply to message #18846] Fri, 29 May 2009 15:04 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi again,

(Apologies, I wasn't able to try out the new stuff until now!)...

To get the changes, I followed the standard SVN update procedure that I've
used in the past and I bumped into this error:

Some resources were not updated.
svn: Target path does not exist
svn: REPORT of
'/svnroot/modeling/org.eclipse.gmt.epsilon/!svn/vcc/default' : 500 Internal
Server Error (http://dev.eclipse.org)

Do you have any ideas what the problem could be? Is there something I've
done wrong or have you seen this kind of error before??

Any help would be great,

Cheers,

Edd
Re: Eugenia beginner question: node borders [message #568611 is a reply to message #18846] Fri, 29 May 2009 15:40 Go to previous message
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi again,

Further to my most recent post -- despite the strange SVN error, which I
still do not understand -- it seems to have grabbed the necessary
resources, as I am now able to sort out the small diagramming
discrepancies in my original post (and also got your example to work)!
Great!

Since I'm certainly no GMF guru (very far from it), I especially like your
tip of:

1. using Eugenia to generate a diagram editor as normal
2. observing which bits of the diagramming you want to change (e.g., get
rid of borders)
3. identifying the culprits of the ugliness, call these X, within the
gmfgraph file using the GMFGraph model editor and the standard text
editor,
4. writing a customised Ecore2GMF.eol file to find the culprits X and deal
with the accordingly.

Ok, many thanks :)

Edd
Re: Eugenia beginner question: node borders [message #568640 is a reply to message #19001] Mon, 01 June 2009 08:24 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Edd,

I've come across this SVN error a few times but in most cases I just
wait for a few minutes, try again and then it works.

Glad the extension does what you want :)

Cheers,
Dimitris

Edward Turner wrote:
> Hi again,
>
> Further to my most recent post -- despite the strange SVN error, which I
> still do not understand -- it seems to have grabbed the necessary
> resources, as I am now able to sort out the small diagramming
> discrepancies in my original post (and also got your example to work)!
> Great!
>
> Since I'm certainly no GMF guru (very far from it), I especially like
> your tip of:
>
> 1. using Eugenia to generate a diagram editor as normal
> 2. observing which bits of the diagramming you want to change (e.g., get
> rid of borders)
> 3. identifying the culprits of the ugliness, call these X, within the
> gmfgraph file using the GMFGraph model editor and the standard text editor,
> 4. writing a customised Ecore2GMF.eol file to find the culprits X and
> deal with the accordingly.
>
> Ok, many thanks :)
>
> Edd
>
>
Previous Topic:[Eugenia] Unable to generate GMF files
Next Topic:SVN without subversive?
Goto Forum:
  


Current Time: Thu Apr 25 11:47:40 GMT 2024

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

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

Back to the top