Home » Modeling » Epsilon » Eugenia beginner question: node borders
Eugenia beginner question: node borders [message #18756] |
Tue, 26 May 2009 11:09 |
No real name 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 |
Dimitrios Kolovos 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 #19001 is a reply to message #18846] |
Fri, 29 May 2009 15:40 |
No real name 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 |
Dimitrios Kolovos 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 |
Dimitrios Kolovos 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 #568611 is a reply to message #18846] |
Fri, 29 May 2009 15:40 |
No real name 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 |
Dimitrios Kolovos 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
>
>
|
|
|
Goto Forum:
Current Time: Wed Feb 05 18:58:42 GMT 2025
Powered by FUDForum. Page generated in 0.03589 seconds
|