Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Customizing my generated Editor
Customizing my generated Editor [message #15451] Tue, 14 April 2009 08:57 Go to next message
FloatName is currently offline FloatNameFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

first of all I would like to thank for the great work that has been put
into Epsilon. I am evaluating Epsilon to implement the prototype for my
master-thesis which is an editor for as specialized process-modeling DSL.
Once I finished the editor I will have to add features like
remote-database-access, Drag and Drop from a TableViewer onto
diagram-elements.


But first things first, I need to know a few things.


1) Is it possible to customize the fonts, font-size, font-color for a
given node?

2) How to I extend my Nodes to have compartments that are not other nodes
(like attributes/operations in a UML-Class)? Would those things appear in
the tabbed property sheet? Or how could I edit those?

3) Can I specify a 'constant i18nized String' that appears in the middle
of a link that the user cannot edit? (e.g. like having a UML diagram where
'composition' or 'inheritance' would be written on the specific link
instead of the special arrowhead-shape)

4) When customizing the editor, I want to add my own context-menus, etc.
Can I edit plugin.xml 'inside the 'xy.abc.diagram' plugin-project without
loosing those changes whenever I regenerate my editor? What are best
practices for customizing the generated editor compared to techniques when
customizing a traditional GMF-Editor?

Thanks in advance!


Greetings,

Daniel
Re: Customizing my generated Editor [message #15484 is a reply to message #15451] Wed, 15 April 2009 08:04 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Daniel,

Daniel wrote:
> Hi,
>
> first of all I would like to thank for the great work that has been put
> into Epsilon.

Thanks. It's been our pleasure ;)

I am evaluating Epsilon to implement the prototype for my
> master-thesis which is an editor for as specialized process-modeling
> DSL. Once I finished the editor I will have to add features like
> remote-database-access, Drag and Drop from a TableViewer onto
> diagram-elements.
>
>
> But first things first, I need to know a few things.
>

Before answering your questions let me clarify the scope of Eugenia (the
tool you are referring to) a bit. Eugenia is more or less a front-end
for GMF covering the phases from your .ecore to your .gmfgen (i.e. it
doesn't affect the code generation phase from .gmfgen to Java which is
still performed using the built-in GMF tooling). Also Eugenia doesn't
support the full capabilities of GMF (e.g. the full expressiveness of
..gmfgraph) but only a set of commonly used features. Of course, we are
always happy to consider adding new features users ask for. Under these
assumptions my more specific replies are below:

>
> 1) Is it possible to customize the fonts, font-size, font-color for a
> given node?
>
Eugenia doesn't provide support for defining the font-related
information of nodes. However, this should be straightforward so if you
feel you need this please create a new enhancement request in the
bugzilla and we'll try to implement this in the next few weeks.

> 2) How to I extend my Nodes to have compartments that are not other
> nodes (like attributes/operations in a UML-Class)? Would those things
> appear in the tabbed property sheet? Or how could I edit those?

In the @gmf.compartment annotation you can specify layout="list" to get
such a layout.

>
> 3) Can I specify a 'constant i18nized String' that appears in the middle
> of a link that the user cannot edit? (e.g. like having a UML diagram
> where 'composition' or 'inheritance' would be written on the specific
> link instead of the special arrowhead-shape)

Yes. Please have a look at http://epsilonlabs.wiki.sourceforge.net/EuGENia
for more details on this.

>
> 4) When customizing the editor, I want to add my own context-menus, etc.
> Can I edit plugin.xml 'inside the 'xy.abc.diagram' plugin-project
> without loosing those changes whenever I regenerate my editor? What are
> best practices for customizing the generated editor compared to
> techniques when customizing a traditional GMF-Editor?

As I said above, Eugenia doesn't affect the code generation process so
you can still do whatever you'd do if you were only using the built-in
GMF tooling. For this case, I'd put my additional extensions in another
plugin which so that it is beyond the reach of the generator.

>
> Thanks in advance!
>

You are most welcome :)

>
> Greetings,
>
> Daniel
>
Cheers,
Dimitris
Re: Customizing my generated Editor [message #15517 is a reply to message #15484] Wed, 15 April 2009 08:30 Go to previous messageGo to next message
FloatName is currently offline FloatNameFriend
Messages: 4
Registered: July 2009
Junior Member
> Before answering your questions let me clarify the scope of Eugenia (the
> tool you are referring to) a bit. Eugenia is more or less a front-end
> for GMF covering the phases from your .ecore to your .gmfgen (i.e. it
> doesn't affect the code generation phase from .gmfgen to Java which is
> still performed using the built-in GMF tooling). Also Eugenia doesn't
> support the full capabilities of GMF (e.g. the full expressiveness of
> ..gmfgraph) but only a set of commonly used features. Of course, we are
> always happy to consider adding new features users ask for. Under these
> assumptions my more specific replies are below:

Thank you for this clarification. I dug through the newslist and I found a
similiar statement in some other thread. Unfortunately it was after I
posted my questions. ;)

I have successfully used Eugenia to prototype my Editor. Once my Domain
model is fully covered, I will leave the Emfatic file and only edit the
GMF-related models.

If it wasnt for Eugenia to kickstart my GMF-development I would probably
have given up on GMF due to initial complexity and some strange
tooling-bugs (I was not able to add a figure to a node in my initial
GMFGraph model in my blank GMF-Project, etc).

> Eugenia doesn't provide support for defining the font-related
> information of nodes. However, this should be straightforward so if you
> feel you need this please create a new enhancement request in the
> bugzilla and we'll try to implement this in the next few weeks.

I would be nice to do so, because the other "style"-related attributes
like borders, etc are there from the beginning too. I saw a bug in
bugzilla that contains some kind of 'wishlist' from another user that
already covers the definition of fonts as annotations. Should I really
create a new bug? That would be a duplicate imo.

> In the @gmf.compartment annotation you can specify layout="list" to get
> such a layout.

I tried to do that, but my property sheet stays empty, here is my source:

[...]

@gmf.node( label = "name", color="251,216,75",
label.icon="false", tool.name="Prozessschritt",
tool.description="Einen Prozessschritt hinzufügen"
)
class ProzessSchritt {

unique readonly attr Long ID;
attr String name;
val Attribut[*] attribute; <---- ****
}

class Attribut {
attr Long identifier;
attr String name;
attr String einheit;
attr String typ;
attr String untereGrenze;
attr String obereGrenze;
}

[...]

I saw an "id" modifier in the emfatic reference, but it had no sample
attached. Could I use that to achieve the same effect that I used with
"unique readonly attr Long ID;"?

Did I miss the @gmf.compartement annotation on **** ? ;) Will this always
include Attribute instances in the diagram view or just in the property
sheet? I would like to have it in the property sheet only for now, because
I think that my diagram would get filled up with lots of text if it was
drawn as a list-like compartement in the view.


> Yes. Please have a look at http://epsilonlabs.wiki.sourceforge.net/EuGENia
> for more details on this.

Ok, I thought I studied this well enough, but I am gonna look at it again.
Is it the part with phantom nodes?

> As I said above, Eugenia doesn't affect the code generation process so
> you can still do whatever you'd do if you were only using the built-in
> GMF tooling. For this case, I'd put my additional extensions in another
> plugin which so that it is beyond the reach of the generator.

Thanks. I will try to look at the STP BPMN Modeler to try to get some best
practices there. I mean if you can build an entire BPMN modeler with GMF,
my tiny process metamodel should be doable as well. I am just a little
scared of not being able to customize something, but then again writing
the entire thing in GEF takes a lot of time, too, I guess.

Thank you again!

Cheers,

Daniel
Re: Customizing my generated Editor [message #15549 is a reply to message #15517] Wed, 15 April 2009 09:05 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Daniel,

FloatName wrote:
>> Before answering your questions let me clarify the scope of Eugenia
>> (the tool you are referring to) a bit. Eugenia is more or less a
>> front-end for GMF covering the phases from your .ecore to your .gmfgen
>> (i.e. it doesn't affect the code generation phase from .gmfgen to Java
>> which is still performed using the built-in GMF tooling). Also Eugenia
>> doesn't support the full capabilities of GMF (e.g. the full
>> expressiveness of ..gmfgraph) but only a set of commonly used
>> features. Of course, we are always happy to consider adding new
>> features users ask for. Under these assumptions my more specific
>> replies are below:
>
> Thank you for this clarification. I dug through the newslist and I found
> a similiar statement in some other thread. Unfortunately it was after I
> posted my questions. ;)

No worries.

>
> I have successfully used Eugenia to prototype my Editor. Once my Domain
> model is fully covered, I will leave the Emfatic file and only edit the
> GMF-related models.
> If it wasnt for Eugenia to kickstart my GMF-development I would probably
> have given up on GMF due to initial complexity and some strange
> tooling-bugs (I was not able to add a figure to a node in my initial
> GMFGraph model in my blank GMF-Project, etc).

Glad to hear that Eugenia helped convincing you to stay with GMF. If you
can reproduce these bugs I'd suggest you let the GMF team know (either
through the newsgroup or bugzilla) - if you haven't already done that.
In the long run, better built-in GMF tools would be beneficial for everyone.

>
>> Eugenia doesn't provide support for defining the font-related
>> information of nodes. However, this should be straightforward so if
>> you feel you need this please create a new enhancement request in the
>> bugzilla and we'll try to implement this in the next few weeks.
>
> I would be nice to do so, because the other "style"-related attributes
> like borders, etc are there from the beginning too. I saw a bug in
> bugzilla that contains some kind of 'wishlist' from another user that
> already covers the definition of fonts as annotations. Should I really
> create a new bug? That would be a duplicate imo.

Retrospectively, the idea of an aggregate wishlist wasn't that good
because we now can't tick bugs off. For example, we've fixed some of the
features of wishlist #1 and some of #2, while some others are of lower
priorty, but there is no PARTIALLY_FIXED flag in the bugzilla ;)

>
>> In the @gmf.compartment annotation you can specify layout="list" to
>> get such a layout.
>
> I tried to do that, but my property sheet stays empty, here is my source:
>
> [...]
>
> @gmf.node( label = "name", color="251,216,75",
> label.icon="false", tool.name="Prozessschritt",
> tool.description="Einen Prozessschritt hinzufügen"
> )
> class ProzessSchritt {
>
> unique readonly attr Long ID;
> attr String name;
> val Attribut[*] attribute; <---- ****
> }
> class Attribut {
> attr Long identifier;
> attr String name;
> attr String einheit;
> attr String typ;
> attr String untereGrenze;
> attr String obereGrenze;
> }
>
> [...]
>
> I saw an "id" modifier in the emfatic reference, but it had no sample
> attached. Could I use that to achieve the same effect that I used with
> "unique readonly attr Long ID;"?
>
> Did I miss the @gmf.compartement annotation on **** ? ;) Will this
> always include Attribute instances in the diagram view or just in the
> property sheet? I would like to have it in the property sheet only for
> now, because I think that my diagram would get filled up with lots of
> text if it was drawn as a list-like compartement in the view.

I now see what you mean. Unfortunately this appears to be one of the
weak spots of GMF. There's no out-of-the-box way to do this, so to add
non-visible elements to your model you'll need to either integrate a
tree-based EMF editor with your GMF editor (as per
http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html)
or to do this through custom actions/UIs.

>
>
>> Yes. Please have a look at
>> http://epsilonlabs.wiki.sourceforge.net/EuGENia
>> for more details on this.
>
> Ok, I thought I studied this well enough, but I am gonna look at it
> again. Is it the part with phantom nodes?
>

No. Reading your original question again, I think you have a point here.
If your link represents an EReference then you can specify
@gmf.link(label="xyz") and xyz will be an immutable string appearing in
the middle of the link. However, if your link represents an instance of
an EClass the value of label="xyz" is not a static string xyz rather
than the value of the xyz EAttribute... Another enhancement request
appears to be in order here...

>> As I said above, Eugenia doesn't affect the code generation process so
>> you can still do whatever you'd do if you were only using the built-in
>> GMF tooling. For this case, I'd put my additional extensions in
>> another plugin which so that it is beyond the reach of the generator.
>
> Thanks. I will try to look at the STP BPMN Modeler to try to get some
> best practices there. I mean if you can build an entire BPMN modeler
> with GMF, my tiny process metamodel should be doable as well. I am just
> a little scared of not being able to customize something, but then again
> writing the entire thing in GEF takes a lot of time, too, I guess.

Sounds like a reasonable strategy :)
>
> Thank you again!
>
> Cheers,
>
> Daniel
>
>
>

Cheers,
Dimitris
Re: Customizing my generated Editor [message #566682 is a reply to message #15451] Wed, 15 April 2009 08:04 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Daniel,

Daniel wrote:
> Hi,
>
> first of all I would like to thank for the great work that has been put
> into Epsilon.

Thanks. It's been our pleasure ;)

I am evaluating Epsilon to implement the prototype for my
> master-thesis which is an editor for as specialized process-modeling
> DSL. Once I finished the editor I will have to add features like
> remote-database-access, Drag and Drop from a TableViewer onto
> diagram-elements.
>
>
> But first things first, I need to know a few things.
>

Before answering your questions let me clarify the scope of Eugenia (the
tool you are referring to) a bit. Eugenia is more or less a front-end
for GMF covering the phases from your .ecore to your .gmfgen (i.e. it
doesn't affect the code generation phase from .gmfgen to Java which is
still performed using the built-in GMF tooling). Also Eugenia doesn't
support the full capabilities of GMF (e.g. the full expressiveness of
..gmfgraph) but only a set of commonly used features. Of course, we are
always happy to consider adding new features users ask for. Under these
assumptions my more specific replies are below:

>
> 1) Is it possible to customize the fonts, font-size, font-color for a
> given node?
>
Eugenia doesn't provide support for defining the font-related
information of nodes. However, this should be straightforward so if you
feel you need this please create a new enhancement request in the
bugzilla and we'll try to implement this in the next few weeks.

> 2) How to I extend my Nodes to have compartments that are not other
> nodes (like attributes/operations in a UML-Class)? Would those things
> appear in the tabbed property sheet? Or how could I edit those?

In the @gmf.compartment annotation you can specify layout="list" to get
such a layout.

>
> 3) Can I specify a 'constant i18nized String' that appears in the middle
> of a link that the user cannot edit? (e.g. like having a UML diagram
> where 'composition' or 'inheritance' would be written on the specific
> link instead of the special arrowhead-shape)

Yes. Please have a look at http://epsilonlabs.wiki.sourceforge.net/EuGENia
for more details on this.

>
> 4) When customizing the editor, I want to add my own context-menus, etc.
> Can I edit plugin.xml 'inside the 'xy.abc.diagram' plugin-project
> without loosing those changes whenever I regenerate my editor? What are
> best practices for customizing the generated editor compared to
> techniques when customizing a traditional GMF-Editor?

As I said above, Eugenia doesn't affect the code generation process so
you can still do whatever you'd do if you were only using the built-in
GMF tooling. For this case, I'd put my additional extensions in another
plugin which so that it is beyond the reach of the generator.

>
> Thanks in advance!
>

You are most welcome :)

>
> Greetings,
>
> Daniel
>
Cheers,
Dimitris
Re: Customizing my generated Editor [message #566709 is a reply to message #15484] Wed, 15 April 2009 08:30 Go to previous message
FloatName is currently offline FloatNameFriend
Messages: 4
Registered: July 2009
Junior Member
> Before answering your questions let me clarify the scope of Eugenia (the
> tool you are referring to) a bit. Eugenia is more or less a front-end
> for GMF covering the phases from your .ecore to your .gmfgen (i.e. it
> doesn't affect the code generation phase from .gmfgen to Java which is
> still performed using the built-in GMF tooling). Also Eugenia doesn't
> support the full capabilities of GMF (e.g. the full expressiveness of
> ..gmfgraph) but only a set of commonly used features. Of course, we are
> always happy to consider adding new features users ask for. Under these
> assumptions my more specific replies are below:

Thank you for this clarification. I dug through the newslist and I found a
similiar statement in some other thread. Unfortunately it was after I
posted my questions. ;)

I have successfully used Eugenia to prototype my Editor. Once my Domain
model is fully covered, I will leave the Emfatic file and only edit the
GMF-related models.

If it wasnt for Eugenia to kickstart my GMF-development I would probably
have given up on GMF due to initial complexity and some strange
tooling-bugs (I was not able to add a figure to a node in my initial
GMFGraph model in my blank GMF-Project, etc).

> Eugenia doesn't provide support for defining the font-related
> information of nodes. However, this should be straightforward so if you
> feel you need this please create a new enhancement request in the
> bugzilla and we'll try to implement this in the next few weeks.

I would be nice to do so, because the other "style"-related attributes
like borders, etc are there from the beginning too. I saw a bug in
bugzilla that contains some kind of 'wishlist' from another user that
already covers the definition of fonts as annotations. Should I really
create a new bug? That would be a duplicate imo.

> In the @gmf.compartment annotation you can specify layout="list" to get
> such a layout.

I tried to do that, but my property sheet stays empty, here is my source:

[...]

@gmf.node( label = "name", color="251,216,75",
label.icon="false", tool.name="Prozessschritt",
tool.description="Einen Prozessschritt hinzufügen"
)
class ProzessSchritt {

unique readonly attr Long ID;
attr String name;
val Attribut[*] attribute; <---- ****
}

class Attribut {
attr Long identifier;
attr String name;
attr String einheit;
attr String typ;
attr String untereGrenze;
attr String obereGrenze;
}

[...]

I saw an "id" modifier in the emfatic reference, but it had no sample
attached. Could I use that to achieve the same effect that I used with
"unique readonly attr Long ID;"?

Did I miss the @gmf.compartement annotation on **** ? ;) Will this always
include Attribute instances in the diagram view or just in the property
sheet? I would like to have it in the property sheet only for now, because
I think that my diagram would get filled up with lots of text if it was
drawn as a list-like compartement in the view.


> Yes. Please have a look at http://epsilonlabs.wiki.sourceforge.net/EuGENia
> for more details on this.

Ok, I thought I studied this well enough, but I am gonna look at it again.
Is it the part with phantom nodes?

> As I said above, Eugenia doesn't affect the code generation process so
> you can still do whatever you'd do if you were only using the built-in
> GMF tooling. For this case, I'd put my additional extensions in another
> plugin which so that it is beyond the reach of the generator.

Thanks. I will try to look at the STP BPMN Modeler to try to get some best
practices there. I mean if you can build an entire BPMN modeler with GMF,
my tiny process metamodel should be doable as well. I am just a little
scared of not being able to customize something, but then again writing
the entire thing in GEF takes a lot of time, too, I guess.

Thank you again!

Cheers,

Daniel
Re: Customizing my generated Editor [message #566725 is a reply to message #15517] Wed, 15 April 2009 09:05 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Daniel,

FloatName wrote:
>> Before answering your questions let me clarify the scope of Eugenia
>> (the tool you are referring to) a bit. Eugenia is more or less a
>> front-end for GMF covering the phases from your .ecore to your .gmfgen
>> (i.e. it doesn't affect the code generation phase from .gmfgen to Java
>> which is still performed using the built-in GMF tooling). Also Eugenia
>> doesn't support the full capabilities of GMF (e.g. the full
>> expressiveness of ..gmfgraph) but only a set of commonly used
>> features. Of course, we are always happy to consider adding new
>> features users ask for. Under these assumptions my more specific
>> replies are below:
>
> Thank you for this clarification. I dug through the newslist and I found
> a similiar statement in some other thread. Unfortunately it was after I
> posted my questions. ;)

No worries.

>
> I have successfully used Eugenia to prototype my Editor. Once my Domain
> model is fully covered, I will leave the Emfatic file and only edit the
> GMF-related models.
> If it wasnt for Eugenia to kickstart my GMF-development I would probably
> have given up on GMF due to initial complexity and some strange
> tooling-bugs (I was not able to add a figure to a node in my initial
> GMFGraph model in my blank GMF-Project, etc).

Glad to hear that Eugenia helped convincing you to stay with GMF. If you
can reproduce these bugs I'd suggest you let the GMF team know (either
through the newsgroup or bugzilla) - if you haven't already done that.
In the long run, better built-in GMF tools would be beneficial for everyone.

>
>> Eugenia doesn't provide support for defining the font-related
>> information of nodes. However, this should be straightforward so if
>> you feel you need this please create a new enhancement request in the
>> bugzilla and we'll try to implement this in the next few weeks.
>
> I would be nice to do so, because the other "style"-related attributes
> like borders, etc are there from the beginning too. I saw a bug in
> bugzilla that contains some kind of 'wishlist' from another user that
> already covers the definition of fonts as annotations. Should I really
> create a new bug? That would be a duplicate imo.

Retrospectively, the idea of an aggregate wishlist wasn't that good
because we now can't tick bugs off. For example, we've fixed some of the
features of wishlist #1 and some of #2, while some others are of lower
priorty, but there is no PARTIALLY_FIXED flag in the bugzilla ;)

>
>> In the @gmf.compartment annotation you can specify layout="list" to
>> get such a layout.
>
> I tried to do that, but my property sheet stays empty, here is my source:
>
> [...]
>
> @gmf.node( label = "name", color="251,216,75",
> label.icon="false", tool.name="Prozessschritt",
> tool.description="Einen Prozessschritt hinzufügen"
> )
> class ProzessSchritt {
>
> unique readonly attr Long ID;
> attr String name;
> val Attribut[*] attribute; <---- ****
> }
> class Attribut {
> attr Long identifier;
> attr String name;
> attr String einheit;
> attr String typ;
> attr String untereGrenze;
> attr String obereGrenze;
> }
>
> [...]
>
> I saw an "id" modifier in the emfatic reference, but it had no sample
> attached. Could I use that to achieve the same effect that I used with
> "unique readonly attr Long ID;"?
>
> Did I miss the @gmf.compartement annotation on **** ? ;) Will this
> always include Attribute instances in the diagram view or just in the
> property sheet? I would like to have it in the property sheet only for
> now, because I think that my diagram would get filled up with lots of
> text if it was drawn as a list-like compartement in the view.

I now see what you mean. Unfortunately this appears to be one of the
weak spots of GMF. There's no out-of-the-box way to do this, so to add
non-visible elements to your model you'll need to either integrate a
tree-based EMF editor with your GMF editor (as per
http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html)
or to do this through custom actions/UIs.

>
>
>> Yes. Please have a look at
>> http://epsilonlabs.wiki.sourceforge.net/EuGENia
>> for more details on this.
>
> Ok, I thought I studied this well enough, but I am gonna look at it
> again. Is it the part with phantom nodes?
>

No. Reading your original question again, I think you have a point here.
If your link represents an EReference then you can specify
@gmf.link(label="xyz") and xyz will be an immutable string appearing in
the middle of the link. However, if your link represents an instance of
an EClass the value of label="xyz" is not a static string xyz rather
than the value of the xyz EAttribute... Another enhancement request
appears to be in order here...

>> As I said above, Eugenia doesn't affect the code generation process so
>> you can still do whatever you'd do if you were only using the built-in
>> GMF tooling. For this case, I'd put my additional extensions in
>> another plugin which so that it is beyond the reach of the generator.
>
> Thanks. I will try to look at the STP BPMN Modeler to try to get some
> best practices there. I mean if you can build an entire BPMN modeler
> with GMF, my tiny process metamodel should be doable as well. I am just
> a little scared of not being able to customize something, but then again
> writing the entire thing in GEF takes a lot of time, too, I guess.

Sounds like a reasonable strategy :)
>
> Thank you again!
>
> Cheers,
>
> Daniel
>
>
>

Cheers,
Dimitris
Previous Topic:Customizing my generated Editor
Next Topic:HUTN generated no model
Goto Forum:
  


Current Time: Thu Apr 25 10:12:27 GMT 2024

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

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

Back to the top