Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Ecore Tools] How to make lines show up for super types and references?
[Ecore Tools] How to make lines show up for super types and references? [message #105421] Thu, 27 December 2007 14:24 Go to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------040400090207060903030508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I wanted to help with 212409 <http://bugs.eclipse.org/212409>. But I
know so little about GMF that I don't know where to begin. What's I was
imagining was the ability to show a label on inheritance and reference
lines that represent the generic parameters. Such a label would only be
shown if the super type or the reference type has type parameters. I
could then look into how to parse the user-modified text to build the
proper EGenericType. Probably I'll start by trying to get it to work
for operations and attributes...

I was also playing with the editor (it's very cool!) to build a diagram
and I was at a complete loss for how to make inheritance and reference
lines show up in the editor. I feel kind of stupid asking how to do
that, but try as I might, I have not been able to figure it out on my
own. I tried even with the simple library model and I can drag classes
into the diagram, but I don't now how to make the lines show up. A hint
from anyone would be greatly appreciated.

--------------040400090207060903030508
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I wanted to help with <a href="http://bugs.eclipse.org/212409"
class="external text" title="http://bugs.eclipse.org/212409"
rel="nofollow">212409</a>.&nbsp; But I know so little about GMF that I
don't know where to begin.&nbsp; What's I was imagining was the ability to
show a label on inheritance and reference lines that represent the
generic parameters.&nbsp; Such a label would only be shown if the super type
or the reference type has type parameters.&nbsp; I could then look into how
to parse the user-modified text to build the proper EGenericType.&nbsp;&nbsp;
Probably I'll start by trying to get it to work for operations and
attributes...<br>
<br>
I was also playing with the editor (it's very cool!) to build a diagram
and I was at a complete loss for how to make inheritance and reference
lines show up in the editor.&nbsp; I feel kind of stupid asking how to do
that, but try as I might, I have not been able to figure it out on my
own.&nbsp; I tried even with the simple library model and I can drag classes
into the diagram, but I don't now how to make the lines show up.&nbsp; A
hint from anyone would be greatly appreciated.<br>
</body>
</html>

--------------040400090207060903030508--
Re: [Ecore Tools] How to make lines show up for super types and references? [message #105613 is a reply to message #105421] Wed, 02 January 2008 11:37 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Ed,

Yes, it is possible to show a label on these links, and then probably
show/hide them depending on whether generic parameters are available or
not. I will try to modify the generator files to support this new label
on these connections before the end of the week so that you can see what
is possible. You can already start from the attributes/operations as the
label is still present.

Diagram initialization from a domain model works, but we are facing a
refreshment problem for connections. After drag and drop elements from
the outline view, connections are not immediately displayed. A bug has
been open for fixing this :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
For now, you can enforce the diagram to be refreshed by creating a new
EClass from the Palette.

Regards,
Jacques

Ed Merks a écrit :
> Hi,
>
> I wanted to help with 212409 <http://bugs.eclipse.org/212409>. But I
> know so little about GMF that I don't know where to begin. What's I was
> imagining was the ability to show a label on inheritance and reference
> lines that represent the generic parameters. Such a label would only be
> shown if the super type or the reference type has type parameters. I
> could then look into how to parse the user-modified text to build the
> proper EGenericType. Probably I'll start by trying to get it to work
> for operations and attributes...
>
> I was also playing with the editor (it's very cool!) to build a diagram
> and I was at a complete loss for how to make inheritance and reference
> lines show up in the editor. I feel kind of stupid asking how to do
> that, but try as I might, I have not been able to figure it out on my
> own. I tried even with the simple library model and I can drag classes
> into the diagram, but I don't now how to make the lines show up. A hint
> from anyone would be greatly appreciated.
Re: [Ecore Tools] How to make lines show up for super types and references? [message #105644 is a reply to message #105613] Wed, 02 January 2008 12:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------070600020304090207000506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Jacques,

I see! Cool. I did notice that my behavior in the bootstrapped main
Eclipse is different from the runtime workbench that I launch. In the
main Eclipse, the diagram starts out empty and when I drag classes onto
it they are pale yellow:


Should I be able to delete a reference from the diagram? And then be
able to use drag and drop to make it show again? I noticed that drag
and drop from the outline doesn't work unless the outline view is first
given focus. Is that a bug or a limitation?

In the runtime workbench, the diagram is fully populated:


This is interesting because the serialized file doesn't show any
structure at all:

<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
xmi:id="_Y51qwLktEdyURdEKF94I9A" type="Ecore" measurementUnit="Pixel">
<styles xmi:type="notation:DiagramStyle"
xmi:id="_Y5_bwLktEdyURdEKF94I9A"/>
<element xmi:type="ecore:EPackage" href="library.ecore#/"/>
</notation:Diagram>

I gather there is some funky magic that prepopulates this; I was
stepping through the code with an eye towards how to make it populate
classes from others models with there are EReferences or EClasses that
refer to them. I find I always want to move the results away from the
edges a little bit so it's easier on the eyes. I suppose GMF could be
configured to do that. I also have this compulsion to normally want
super type arrows to go upward, but I understand that graphical layout
is a really hard problem...

I suppose the difference in behavior between my main workbench and the
runtime one is something to do with how I've built the plugins (as
described in http://wiki.eclipse.org/EMF/Getting_Source) , but I'm not
sure what's the cause and wondered if you had a clue. In any case, I
gather there is work going on to allow the JDT to compile against
external plugins and if that's supported we can use exactly the save way
of launch the main eclipse as is used for the runtime eclipse and
thereby avoid all the gross things we are doing to bootstrap...

I have so much to learn! It's so cool to be the one asking questions
for a change. :-P


Jacques LESCOT wrote:
> Ed,
>
> Yes, it is possible to show a label on these links, and then probably
> show/hide them depending on whether generic parameters are available
> or not. I will try to modify the generator files to support this new
> label on these connections before the end of the week so that you can
> see what is possible. You can already start from the
> attributes/operations as the label is still present.
>
> Diagram initialization from a domain model works, but we are facing a
> refreshment problem for connections. After drag and drop elements from
> the outline view, connections are not immediately displayed. A bug has
> been open for fixing this :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
> For now, you can enforce the diagram to be refreshed by creating a new
> EClass from the Palette.
>
> Regards,
> Jacques
>
> Ed Merks a
Re: [Ecore Tools] How to make lines show up for super types and references? [message #105681 is a reply to message #105644] Wed, 02 January 2008 14:58 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
This is an unexpected behavior due to compatibility problems while
installing both the Ecore Tools editor and the GMF Example Ecore Editor.

The creation of a graphical representation of a domain element ask for a
Service defined through GMF extension points. Unfortunately, each
generated editor provide similar extensions, and this produces a mix of
the two editors ! (see bug 212768 :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214113)

We are looking for a way to differentiate them, and eventually think of
a better way to perform this at the GMF level. But currently, disabling
GMF Example Ecore Editor should prevent this.

It is not possible to remove an EReference graphically, but we are
working on an advanced mode that could be used to show/hide elements in
the diagram. We have choosen to use a "synchronized" diagram mode while
generating the editor with GMF, because it automatically updates the
diagram on changes made at the domain level only and always ensure that
the diagram is well synchronized.

The problem of DND from the outline when the focus is not initially set,
see bug 212768 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=212768). I
have a working solution on my machine, but waiting a few days before
committing the code.

Your populated diagram seems to be populated using GMF Example Ecore
Editor instead of using Ecore Tools editor : in both cases, the
serialized file will contains informations about graphical elements as
soon as you will have save your diagram a first time. In fact, after
initializing the diagram, as the layout could be performed
automatically, there is no need to serialize them : but once you move an
EClass for example, and then save the editor, each graphical elements
will be serialized.

We have also so much to learn, and it is a great pleasure, and I am
proud to answer questions asked by EMF gurus ! :-)


Ed Merks a écrit :
> Jacques,
>
> I see! Cool. I did notice that my behavior in the bootstrapped main
> Eclipse is different from the runtime workbench that I launch. In the
> main Eclipse, the diagram starts out empty and when I drag classes onto
> it they are pale yellow:
>
>
> Should I be able to delete a reference from the diagram? And then be
> able to use drag and drop to make it show again? I noticed that drag
> and drop from the outline doesn't work unless the outline view is first
> given focus. Is that a bug or a limitation?
>
> In the runtime workbench, the diagram is fully populated:
>
>
> This is interesting because the serialized file doesn't show any
> structure at all:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <notation:Diagram xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
> xmi:id="_Y51qwLktEdyURdEKF94I9A" type="Ecore" measurementUnit="Pixel">
> <styles xmi:type="notation:DiagramStyle"
> xmi:id="_Y5_bwLktEdyURdEKF94I9A"/>
> <element xmi:type="ecore:EPackage" href="library.ecore#/"/>
> </notation:Diagram>
>
> I gather there is some funky magic that prepopulates this; I was
> stepping through the code with an eye towards how to make it populate
> classes from others models with there are EReferences or EClasses that
> refer to them. I find I always want to move the results away from the
> edges a little bit so it's easier on the eyes. I suppose GMF could be
> configured to do that. I also have this compulsion to normally want
> super type arrows to go upward, but I understand that graphical layout
> is a really hard problem...
>
> I suppose the difference in behavior between my main workbench and the
> runtime one is something to do with how I've built the plugins (as
> described in http://wiki.eclipse.org/EMF/Getting_Source) , but I'm not
> sure what's the cause and wondered if you had a clue. In any case, I
> gather there is work going on to allow the JDT to compile against
> external plugins and if that's supported we can use exactly the save way
> of launch the main eclipse as is used for the runtime eclipse and
> thereby avoid all the gross things we are doing to bootstrap...
>
> I have so much to learn! It's so cool to be the one asking questions
> for a change. :-P
>
>
> Jacques LESCOT wrote:
>> Ed,
>>
>> Yes, it is possible to show a label on these links, and then probably
>> show/hide them depending on whether generic parameters are available
>> or not. I will try to modify the generator files to support this new
>> label on these connections before the end of the week so that you can
>> see what is possible. You can already start from the
>> attributes/operations as the label is still present.
>>
>> Diagram initialization from a domain model works, but we are facing a
>> refreshment problem for connections. After drag and drop elements from
>> the outline view, connections are not immediately displayed. A bug has
>> been open for fixing this :
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
>> For now, you can enforce the diagram to be refreshed by creating a new
>> EClass from the Palette.
>>
>> Regards,
>> Jacques
>>
>> Ed Merks a écrit :
>>> Hi,
>>>
>>> I wanted to help with 212409 <http://bugs.eclipse.org/212409>. But I
>>> know so little about GMF that I don't know where to begin. What's I
>>> was imagining was the ability to show a label on inheritance and
>>> reference lines that represent the generic parameters. Such a label
>>> would only be shown if the super type or the reference type has type
>>> parameters. I could then look into how to parse the user-modified
>>> text to build the proper EGenericType. Probably I'll start by
>>> trying to get it to work for operations and attributes...
>>>
>>> I was also playing with the editor (it's very cool!) to build a
>>> diagram and I was at a complete loss for how to make inheritance and
>>> reference lines show up in the editor. I feel kind of stupid asking
>>> how to do that, but try as I might, I have not been able to figure it
>>> out on my own. I tried even with the simple library model and I can
>>> drag classes into the diagram, but I don't now how to make the lines
>>> show up. A hint from anyone would be greatly appreciated.
>
Re: [Ecore Tools] How to make lines show up for super types and references? [message #105709 is a reply to message #105681] Wed, 02 January 2008 18:49 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Jacques,

Silly me. That never occurred to me! I will stop extracting/installing
the GMF Example Ecore Editor to avoid such confusion in the future...


Jacques LESCOT wrote:
> This is an unexpected behavior due to compatibility problems while
> installing both the Ecore Tools editor and the GMF Example Ecore Editor.
>
> The creation of a graphical representation of a domain element ask for
> a Service defined through GMF extension points. Unfortunately, each
> generated editor provide similar extensions, and this produces a mix
> of the two editors ! (see bug 212768 :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214113)
>
> We are looking for a way to differentiate them, and eventually think
> of a better way to perform this at the GMF level. But currently,
> disabling GMF Example Ecore Editor should prevent this.
>
> It is not possible to remove an EReference graphically, but we are
> working on an advanced mode that could be used to show/hide elements
> in the diagram. We have choosen to use a "synchronized" diagram mode
> while generating the editor with GMF, because it automatically updates
> the diagram on changes made at the domain level only and always ensure
> that the diagram is well synchronized.
>
> The problem of DND from the outline when the focus is not initially
> set, see bug 212768
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=212768). I have a
> working solution on my machine, but waiting a few days before
> committing the code.
>
> Your populated diagram seems to be populated using GMF Example Ecore
> Editor instead of using Ecore Tools editor : in both cases, the
> serialized file will contains informations about graphical elements as
> soon as you will have save your diagram a first time. In fact, after
> initializing the diagram, as the layout could be performed
> automatically, there is no need to serialize them : but once you move
> an EClass for example, and then save the editor, each graphical
> elements will be serialized.
>
> We have also so much to learn, and it is a great pleasure, and I am
> proud to answer questions asked by EMF gurus ! :-)
>
>
> Ed Merks a écrit :
>> Jacques,
>>
>> I see! Cool. I did notice that my behavior in the bootstrapped main
>> Eclipse is different from the runtime workbench that I launch. In
>> the main Eclipse, the diagram starts out empty and when I drag
>> classes onto it they are pale yellow:
>>
>>
>> Should I be able to delete a reference from the diagram? And then be
>> able to use drag and drop to make it show again? I noticed that drag
>> and drop from the outline doesn't work unless the outline view is
>> first given focus. Is that a bug or a limitation?
>>
>> In the runtime workbench, the diagram is fully populated:
>>
>>
>> This is interesting because the serialized file doesn't show any
>> structure at all:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <notation:Diagram xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>> xmi:id="_Y51qwLktEdyURdEKF94I9A" type="Ecore"
>> measurementUnit="Pixel">
>> <styles xmi:type="notation:DiagramStyle"
>> xmi:id="_Y5_bwLktEdyURdEKF94I9A"/>
>> <element xmi:type="ecore:EPackage" href="library.ecore#/"/>
>> </notation:Diagram>
>>
>> I gather there is some funky magic that prepopulates this; I was
>> stepping through the code with an eye towards how to make it populate
>> classes from others models with there are EReferences or EClasses
>> that refer to them. I find I always want to move the results away
>> from the edges a little bit so it's easier on the eyes. I suppose
>> GMF could be configured to do that. I also have this compulsion to
>> normally want super type arrows to go upward, but I understand that
>> graphical layout is a really hard problem...
>>
>> I suppose the difference in behavior between my main workbench and
>> the runtime one is something to do with how I've built the plugins
>> (as described in http://wiki.eclipse.org/EMF/Getting_Source) , but
>> I'm not sure what's the cause and wondered if you had a clue. In any
>> case, I gather there is work going on to allow the JDT to compile
>> against external plugins and if that's supported we can use exactly
>> the save way of launch the main eclipse as is used for the runtime
>> eclipse and thereby avoid all the gross things we are doing to
>> bootstrap...
>>
>> I have so much to learn! It's so cool to be the one asking questions
>> for a change. :-P
>>
>>
>> Jacques LESCOT wrote:
>>> Ed,
>>>
>>> Yes, it is possible to show a label on these links, and then
>>> probably show/hide them depending on whether generic parameters are
>>> available or not. I will try to modify the generator files to
>>> support this new label on these connections before the end of the
>>> week so that you can see what is possible. You can already start
>>> from the attributes/operations as the label is still present.
>>>
>>> Diagram initialization from a domain model works, but we are facing
>>> a refreshment problem for connections. After drag and drop elements
>>> from the outline view, connections are not immediately displayed. A
>>> bug has been open for fixing this :
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
>>> For now, you can enforce the diagram to be refreshed by creating a
>>> new EClass from the Palette.
>>>
>>> Regards,
>>> Jacques
>>>
>>> Ed Merks a écrit :
>>>> Hi,
>>>>
>>>> I wanted to help with 212409 <http://bugs.eclipse.org/212409>. But
>>>> I know so little about GMF that I don't know where to begin.
>>>> What's I was imagining was the ability to show a label on
>>>> inheritance and reference lines that represent the generic
>>>> parameters. Such a label would only be shown if the super type or
>>>> the reference type has type parameters. I could then look into how
>>>> to parse the user-modified text to build the proper EGenericType.
>>>> Probably I'll start by trying to get it to work for operations and
>>>> attributes...
>>>>
>>>> I was also playing with the editor (it's very cool!) to build a
>>>> diagram and I was at a complete loss for how to make inheritance
>>>> and reference lines show up in the editor. I feel kind of stupid
>>>> asking how to do that, but try as I might, I have not been able to
>>>> figure it out on my own. I tried even with the simple library
>>>> model and I can drag classes into the diagram, but I don't now how
>>>> to make the lines show up. A hint from anyone would be greatly
>>>> appreciated.
>>
Re: [Ecore Tools] How to make lines show up for super types and references? [message #613058 is a reply to message #105421] Wed, 02 January 2008 11:37 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Ed,

Yes, it is possible to show a label on these links, and then probably
show/hide them depending on whether generic parameters are available or
not. I will try to modify the generator files to support this new label
on these connections before the end of the week so that you can see what
is possible. You can already start from the attributes/operations as the
label is still present.

Diagram initialization from a domain model works, but we are facing a
refreshment problem for connections. After drag and drop elements from
the outline view, connections are not immediately displayed. A bug has
been open for fixing this :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
For now, you can enforce the diagram to be refreshed by creating a new
EClass from the Palette.

Regards,
Jacques

Ed Merks a écrit :
> Hi,
>
> I wanted to help with 212409 <http://bugs.eclipse.org/212409>. But I
> know so little about GMF that I don't know where to begin. What's I was
> imagining was the ability to show a label on inheritance and reference
> lines that represent the generic parameters. Such a label would only be
> shown if the super type or the reference type has type parameters. I
> could then look into how to parse the user-modified text to build the
> proper EGenericType. Probably I'll start by trying to get it to work
> for operations and attributes...
>
> I was also playing with the editor (it's very cool!) to build a diagram
> and I was at a complete loss for how to make inheritance and reference
> lines show up in the editor. I feel kind of stupid asking how to do
> that, but try as I might, I have not been able to figure it out on my
> own. I tried even with the simple library model and I can drag classes
> into the diagram, but I don't now how to make the lines show up. A hint
> from anyone would be greatly appreciated.
Re: [Ecore Tools] How to make lines show up for super types and references? [message #613060 is a reply to message #105613] Wed, 02 January 2008 12:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070600020304090207000506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Jacques,

I see! Cool. I did notice that my behavior in the bootstrapped main
Eclipse is different from the runtime workbench that I launch. In the
main Eclipse, the diagram starts out empty and when I drag classes onto
it they are pale yellow:


Should I be able to delete a reference from the diagram? And then be
able to use drag and drop to make it show again? I noticed that drag
and drop from the outline doesn't work unless the outline view is first
given focus. Is that a bug or a limitation?

In the runtime workbench, the diagram is fully populated:


This is interesting because the serialized file doesn't show any
structure at all:

<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
xmi:id="_Y51qwLktEdyURdEKF94I9A" type="Ecore" measurementUnit="Pixel">
<styles xmi:type="notation:DiagramStyle"
xmi:id="_Y5_bwLktEdyURdEKF94I9A"/>
<element xmi:type="ecore:EPackage" href="library.ecore#/"/>
</notation:Diagram>

I gather there is some funky magic that prepopulates this; I was
stepping through the code with an eye towards how to make it populate
classes from others models with there are EReferences or EClasses that
refer to them. I find I always want to move the results away from the
edges a little bit so it's easier on the eyes. I suppose GMF could be
configured to do that. I also have this compulsion to normally want
super type arrows to go upward, but I understand that graphical layout
is a really hard problem...

I suppose the difference in behavior between my main workbench and the
runtime one is something to do with how I've built the plugins (as
described in http://wiki.eclipse.org/EMF/Getting_Source) , but I'm not
sure what's the cause and wondered if you had a clue. In any case, I
gather there is work going on to allow the JDT to compile against
external plugins and if that's supported we can use exactly the save way
of launch the main eclipse as is used for the runtime eclipse and
thereby avoid all the gross things we are doing to bootstrap...

I have so much to learn! It's so cool to be the one asking questions
for a change. :-P


Jacques LESCOT wrote:
> Ed,
>
> Yes, it is possible to show a label on these links, and then probably
> show/hide them depending on whether generic parameters are available
> or not. I will try to modify the generator files to support this new
> label on these connections before the end of the week so that you can
> see what is possible. You can already start from the
> attributes/operations as the label is still present.
>
> Diagram initialization from a domain model works, but we are facing a
> refreshment problem for connections. After drag and drop elements from
> the outline view, connections are not immediately displayed. A bug has
> been open for fixing this :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
> For now, you can enforce the diagram to be refreshed by creating a new
> EClass from the Palette.
>
> Regards,
> Jacques
>
> Ed Merks a


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Ecore Tools] How to make lines show up for super types and references? [message #613063 is a reply to message #105644] Wed, 02 January 2008 14:58 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
This is an unexpected behavior due to compatibility problems while
installing both the Ecore Tools editor and the GMF Example Ecore Editor.

The creation of a graphical representation of a domain element ask for a
Service defined through GMF extension points. Unfortunately, each
generated editor provide similar extensions, and this produces a mix of
the two editors ! (see bug 212768 :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214113)

We are looking for a way to differentiate them, and eventually think of
a better way to perform this at the GMF level. But currently, disabling
GMF Example Ecore Editor should prevent this.

It is not possible to remove an EReference graphically, but we are
working on an advanced mode that could be used to show/hide elements in
the diagram. We have choosen to use a "synchronized" diagram mode while
generating the editor with GMF, because it automatically updates the
diagram on changes made at the domain level only and always ensure that
the diagram is well synchronized.

The problem of DND from the outline when the focus is not initially set,
see bug 212768 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=212768). I
have a working solution on my machine, but waiting a few days before
committing the code.

Your populated diagram seems to be populated using GMF Example Ecore
Editor instead of using Ecore Tools editor : in both cases, the
serialized file will contains informations about graphical elements as
soon as you will have save your diagram a first time. In fact, after
initializing the diagram, as the layout could be performed
automatically, there is no need to serialize them : but once you move an
EClass for example, and then save the editor, each graphical elements
will be serialized.

We have also so much to learn, and it is a great pleasure, and I am
proud to answer questions asked by EMF gurus ! :-)


Ed Merks a écrit :
> Jacques,
>
> I see! Cool. I did notice that my behavior in the bootstrapped main
> Eclipse is different from the runtime workbench that I launch. In the
> main Eclipse, the diagram starts out empty and when I drag classes onto
> it they are pale yellow:
>
>
> Should I be able to delete a reference from the diagram? And then be
> able to use drag and drop to make it show again? I noticed that drag
> and drop from the outline doesn't work unless the outline view is first
> given focus. Is that a bug or a limitation?
>
> In the runtime workbench, the diagram is fully populated:
>
>
> This is interesting because the serialized file doesn't show any
> structure at all:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <notation:Diagram xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
> xmi:id="_Y51qwLktEdyURdEKF94I9A" type="Ecore" measurementUnit="Pixel">
> <styles xmi:type="notation:DiagramStyle"
> xmi:id="_Y5_bwLktEdyURdEKF94I9A"/>
> <element xmi:type="ecore:EPackage" href="library.ecore#/"/>
> </notation:Diagram>
>
> I gather there is some funky magic that prepopulates this; I was
> stepping through the code with an eye towards how to make it populate
> classes from others models with there are EReferences or EClasses that
> refer to them. I find I always want to move the results away from the
> edges a little bit so it's easier on the eyes. I suppose GMF could be
> configured to do that. I also have this compulsion to normally want
> super type arrows to go upward, but I understand that graphical layout
> is a really hard problem...
>
> I suppose the difference in behavior between my main workbench and the
> runtime one is something to do with how I've built the plugins (as
> described in http://wiki.eclipse.org/EMF/Getting_Source) , but I'm not
> sure what's the cause and wondered if you had a clue. In any case, I
> gather there is work going on to allow the JDT to compile against
> external plugins and if that's supported we can use exactly the save way
> of launch the main eclipse as is used for the runtime eclipse and
> thereby avoid all the gross things we are doing to bootstrap...
>
> I have so much to learn! It's so cool to be the one asking questions
> for a change. :-P
>
>
> Jacques LESCOT wrote:
>> Ed,
>>
>> Yes, it is possible to show a label on these links, and then probably
>> show/hide them depending on whether generic parameters are available
>> or not. I will try to modify the generator files to support this new
>> label on these connections before the end of the week so that you can
>> see what is possible. You can already start from the
>> attributes/operations as the label is still present.
>>
>> Diagram initialization from a domain model works, but we are facing a
>> refreshment problem for connections. After drag and drop elements from
>> the outline view, connections are not immediately displayed. A bug has
>> been open for fixing this :
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
>> For now, you can enforce the diagram to be refreshed by creating a new
>> EClass from the Palette.
>>
>> Regards,
>> Jacques
>>
>> Ed Merks a écrit :
>>> Hi,
>>>
>>> I wanted to help with 212409 <http://bugs.eclipse.org/212409>. But I
>>> know so little about GMF that I don't know where to begin. What's I
>>> was imagining was the ability to show a label on inheritance and
>>> reference lines that represent the generic parameters. Such a label
>>> would only be shown if the super type or the reference type has type
>>> parameters. I could then look into how to parse the user-modified
>>> text to build the proper EGenericType. Probably I'll start by
>>> trying to get it to work for operations and attributes...
>>>
>>> I was also playing with the editor (it's very cool!) to build a
>>> diagram and I was at a complete loss for how to make inheritance and
>>> reference lines show up in the editor. I feel kind of stupid asking
>>> how to do that, but try as I might, I have not been able to figure it
>>> out on my own. I tried even with the simple library model and I can
>>> drag classes into the diagram, but I don't now how to make the lines
>>> show up. A hint from anyone would be greatly appreciated.
>
Re: [Ecore Tools] How to make lines show up for super types and references? [message #613065 is a reply to message #105681] Wed, 02 January 2008 18:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Jacques,

Silly me. That never occurred to me! I will stop extracting/installing
the GMF Example Ecore Editor to avoid such confusion in the future...


Jacques LESCOT wrote:
> This is an unexpected behavior due to compatibility problems while
> installing both the Ecore Tools editor and the GMF Example Ecore Editor.
>
> The creation of a graphical representation of a domain element ask for
> a Service defined through GMF extension points. Unfortunately, each
> generated editor provide similar extensions, and this produces a mix
> of the two editors ! (see bug 212768 :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214113)
>
> We are looking for a way to differentiate them, and eventually think
> of a better way to perform this at the GMF level. But currently,
> disabling GMF Example Ecore Editor should prevent this.
>
> It is not possible to remove an EReference graphically, but we are
> working on an advanced mode that could be used to show/hide elements
> in the diagram. We have choosen to use a "synchronized" diagram mode
> while generating the editor with GMF, because it automatically updates
> the diagram on changes made at the domain level only and always ensure
> that the diagram is well synchronized.
>
> The problem of DND from the outline when the focus is not initially
> set, see bug 212768
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=212768). I have a
> working solution on my machine, but waiting a few days before
> committing the code.
>
> Your populated diagram seems to be populated using GMF Example Ecore
> Editor instead of using Ecore Tools editor : in both cases, the
> serialized file will contains informations about graphical elements as
> soon as you will have save your diagram a first time. In fact, after
> initializing the diagram, as the layout could be performed
> automatically, there is no need to serialize them : but once you move
> an EClass for example, and then save the editor, each graphical
> elements will be serialized.
>
> We have also so much to learn, and it is a great pleasure, and I am
> proud to answer questions asked by EMF gurus ! :-)
>
>
> Ed Merks a écrit :
>> Jacques,
>>
>> I see! Cool. I did notice that my behavior in the bootstrapped main
>> Eclipse is different from the runtime workbench that I launch. In
>> the main Eclipse, the diagram starts out empty and when I drag
>> classes onto it they are pale yellow:
>>
>>
>> Should I be able to delete a reference from the diagram? And then be
>> able to use drag and drop to make it show again? I noticed that drag
>> and drop from the outline doesn't work unless the outline view is
>> first given focus. Is that a bug or a limitation?
>>
>> In the runtime workbench, the diagram is fully populated:
>>
>>
>> This is interesting because the serialized file doesn't show any
>> structure at all:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <notation:Diagram xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
>> xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.1/notation"
>> xmi:id="_Y51qwLktEdyURdEKF94I9A" type="Ecore"
>> measurementUnit="Pixel">
>> <styles xmi:type="notation:DiagramStyle"
>> xmi:id="_Y5_bwLktEdyURdEKF94I9A"/>
>> <element xmi:type="ecore:EPackage" href="library.ecore#/"/>
>> </notation:Diagram>
>>
>> I gather there is some funky magic that prepopulates this; I was
>> stepping through the code with an eye towards how to make it populate
>> classes from others models with there are EReferences or EClasses
>> that refer to them. I find I always want to move the results away
>> from the edges a little bit so it's easier on the eyes. I suppose
>> GMF could be configured to do that. I also have this compulsion to
>> normally want super type arrows to go upward, but I understand that
>> graphical layout is a really hard problem...
>>
>> I suppose the difference in behavior between my main workbench and
>> the runtime one is something to do with how I've built the plugins
>> (as described in http://wiki.eclipse.org/EMF/Getting_Source) , but
>> I'm not sure what's the cause and wondered if you had a clue. In any
>> case, I gather there is work going on to allow the JDT to compile
>> against external plugins and if that's supported we can use exactly
>> the save way of launch the main eclipse as is used for the runtime
>> eclipse and thereby avoid all the gross things we are doing to
>> bootstrap...
>>
>> I have so much to learn! It's so cool to be the one asking questions
>> for a change. :-P
>>
>>
>> Jacques LESCOT wrote:
>>> Ed,
>>>
>>> Yes, it is possible to show a label on these links, and then
>>> probably show/hide them depending on whether generic parameters are
>>> available or not. I will try to modify the generator files to
>>> support this new label on these connections before the end of the
>>> week so that you can see what is possible. You can already start
>>> from the attributes/operations as the label is still present.
>>>
>>> Diagram initialization from a domain model works, but we are facing
>>> a refreshment problem for connections. After drag and drop elements
>>> from the outline view, connections are not immediately displayed. A
>>> bug has been open for fixing this :
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214090
>>> For now, you can enforce the diagram to be refreshed by creating a
>>> new EClass from the Palette.
>>>
>>> Regards,
>>> Jacques
>>>
>>> Ed Merks a écrit :
>>>> Hi,
>>>>
>>>> I wanted to help with 212409 <http://bugs.eclipse.org/212409>. But
>>>> I know so little about GMF that I don't know where to begin.
>>>> What's I was imagining was the ability to show a label on
>>>> inheritance and reference lines that represent the generic
>>>> parameters. Such a label would only be shown if the super type or
>>>> the reference type has type parameters. I could then look into how
>>>> to parse the user-modified text to build the proper EGenericType.
>>>> Probably I'll start by trying to get it to work for operations and
>>>> attributes...
>>>>
>>>> I was also playing with the editor (it's very cool!) to build a
>>>> diagram and I was at a complete loss for how to make inheritance
>>>> and reference lines show up in the editor. I feel kind of stupid
>>>> asking how to do that, but try as I might, I have not been able to
>>>> figure it out on my own. I tried even with the simple library
>>>> model and I can drag classes into the diagram, but I don't now how
>>>> to make the lines show up. A hint from anyone would be greatly
>>>> appreciated.
>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Ecore Tools] Upper Bound = -2
Next Topic:GMF mindmap example problem
Goto Forum:
  


Current Time: Sat Apr 20 02:15:59 GMT 2024

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

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

Back to the top