Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Creating Ecore class diagram with drag & drop. Can't get erefrences to show up
Creating Ecore class diagram with drag & drop. Can't get erefrences to show up [message #127959] Tue, 05 August 2008 03:09 Go to next message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
I have created an ecore model from a bunch of xsd's. There are too many to
create a single diagram of (900 classes) so I want to create a set of
diagrams by hand picking which classes to show.

I can drag the classes onto the diagram, but the ereferences between them
don't show. I tried dragging the references onto the diagram but it
doesn't work.

What am I missing?
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show up [message #128001 is a reply to message #127959] Tue, 05 August 2008 11:47 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Hi,

Connections are not restored between two shortcuts
(http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
are dropping elements in a diagram associated with the right EPackage.

Note that you can associate several diagrams to the same EPackage
element : in the outline, select the root EPackage, "right click >
Create new diagram". Then you can double click on the newly created
diagram to open it in a new editor.

Regards,
Jacques

Andrew H a écrit :
> I have created an ecore model from a bunch of xsd's. There are too many
> to create a single diagram of (900 classes) so I want to create a set of
> diagrams by hand picking which classes to show.
>
> I can drag the classes onto the diagram, but the ereferences between
> them don't show. I tried dragging the references onto the diagram but it
> doesn't work.
>
> What am I missing?
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show up [message #128014 is a reply to message #128001] Tue, 05 August 2008 19:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jconlon.apache.org

Hi Jacques,

I may be having a similar problem with two Ecore metamodels A & B.
Model B references EClasses in model A.

Previously I used the topcased tools and .ecoredi files.

To migrate to the new ecore tools in ganymede I added .ecorediag
diagrams for both A & B by creating these diagrams from the ecore models.

Yet the .ecorediag for B does not show the Ereferences to any of the
EClasses in A, nor does it show any of the referenced EClasses.

I can load the A resource and from the outline view drag the A EClass
into the B diagram and then create a second reference to that same A
EClass. This visualizes ok, but now I have two references from my B
EClass to the A EClass (showing in my outline view) and only one in the
diagram.

How do I visualize these A EClasses and ereferences to them from my B
EClass in the .ecorediag for B - without corrupting my B .ecore file?


thanks for any help,
John



Jacques LESCOT wrote:
> Hi,
>
> Connections are not restored between two shortcuts
> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
> are dropping elements in a diagram associated with the right EPackage.
>
> Note that you can associate several diagrams to the same EPackage
> element : in the outline, select the root EPackage, "right click >
> Create new diagram". Then you can double click on the newly created
> diagram to open it in a new editor.
>
> Regards,
> Jacques
>
> Andrew H a écrit :
>> I have created an ecore model from a bunch of xsd's. There are too
>> many to create a single diagram of (900 classes) so I want to create a
>> set of diagrams by hand picking which classes to show.
>>
>> I can drag the classes onto the diagram, but the ereferences between
>> them don't show. I tried dragging the references onto the diagram but
>> it doesn't work.
>>
>> What am I missing?
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128049 is a reply to message #128001] Wed, 06 August 2008 02:37 Go to previous messageGo to next message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
Thanks Jacques.

I hadn't realised that I was doing something unusual and had a diagram of
effectively shortcuts to classes. I suspect this occurred because I moved
the diagram into another folder.
I recreated the diagram in the same folder as the ecore model and now it
seems to work OK

I couldn't find any reference inside the diagram file to an EPackage,
otherwise I could have just changed it.

thanks for your help

regards

Andrew

Jacques LESCOT wrote:

> Hi,

> Connections are not restored between two shortcuts
> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
> are dropping elements in a diagram associated with the right EPackage.

> Note that you can associate several diagrams to the same EPackage
> element : in the outline, select the root EPackage, "right click >
> Create new diagram". Then you can double click on the newly created
> diagram to open it in a new editor.

> Regards,
> Jacques

> Andrew H a écrit :
>> I have created an ecore model from a bunch of xsd's. There are too many
>> to create a single diagram of (900 classes) so I want to create a set of
>> diagrams by hand picking which classes to show.
>>
>> I can drag the classes onto the diagram, but the ereferences between
>> them don't show. I tried dragging the references onto the diagram but it
>> doesn't work.
>>
>> What am I missing?
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128086 is a reply to message #128001] Wed, 06 August 2008 06:43 Go to previous messageGo to next message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
BTW I assume this is just an unimplemented feature as opposed to a design
decision - is that correct?

The reason I ask is cause I am now doing extensions to a set of classes.
The extensions are in a different package but I want to include all the
classes being extended together with their relationships in a diagram of
the new package.

regards

Andrew

Jacques LESCOT wrote:

> Connections are not restored between two shortcuts
> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
> are dropping elements in a diagram associated with the right EPackage.
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show up [message #128099 is a reply to message #128014] Wed, 06 August 2008 07:57 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
See my comments below,

John E. Conlon a écrit :
> Hi Jacques,
>
> I may be having a similar problem with two Ecore metamodels A & B.
> Model B references EClasses in model A.
>
> Previously I used the topcased tools and .ecoredi files.
>
> To migrate to the new ecore tools in ganymede I added .ecorediag
> diagrams for both A & B by creating these diagrams from the ecore models.
>
> Yet the .ecorediag for B does not show the Ereferences to any of the
> EClasses in A, nor does it show any of the referenced EClasses.
When recreating an Ecore diagram from an existing model, elements that
are recreated are only those present in the original domain file (those
in B.ecore), but not elements contained in loaded resources ...
>
> I can load the A resource and from the outline view drag the A EClass
> into the B diagram and then create a second reference to that same A
> EClass. This visualizes ok, but now I have two references from my B
> EClass to the A EClass (showing in my outline view) and only one in the
> diagram.
Yes that's normal. In fact you do not need to recreate a new Ereference.
The problem is that the Ereference is not restored when you add a new
shortcut. However if the shortcut is present and that you restore (using
DND from the outline) instead the B EClass referencing it, the link will
be restored.
>
> How do I visualize these A EClasses and ereferences to them from my B
> EClass in the .ecorediag for B - without corrupting my B .ecore file?
There is another simpler way to achieve this : select your B EClass,
"right click > Navigate > Restore Related Elements".
You can see this in action in the following screencast :
http://live.eclipse.org/node/540 (go to the section "Restore Related
Elements")

Regards,
Jacques
>
>
> thanks for any help,
> John
>
>
>
> Jacques LESCOT wrote:
>> Hi,
>>
>> Connections are not restored between two shortcuts
>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>> are dropping elements in a diagram associated with the right EPackage.
>>
>> Note that you can associate several diagrams to the same EPackage
>> element : in the outline, select the root EPackage, "right click >
>> Create new diagram". Then you can double click on the newly created
>> diagram to open it in a new editor.
>>
>> Regards,
>> Jacques
>>
>> Andrew H a écrit :
>>> I have created an ecore model from a bunch of xsd's. There are too
>>> many to create a single diagram of (900 classes) so I want to create
>>> a set of diagrams by hand picking which classes to show.
>>>
>>> I can drag the classes onto the diagram, but the ereferences between
>>> them don't show. I tried dragging the references onto the diagram but
>>> it doesn't work.
>>>
>>> What am I missing?
>>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128124 is a reply to message #128049] Wed, 06 August 2008 08:06 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Andrew H a écrit :
> Thanks Jacques.
> I hadn't realised that I was doing something unusual and had a diagram
> of effectively shortcuts to classes. I suspect this occurred because I
> moved the diagram into another folder.
Another folder in the workspace ? No, this has no effect.
I recreated the diagram in the
> same folder as the ecore model and now it seems to work OK
>
> I couldn't find any reference inside the diagram file to an EPackage,
> otherwise I could have just changed it.
If you open the *.ecorediag using a text editor, you must see a
reference to the domain element (EPackage) associated with the diagram :
<element xmi:type="ecore:EPackage" href="MM.ecore#/"/>
However it is not recommended to modify your *.ecorediag file through a
text editor.
>
> thanks for your help
>
> regards
>
> Andrew
>
> Jacques LESCOT wrote:
>
>> Hi,
>
>> Connections are not restored between two shortcuts
>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>> are dropping elements in a diagram associated with the right EPackage.
>
>> Note that you can associate several diagrams to the same EPackage
>> element : in the outline, select the root EPackage, "right click >
>> Create new diagram". Then you can double click on the newly created
>> diagram to open it in a new editor.
>
>> Regards,
>> Jacques
>
>> Andrew H a écrit :
>>> I have created an ecore model from a bunch of xsd's. There are too
>>> many to create a single diagram of (900 classes) so I want to create
>>> a set of diagrams by hand picking which classes to show.
>>>
>>> I can drag the classes onto the diagram, but the ereferences between
>>> them don't show. I tried dragging the references onto the diagram but
>>> it doesn't work.
>>>
>>> What am I missing?
>>>
>
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128137 is a reply to message #128086] Wed, 06 August 2008 08:11 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Yes, this is probably to avoid performance issues. Imagine your ecore
model loads many resources that loads also other resources ... Restoring
connections could be really slow.
And honnestly shortcuts are mainly/only used in case you wish to show
references with "external" elements.

Andrew H a écrit :
> BTW I assume this is just an unimplemented feature as opposed to a
> design decision - is that correct?
>
> The reason I ask is cause I am now doing extensions to a set of classes.
> The extensions are in a different package but I want to include all the
> classes being extended together with their relationships in a diagram of
> the new package.
Using "Restore Related Elements" will make your life easier ! ;-)
>
> regards
>
> Andrew
>
> Jacques LESCOT wrote:
>
>> Connections are not restored between two shortcuts
>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>> are dropping elements in a diagram associated with the right EPackage.
>
>
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128189 is a reply to message #128124] Thu, 07 August 2008 00:57 Go to previous messageGo to next message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
Jacques LESCOT wrote:

> Andrew H a écrit :
>> Thanks Jacques.
>> I hadn't realised that I was doing something unusual and had a diagram
>> of effectively shortcuts to classes. I suspect this occurred because I
>> moved the diagram into another folder.
> Another folder in the workspace ? No, this has no effect.

There must have been something strange about how I did this cause it put
it in a different package. This is what appears to have caused everything
to become shortcuts

>> I recreated the diagram in the
>> same folder as the ecore model and now it seems to work OK
>>
>> I couldn't find any reference inside the diagram file to an EPackage,
>> otherwise I could have just changed it.
> If you open the *.ecorediag using a text editor, you must see a
> reference to the domain element (EPackage) associated with the diagram :
> <element xmi:type="ecore:EPackage" href="MM.ecore#/"/>
> However it is not recommended to modify your *.ecorediag file through a
> text editor.

OK I must be going mad. I tried exactly that yesterday I couldn't find an
EPackage. I try again today it I did.

Unfortunately, because I can't get references to appear for shortcuts at
all I have been resorting to adding new references in the diagram then
going into the .ecorediag file in a text editor and changing the reference
to point to the one I really wanted. As you can imagine, I'm not doing
this cause I think its fun. I just can't find any other way to do it.

Because my new classes are in another package to the ones I am extending,
when I put the base classes on the same diagram they come on as shortcuts.
And for shortcuts I get no option to "Restore Related Elements".

>>
>> thanks for your help
>>
>> regards
>>
>> Andrew
>>
>> Jacques LESCOT wrote:
>>
>>> Hi,
>>
>>> Connections are not restored between two shortcuts
>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>>> are dropping elements in a diagram associated with the right EPackage.
>>
>>> Note that you can associate several diagrams to the same EPackage
>>> element : in the outline, select the root EPackage, "right click >
>>> Create new diagram". Then you can double click on the newly created
>>> diagram to open it in a new editor.
>>
>>> Regards,
>>> Jacques
>>
>>> Andrew H a écrit :
>>>> I have created an ecore model from a bunch of xsd's. There are too
>>>> many to create a single diagram of (900 classes) so I want to create
>>>> a set of diagrams by hand picking which classes to show.
>>>>
>>>> I can drag the classes onto the diagram, but the ereferences between
>>>> them don't show. I tried dragging the references onto the diagram but
>>>> it doesn't work.
>>>>
>>>> What am I missing?
>>>>
>>
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128202 is a reply to message #128137] Thu, 07 August 2008 01:01 Go to previous messageGo to next message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
Jacques LESCOT wrote:

> Yes, this is probably to avoid performance issues. Imagine your ecore
> model loads many resources that loads also other resources ... Restoring
> connections could be really slow.

I think if you are manually adding classes to a diagram then the
performance would not be a problem. I would certainly want the
relationships restored. I could always select some and delete from diagram.

> And honnestly shortcuts are mainly/only used in case you wish to show
> references with "external" elements.

I get shortcuts whenever I put classes on a diagram that are in a
different package to the main classes. e.g. I create a new package where I
extend classes from another package. Naturally when I do a class diagram
of this I want both the new classes and the ones being extended on the
same diagram and I want the relationships between all.

> Andrew H a écrit :
>> BTW I assume this is just an unimplemented feature as opposed to a
>> design decision - is that correct?
>>
>> The reason I ask is cause I am now doing extensions to a set of classes.
>> The extensions are in a different package but I want to include all the
>> classes being extended together with their relationships in a diagram of
>> the new package.
> Using "Restore Related Elements" will make your life easier ! ;-)

Yes I use this alot when it works. Doesn't work for shortcuts though

>>
>> regards
>>
>> Andrew
>>
>> Jacques LESCOT wrote:
>>
>>> Connections are not restored between two shortcuts
>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>>> are dropping elements in a diagram associated with the right EPackage.
>>
>>
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128215 is a reply to message #128202] Thu, 07 August 2008 07:39 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Andrew H a écrit :
> Jacques LESCOT wrote:
>
>> Yes, this is probably to avoid performance issues. Imagine your ecore
>> model loads many resources that loads also other resources ...
>> Restoring connections could be really slow.
>
> I think if you are manually adding classes to a diagram then the
> performance would not be a problem. I would certainly want the
> relationships restored. I could always select some and delete from diagram.
Feel free to open bugs (project 'EMFT', component 'Ecore Tools') if you
think behavior should be changed.
>
>> And honnestly shortcuts are mainly/only used in case you wish to show
>> references with "external" elements.
>
> I get shortcuts whenever I put classes on a diagram that are in a
> different package to the main classes.
Yes, this is the definition of a shortcut
e.g. I create a new package where
> I extend classes from another package. Naturally when I do a class
> diagram of this I want both the new classes and the ones being extended
> on the same diagram and I want the relationships between all.
Using "Restore Related Elements" should work for classes that are
contained in the EPackage associated with the diagram.
>
>> Andrew H a écrit :
>>> BTW I assume this is just an unimplemented feature as opposed to a
>>> design decision - is that correct?
>>>
>>> The reason I ask is cause I am now doing extensions to a set of
>>> classes. The extensions are in a different package but I want to
>>> include all the classes being extended together with their
>>> relationships in a diagram of the new package.
>> Using "Restore Related Elements" will make your life easier ! ;-)
>
> Yes I use this alot when it works. Doesn't work for shortcuts though
You are true, the action seems to be disabled for shortcut elements.
Could you open a bug against this ?

PS : Just to be sure, be careful to always use Ecore Tools editor
(diagram files are using 'ecorediag' as extension) instead of the
default EMF graphical editor generated by GMF (using 'ecore_diagram' as
extension).

Regards,
Jacques
>
>>>
>>> regards
>>>
>>> Andrew
>>>
>>> Jacques LESCOT wrote:
>>>
>>>> Connections are not restored between two shortcuts
>>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure
>>>> you are dropping elements in a diagram associated with the right
>>>> EPackage.
>>>
>>>
>>>
>
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128259 is a reply to message #128215] Thu, 07 August 2008 11:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010003070603030600060901
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Jacques,

Comments below.

Jacques LESCOT wrote:
> Andrew H a


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128313 is a reply to message #128259] Thu, 07 August 2008 14:41 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
My comments below,

Ed Merks a écrit :
> Jacques,
>
> Comments below.
>
> Jacques LESCOT wrote:
>> Andrew H a écrit :
>>> Jacques LESCOT wrote:
>>>
>>>> Yes, this is probably to avoid performance issues. Imagine your
>>>> ecore model loads many resources that loads also other resources ...
>>>> Restoring connections could be really slow.
>>>
>>> I think if you are manually adding classes to a diagram then the
>>> performance would not be a problem. I would certainly want the
>>> relationships restored. I could always select some and delete from
>>> diagram.
>> Feel free to open bugs (project 'EMFT', component 'Ecore Tools') if
>> you think behavior should be changed.
> I tried to test this for the diagram I created for the GenModel (it's in
> CVS now) and the Restore Related Elements action is disabled for shortcuts.
Yes this is a known limitation. You can open a bug on this issue, there
is no one open yet (until you or Andrew do it).
>
> I also noticed a while back that it seems as if shortcut arrow
> decoration isn't taken into account when doing the layout of the label
> so the arrow sometimes overlaps with the underlying text label. Is that
> a known problem?
Now you are pointing it, yes this is a known problem. A basic fix would
consist in showing the decorator outside the figure bounds. If I well
remember, in a default generetad GMF editor, shortcut decoration is
shown at the bottom-left of the figure, outside its bounds.
>
> Should I open bugzillas for both these things?
Yes, please.
Is the shortcut label
> layout thing a EcoreTools problem or a more basic GMF/GEF one?
As explained before, this should be an Ecore Tools only bug. But if you
think that layout of a label whould also depends on existing decorators,
this should be raised against GEF.
>>>
>>>> And honnestly shortcuts are mainly/only used in case you wish to
>>>> show references with "external" elements.
>>>
>>> I get shortcuts whenever I put classes on a diagram that are in a
>>> different package to the main classes.
>> Yes, this is the definition of a shortcut
>> e.g. I create a new package where
>>> I extend classes from another package. Naturally when I do a class
>>> diagram of this I want both the new classes and the ones being
>>> extended on the same diagram and I want the relationships between all.
>> Using "Restore Related Elements" should work for classes that are
>> contained in the EPackage associated with the diagram.
> But not for the shortcuts themselves I guess? I didn't actually need
> that, so it wasn't an issue for me, but it might be useful to some...
>>>
>>>> Andrew H a écrit :
>>>>> BTW I assume this is just an unimplemented feature as opposed to a
>>>>> design decision - is that correct?
>>>>>
>>>>> The reason I ask is cause I am now doing extensions to a set of
>>>>> classes. The extensions are in a different package but I want to
>>>>> include all the classes being extended together with their
>>>>> relationships in a diagram of the new package.
>>>> Using "Restore Related Elements" will make your life easier ! ;-)
>>>
>>> Yes I use this alot when it works. Doesn't work for shortcuts though
>> You are true, the action seems to be disabled for shortcut elements.
>> Could you open a bug against this ?
> If there isn't already a bug, I could open one, but there's no point in
> a duplicate...
>>
>> PS : Just to be sure, be careful to always use Ecore Tools editor
>> (diagram files are using 'ecorediag' as extension) instead of the
>> default EMF graphical editor generated by GMF (using 'ecore_diagram'
>> as extension).
>>
>> Regards,
>> Jacques
>>>
>>>>>
>>>>> regards
>>>>>
>>>>> Andrew
>>>>>
>>>>> Jacques LESCOT wrote:
>>>>>
>>>>>> Connections are not restored between two shortcuts
>>>>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure
>>>>>> you are dropping elements in a diagram associated with the right
>>>>>> EPackage.
>>>>>
>>>>>
>>>>>
>>>
>>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128352 is a reply to message #128313] Thu, 07 August 2008 15:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Jacques,

One thing to note about decorations is that they appear on a different
layer (a special decoration layer, I believe) of the editor canvas.
Printing diagrams, exporting them to images, etc. can exclude certain
layers such as the decoration layer.

This would be a *very* nice feature in the Ecore diagram editor, to have
it exclude the decorations when exporting to an image (such as would be
included in documentation). The decorations are generally of no value
in such a context.

Also, this would be an argument against having the position of
decorations affect the layout of names etc. That wouldn't make sense
when a layer isn't being rendered.

Cheers,

Christian


Jacques LESCOT wrote:
> My comments below,
>
> Ed Merks a écrit :
>> Jacques,
>>
>> Comments below.
>>
>> Jacques LESCOT wrote:
>>> Andrew H a écrit :
>>>> Jacques LESCOT wrote:
>>>>
>>>>> Yes, this is probably to avoid performance issues. Imagine your
>>>>> ecore model loads many resources that loads also other resources
>>>>> ... Restoring connections could be really slow.
>>>>
>>>> I think if you are manually adding classes to a diagram then the
>>>> performance would not be a problem. I would certainly want the
>>>> relationships restored. I could always select some and delete from
>>>> diagram.
>>> Feel free to open bugs (project 'EMFT', component 'Ecore Tools') if
>>> you think behavior should be changed.
>> I tried to test this for the diagram I created for the GenModel (it's
>> in CVS now) and the Restore Related Elements action is disabled for
>> shortcuts.
> Yes this is a known limitation. You can open a bug on this issue, there
> is no one open yet (until you or Andrew do it).
>>
>> I also noticed a while back that it seems as if shortcut arrow
>> decoration isn't taken into account when doing the layout of the label
>> so the arrow sometimes overlaps with the underlying text label. Is
>> that a known problem?
> Now you are pointing it, yes this is a known problem. A basic fix would
> consist in showing the decorator outside the figure bounds. If I well
> remember, in a default generetad GMF editor, shortcut decoration is
> shown at the bottom-left of the figure, outside its bounds.
>>
>> Should I open bugzillas for both these things?
> Yes, please.
> Is the shortcut label
>> layout thing a EcoreTools problem or a more basic GMF/GEF one?
> As explained before, this should be an Ecore Tools only bug. But if you
> think that layout of a label whould also depends on existing decorators,
> this should be raised against GEF.
>>>>
>>>>> And honnestly shortcuts are mainly/only used in case you wish to
>>>>> show references with "external" elements.
>>>>
>>>> I get shortcuts whenever I put classes on a diagram that are in a
>>>> different package to the main classes.
>>> Yes, this is the definition of a shortcut
>>> e.g. I create a new package where
>>>> I extend classes from another package. Naturally when I do a class
>>>> diagram of this I want both the new classes and the ones being
>>>> extended on the same diagram and I want the relationships between all.
>>> Using "Restore Related Elements" should work for classes that are
>>> contained in the EPackage associated with the diagram.
>> But not for the shortcuts themselves I guess? I didn't actually need
>> that, so it wasn't an issue for me, but it might be useful to some...
>>>>
>>>>> Andrew H a écrit :
>>>>>> BTW I assume this is just an unimplemented feature as opposed to a
>>>>>> design decision - is that correct?
>>>>>>
>>>>>> The reason I ask is cause I am now doing extensions to a set of
>>>>>> classes. The extensions are in a different package but I want to
>>>>>> include all the classes being extended together with their
>>>>>> relationships in a diagram of the new package.
>>>>> Using "Restore Related Elements" will make your life easier ! ;-)
>>>>
>>>> Yes I use this alot when it works. Doesn't work for shortcuts though
>>> You are true, the action seems to be disabled for shortcut elements.
>>> Could you open a bug against this ?
>> If there isn't already a bug, I could open one, but there's no point
>> in a duplicate...
>>>
>>> PS : Just to be sure, be careful to always use Ecore Tools editor
>>> (diagram files are using 'ecorediag' as extension) instead of the
>>> default EMF graphical editor generated by GMF (using 'ecore_diagram'
>>> as extension).
>>>
>>> Regards,
>>> Jacques
>>>>
>>>>>>
>>>>>> regards
>>>>>>
>>>>>> Andrew
>>>>>>
>>>>>> Jacques LESCOT wrote:
>>>>>>
>>>>>>> Connections are not restored between two shortcuts
>>>>>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be
>>>>>>> sure you are dropping elements in a diagram associated with the
>>>>>>> right EPackage.
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #128403 is a reply to message #128313] Thu, 07 August 2008 17:40 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080508090109040402090204
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Jacques,

I opened 243468 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=243468>
and 243469 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=243469>.


Jacques LESCOT wrote:
> My comments below,
>
> Ed Merks a


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show up [message #620182 is a reply to message #127959] Tue, 05 August 2008 11:47 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Hi,

Connections are not restored between two shortcuts
(http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
are dropping elements in a diagram associated with the right EPackage.

Note that you can associate several diagrams to the same EPackage
element : in the outline, select the root EPackage, "right click >
Create new diagram". Then you can double click on the newly created
diagram to open it in a new editor.

Regards,
Jacques

Andrew H a écrit :
> I have created an ecore model from a bunch of xsd's. There are too many
> to create a single diagram of (900 classes) so I want to create a set of
> diagrams by hand picking which classes to show.
>
> I can drag the classes onto the diagram, but the ereferences between
> them don't show. I tried dragging the references onto the diagram but it
> doesn't work.
>
> What am I missing?
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show up [message #620183 is a reply to message #128001] Tue, 05 August 2008 19:30 Go to previous message
Eclipse UserFriend
Originally posted by: jconlon.apache.org

Hi Jacques,

I may be having a similar problem with two Ecore metamodels A & B.
Model B references EClasses in model A.

Previously I used the topcased tools and .ecoredi files.

To migrate to the new ecore tools in ganymede I added .ecorediag
diagrams for both A & B by creating these diagrams from the ecore models.

Yet the .ecorediag for B does not show the Ereferences to any of the
EClasses in A, nor does it show any of the referenced EClasses.

I can load the A resource and from the outline view drag the A EClass
into the B diagram and then create a second reference to that same A
EClass. This visualizes ok, but now I have two references from my B
EClass to the A EClass (showing in my outline view) and only one in the
diagram.

How do I visualize these A EClasses and ereferences to them from my B
EClass in the .ecorediag for B - without corrupting my B .ecore file?


thanks for any help,
John



Jacques LESCOT wrote:
> Hi,
>
> Connections are not restored between two shortcuts
> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
> are dropping elements in a diagram associated with the right EPackage.
>
> Note that you can associate several diagrams to the same EPackage
> element : in the outline, select the root EPackage, "right click >
> Create new diagram". Then you can double click on the newly created
> diagram to open it in a new editor.
>
> Regards,
> Jacques
>
> Andrew H a écrit :
>> I have created an ecore model from a bunch of xsd's. There are too
>> many to create a single diagram of (900 classes) so I want to create a
>> set of diagrams by hand picking which classes to show.
>>
>> I can drag the classes onto the diagram, but the ereferences between
>> them don't show. I tried dragging the references onto the diagram but
>> it doesn't work.
>>
>> What am I missing?
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620186 is a reply to message #128001] Wed, 06 August 2008 02:37 Go to previous message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
Thanks Jacques.

I hadn't realised that I was doing something unusual and had a diagram of
effectively shortcuts to classes. I suspect this occurred because I moved
the diagram into another folder.
I recreated the diagram in the same folder as the ecore model and now it
seems to work OK

I couldn't find any reference inside the diagram file to an EPackage,
otherwise I could have just changed it.

thanks for your help

regards

Andrew

Jacques LESCOT wrote:

> Hi,

> Connections are not restored between two shortcuts
> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
> are dropping elements in a diagram associated with the right EPackage.

> Note that you can associate several diagrams to the same EPackage
> element : in the outline, select the root EPackage, "right click >
> Create new diagram". Then you can double click on the newly created
> diagram to open it in a new editor.

> Regards,
> Jacques

> Andrew H a écrit :
>> I have created an ecore model from a bunch of xsd's. There are too many
>> to create a single diagram of (900 classes) so I want to create a set of
>> diagrams by hand picking which classes to show.
>>
>> I can drag the classes onto the diagram, but the ereferences between
>> them don't show. I tried dragging the references onto the diagram but it
>> doesn't work.
>>
>> What am I missing?
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620189 is a reply to message #128001] Wed, 06 August 2008 06:43 Go to previous message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
BTW I assume this is just an unimplemented feature as opposed to a design
decision - is that correct?

The reason I ask is cause I am now doing extensions to a set of classes.
The extensions are in a different package but I want to include all the
classes being extended together with their relationships in a diagram of
the new package.

regards

Andrew

Jacques LESCOT wrote:

> Connections are not restored between two shortcuts
> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
> are dropping elements in a diagram associated with the right EPackage.
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show up [message #620190 is a reply to message #128014] Wed, 06 August 2008 07:57 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
See my comments below,

John E. Conlon a écrit :
> Hi Jacques,
>
> I may be having a similar problem with two Ecore metamodels A & B.
> Model B references EClasses in model A.
>
> Previously I used the topcased tools and .ecoredi files.
>
> To migrate to the new ecore tools in ganymede I added .ecorediag
> diagrams for both A & B by creating these diagrams from the ecore models.
>
> Yet the .ecorediag for B does not show the Ereferences to any of the
> EClasses in A, nor does it show any of the referenced EClasses.
When recreating an Ecore diagram from an existing model, elements that
are recreated are only those present in the original domain file (those
in B.ecore), but not elements contained in loaded resources ...
>
> I can load the A resource and from the outline view drag the A EClass
> into the B diagram and then create a second reference to that same A
> EClass. This visualizes ok, but now I have two references from my B
> EClass to the A EClass (showing in my outline view) and only one in the
> diagram.
Yes that's normal. In fact you do not need to recreate a new Ereference.
The problem is that the Ereference is not restored when you add a new
shortcut. However if the shortcut is present and that you restore (using
DND from the outline) instead the B EClass referencing it, the link will
be restored.
>
> How do I visualize these A EClasses and ereferences to them from my B
> EClass in the .ecorediag for B - without corrupting my B .ecore file?
There is another simpler way to achieve this : select your B EClass,
"right click > Navigate > Restore Related Elements".
You can see this in action in the following screencast :
http://live.eclipse.org/node/540 (go to the section "Restore Related
Elements")

Regards,
Jacques
>
>
> thanks for any help,
> John
>
>
>
> Jacques LESCOT wrote:
>> Hi,
>>
>> Connections are not restored between two shortcuts
>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>> are dropping elements in a diagram associated with the right EPackage.
>>
>> Note that you can associate several diagrams to the same EPackage
>> element : in the outline, select the root EPackage, "right click >
>> Create new diagram". Then you can double click on the newly created
>> diagram to open it in a new editor.
>>
>> Regards,
>> Jacques
>>
>> Andrew H a écrit :
>>> I have created an ecore model from a bunch of xsd's. There are too
>>> many to create a single diagram of (900 classes) so I want to create
>>> a set of diagrams by hand picking which classes to show.
>>>
>>> I can drag the classes onto the diagram, but the ereferences between
>>> them don't show. I tried dragging the references onto the diagram but
>>> it doesn't work.
>>>
>>> What am I missing?
>>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620192 is a reply to message #128049] Wed, 06 August 2008 08:06 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Andrew H a écrit :
> Thanks Jacques.
> I hadn't realised that I was doing something unusual and had a diagram
> of effectively shortcuts to classes. I suspect this occurred because I
> moved the diagram into another folder.
Another folder in the workspace ? No, this has no effect.
I recreated the diagram in the
> same folder as the ecore model and now it seems to work OK
>
> I couldn't find any reference inside the diagram file to an EPackage,
> otherwise I could have just changed it.
If you open the *.ecorediag using a text editor, you must see a
reference to the domain element (EPackage) associated with the diagram :
<element xmi:type="ecore:EPackage" href="MM.ecore#/"/>
However it is not recommended to modify your *.ecorediag file through a
text editor.
>
> thanks for your help
>
> regards
>
> Andrew
>
> Jacques LESCOT wrote:
>
>> Hi,
>
>> Connections are not restored between two shortcuts
>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>> are dropping elements in a diagram associated with the right EPackage.
>
>> Note that you can associate several diagrams to the same EPackage
>> element : in the outline, select the root EPackage, "right click >
>> Create new diagram". Then you can double click on the newly created
>> diagram to open it in a new editor.
>
>> Regards,
>> Jacques
>
>> Andrew H a écrit :
>>> I have created an ecore model from a bunch of xsd's. There are too
>>> many to create a single diagram of (900 classes) so I want to create
>>> a set of diagrams by hand picking which classes to show.
>>>
>>> I can drag the classes onto the diagram, but the ereferences between
>>> them don't show. I tried dragging the references onto the diagram but
>>> it doesn't work.
>>>
>>> What am I missing?
>>>
>
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620193 is a reply to message #128086] Wed, 06 August 2008 08:11 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Yes, this is probably to avoid performance issues. Imagine your ecore
model loads many resources that loads also other resources ... Restoring
connections could be really slow.
And honnestly shortcuts are mainly/only used in case you wish to show
references with "external" elements.

Andrew H a écrit :
> BTW I assume this is just an unimplemented feature as opposed to a
> design decision - is that correct?
>
> The reason I ask is cause I am now doing extensions to a set of classes.
> The extensions are in a different package but I want to include all the
> classes being extended together with their relationships in a diagram of
> the new package.
Using "Restore Related Elements" will make your life easier ! ;-)
>
> regards
>
> Andrew
>
> Jacques LESCOT wrote:
>
>> Connections are not restored between two shortcuts
>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>> are dropping elements in a diagram associated with the right EPackage.
>
>
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620197 is a reply to message #128124] Thu, 07 August 2008 00:57 Go to previous message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
Jacques LESCOT wrote:

> Andrew H a écrit :
>> Thanks Jacques.
>> I hadn't realised that I was doing something unusual and had a diagram
>> of effectively shortcuts to classes. I suspect this occurred because I
>> moved the diagram into another folder.
> Another folder in the workspace ? No, this has no effect.

There must have been something strange about how I did this cause it put
it in a different package. This is what appears to have caused everything
to become shortcuts

>> I recreated the diagram in the
>> same folder as the ecore model and now it seems to work OK
>>
>> I couldn't find any reference inside the diagram file to an EPackage,
>> otherwise I could have just changed it.
> If you open the *.ecorediag using a text editor, you must see a
> reference to the domain element (EPackage) associated with the diagram :
> <element xmi:type="ecore:EPackage" href="MM.ecore#/"/>
> However it is not recommended to modify your *.ecorediag file through a
> text editor.

OK I must be going mad. I tried exactly that yesterday I couldn't find an
EPackage. I try again today it I did.

Unfortunately, because I can't get references to appear for shortcuts at
all I have been resorting to adding new references in the diagram then
going into the .ecorediag file in a text editor and changing the reference
to point to the one I really wanted. As you can imagine, I'm not doing
this cause I think its fun. I just can't find any other way to do it.

Because my new classes are in another package to the ones I am extending,
when I put the base classes on the same diagram they come on as shortcuts.
And for shortcuts I get no option to "Restore Related Elements".

>>
>> thanks for your help
>>
>> regards
>>
>> Andrew
>>
>> Jacques LESCOT wrote:
>>
>>> Hi,
>>
>>> Connections are not restored between two shortcuts
>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>>> are dropping elements in a diagram associated with the right EPackage.
>>
>>> Note that you can associate several diagrams to the same EPackage
>>> element : in the outline, select the root EPackage, "right click >
>>> Create new diagram". Then you can double click on the newly created
>>> diagram to open it in a new editor.
>>
>>> Regards,
>>> Jacques
>>
>>> Andrew H a écrit :
>>>> I have created an ecore model from a bunch of xsd's. There are too
>>>> many to create a single diagram of (900 classes) so I want to create
>>>> a set of diagrams by hand picking which classes to show.
>>>>
>>>> I can drag the classes onto the diagram, but the ereferences between
>>>> them don't show. I tried dragging the references onto the diagram but
>>>> it doesn't work.
>>>>
>>>> What am I missing?
>>>>
>>
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620198 is a reply to message #128137] Thu, 07 August 2008 01:01 Go to previous message
Andrew H is currently offline Andrew HFriend
Messages: 117
Registered: July 2009
Senior Member
Jacques LESCOT wrote:

> Yes, this is probably to avoid performance issues. Imagine your ecore
> model loads many resources that loads also other resources ... Restoring
> connections could be really slow.

I think if you are manually adding classes to a diagram then the
performance would not be a problem. I would certainly want the
relationships restored. I could always select some and delete from diagram.

> And honnestly shortcuts are mainly/only used in case you wish to show
> references with "external" elements.

I get shortcuts whenever I put classes on a diagram that are in a
different package to the main classes. e.g. I create a new package where I
extend classes from another package. Naturally when I do a class diagram
of this I want both the new classes and the ones being extended on the
same diagram and I want the relationships between all.

> Andrew H a écrit :
>> BTW I assume this is just an unimplemented feature as opposed to a
>> design decision - is that correct?
>>
>> The reason I ask is cause I am now doing extensions to a set of classes.
>> The extensions are in a different package but I want to include all the
>> classes being extended together with their relationships in a diagram of
>> the new package.
> Using "Restore Related Elements" will make your life easier ! ;-)

Yes I use this alot when it works. Doesn't work for shortcuts though

>>
>> regards
>>
>> Andrew
>>
>> Jacques LESCOT wrote:
>>
>>> Connections are not restored between two shortcuts
>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure you
>>> are dropping elements in a diagram associated with the right EPackage.
>>
>>
>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620199 is a reply to message #128202] Thu, 07 August 2008 07:39 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Andrew H a écrit :
> Jacques LESCOT wrote:
>
>> Yes, this is probably to avoid performance issues. Imagine your ecore
>> model loads many resources that loads also other resources ...
>> Restoring connections could be really slow.
>
> I think if you are manually adding classes to a diagram then the
> performance would not be a problem. I would certainly want the
> relationships restored. I could always select some and delete from diagram.
Feel free to open bugs (project 'EMFT', component 'Ecore Tools') if you
think behavior should be changed.
>
>> And honnestly shortcuts are mainly/only used in case you wish to show
>> references with "external" elements.
>
> I get shortcuts whenever I put classes on a diagram that are in a
> different package to the main classes.
Yes, this is the definition of a shortcut
e.g. I create a new package where
> I extend classes from another package. Naturally when I do a class
> diagram of this I want both the new classes and the ones being extended
> on the same diagram and I want the relationships between all.
Using "Restore Related Elements" should work for classes that are
contained in the EPackage associated with the diagram.
>
>> Andrew H a écrit :
>>> BTW I assume this is just an unimplemented feature as opposed to a
>>> design decision - is that correct?
>>>
>>> The reason I ask is cause I am now doing extensions to a set of
>>> classes. The extensions are in a different package but I want to
>>> include all the classes being extended together with their
>>> relationships in a diagram of the new package.
>> Using "Restore Related Elements" will make your life easier ! ;-)
>
> Yes I use this alot when it works. Doesn't work for shortcuts though
You are true, the action seems to be disabled for shortcut elements.
Could you open a bug against this ?

PS : Just to be sure, be careful to always use Ecore Tools editor
(diagram files are using 'ecorediag' as extension) instead of the
default EMF graphical editor generated by GMF (using 'ecore_diagram' as
extension).

Regards,
Jacques
>
>>>
>>> regards
>>>
>>> Andrew
>>>
>>> Jacques LESCOT wrote:
>>>
>>>> Connections are not restored between two shortcuts
>>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure
>>>> you are dropping elements in a diagram associated with the right
>>>> EPackage.
>>>
>>>
>>>
>
>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620202 is a reply to message #128215] Thu, 07 August 2008 11:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010003070603030600060901
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Jacques,

Comments below.

Jacques LESCOT wrote:
> Andrew H a


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620206 is a reply to message #128259] Thu, 07 August 2008 14:41 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
My comments below,

Ed Merks a écrit :
> Jacques,
>
> Comments below.
>
> Jacques LESCOT wrote:
>> Andrew H a écrit :
>>> Jacques LESCOT wrote:
>>>
>>>> Yes, this is probably to avoid performance issues. Imagine your
>>>> ecore model loads many resources that loads also other resources ...
>>>> Restoring connections could be really slow.
>>>
>>> I think if you are manually adding classes to a diagram then the
>>> performance would not be a problem. I would certainly want the
>>> relationships restored. I could always select some and delete from
>>> diagram.
>> Feel free to open bugs (project 'EMFT', component 'Ecore Tools') if
>> you think behavior should be changed.
> I tried to test this for the diagram I created for the GenModel (it's in
> CVS now) and the Restore Related Elements action is disabled for shortcuts.
Yes this is a known limitation. You can open a bug on this issue, there
is no one open yet (until you or Andrew do it).
>
> I also noticed a while back that it seems as if shortcut arrow
> decoration isn't taken into account when doing the layout of the label
> so the arrow sometimes overlaps with the underlying text label. Is that
> a known problem?
Now you are pointing it, yes this is a known problem. A basic fix would
consist in showing the decorator outside the figure bounds. If I well
remember, in a default generetad GMF editor, shortcut decoration is
shown at the bottom-left of the figure, outside its bounds.
>
> Should I open bugzillas for both these things?
Yes, please.
Is the shortcut label
> layout thing a EcoreTools problem or a more basic GMF/GEF one?
As explained before, this should be an Ecore Tools only bug. But if you
think that layout of a label whould also depends on existing decorators,
this should be raised against GEF.
>>>
>>>> And honnestly shortcuts are mainly/only used in case you wish to
>>>> show references with "external" elements.
>>>
>>> I get shortcuts whenever I put classes on a diagram that are in a
>>> different package to the main classes.
>> Yes, this is the definition of a shortcut
>> e.g. I create a new package where
>>> I extend classes from another package. Naturally when I do a class
>>> diagram of this I want both the new classes and the ones being
>>> extended on the same diagram and I want the relationships between all.
>> Using "Restore Related Elements" should work for classes that are
>> contained in the EPackage associated with the diagram.
> But not for the shortcuts themselves I guess? I didn't actually need
> that, so it wasn't an issue for me, but it might be useful to some...
>>>
>>>> Andrew H a écrit :
>>>>> BTW I assume this is just an unimplemented feature as opposed to a
>>>>> design decision - is that correct?
>>>>>
>>>>> The reason I ask is cause I am now doing extensions to a set of
>>>>> classes. The extensions are in a different package but I want to
>>>>> include all the classes being extended together with their
>>>>> relationships in a diagram of the new package.
>>>> Using "Restore Related Elements" will make your life easier ! ;-)
>>>
>>> Yes I use this alot when it works. Doesn't work for shortcuts though
>> You are true, the action seems to be disabled for shortcut elements.
>> Could you open a bug against this ?
> If there isn't already a bug, I could open one, but there's no point in
> a duplicate...
>>
>> PS : Just to be sure, be careful to always use Ecore Tools editor
>> (diagram files are using 'ecorediag' as extension) instead of the
>> default EMF graphical editor generated by GMF (using 'ecore_diagram'
>> as extension).
>>
>> Regards,
>> Jacques
>>>
>>>>>
>>>>> regards
>>>>>
>>>>> Andrew
>>>>>
>>>>> Jacques LESCOT wrote:
>>>>>
>>>>>> Connections are not restored between two shortcuts
>>>>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be sure
>>>>>> you are dropping elements in a diagram associated with the right
>>>>>> EPackage.
>>>>>
>>>>>
>>>>>
>>>
>>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620209 is a reply to message #128313] Thu, 07 August 2008 15:08 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Jacques,

One thing to note about decorations is that they appear on a different
layer (a special decoration layer, I believe) of the editor canvas.
Printing diagrams, exporting them to images, etc. can exclude certain
layers such as the decoration layer.

This would be a *very* nice feature in the Ecore diagram editor, to have
it exclude the decorations when exporting to an image (such as would be
included in documentation). The decorations are generally of no value
in such a context.

Also, this would be an argument against having the position of
decorations affect the layout of names etc. That wouldn't make sense
when a layer isn't being rendered.

Cheers,

Christian


Jacques LESCOT wrote:
> My comments below,
>
> Ed Merks a écrit :
>> Jacques,
>>
>> Comments below.
>>
>> Jacques LESCOT wrote:
>>> Andrew H a écrit :
>>>> Jacques LESCOT wrote:
>>>>
>>>>> Yes, this is probably to avoid performance issues. Imagine your
>>>>> ecore model loads many resources that loads also other resources
>>>>> ... Restoring connections could be really slow.
>>>>
>>>> I think if you are manually adding classes to a diagram then the
>>>> performance would not be a problem. I would certainly want the
>>>> relationships restored. I could always select some and delete from
>>>> diagram.
>>> Feel free to open bugs (project 'EMFT', component 'Ecore Tools') if
>>> you think behavior should be changed.
>> I tried to test this for the diagram I created for the GenModel (it's
>> in CVS now) and the Restore Related Elements action is disabled for
>> shortcuts.
> Yes this is a known limitation. You can open a bug on this issue, there
> is no one open yet (until you or Andrew do it).
>>
>> I also noticed a while back that it seems as if shortcut arrow
>> decoration isn't taken into account when doing the layout of the label
>> so the arrow sometimes overlaps with the underlying text label. Is
>> that a known problem?
> Now you are pointing it, yes this is a known problem. A basic fix would
> consist in showing the decorator outside the figure bounds. If I well
> remember, in a default generetad GMF editor, shortcut decoration is
> shown at the bottom-left of the figure, outside its bounds.
>>
>> Should I open bugzillas for both these things?
> Yes, please.
> Is the shortcut label
>> layout thing a EcoreTools problem or a more basic GMF/GEF one?
> As explained before, this should be an Ecore Tools only bug. But if you
> think that layout of a label whould also depends on existing decorators,
> this should be raised against GEF.
>>>>
>>>>> And honnestly shortcuts are mainly/only used in case you wish to
>>>>> show references with "external" elements.
>>>>
>>>> I get shortcuts whenever I put classes on a diagram that are in a
>>>> different package to the main classes.
>>> Yes, this is the definition of a shortcut
>>> e.g. I create a new package where
>>>> I extend classes from another package. Naturally when I do a class
>>>> diagram of this I want both the new classes and the ones being
>>>> extended on the same diagram and I want the relationships between all.
>>> Using "Restore Related Elements" should work for classes that are
>>> contained in the EPackage associated with the diagram.
>> But not for the shortcuts themselves I guess? I didn't actually need
>> that, so it wasn't an issue for me, but it might be useful to some...
>>>>
>>>>> Andrew H a écrit :
>>>>>> BTW I assume this is just an unimplemented feature as opposed to a
>>>>>> design decision - is that correct?
>>>>>>
>>>>>> The reason I ask is cause I am now doing extensions to a set of
>>>>>> classes. The extensions are in a different package but I want to
>>>>>> include all the classes being extended together with their
>>>>>> relationships in a diagram of the new package.
>>>>> Using "Restore Related Elements" will make your life easier ! ;-)
>>>>
>>>> Yes I use this alot when it works. Doesn't work for shortcuts though
>>> You are true, the action seems to be disabled for shortcut elements.
>>> Could you open a bug against this ?
>> If there isn't already a bug, I could open one, but there's no point
>> in a duplicate...
>>>
>>> PS : Just to be sure, be careful to always use Ecore Tools editor
>>> (diagram files are using 'ecorediag' as extension) instead of the
>>> default EMF graphical editor generated by GMF (using 'ecore_diagram'
>>> as extension).
>>>
>>> Regards,
>>> Jacques
>>>>
>>>>>>
>>>>>> regards
>>>>>>
>>>>>> Andrew
>>>>>>
>>>>>> Jacques LESCOT wrote:
>>>>>>
>>>>>>> Connections are not restored between two shortcuts
>>>>>>> (http://wiki.eclipse.org/GMF_Tutorial_Part_2#Shortcuts) so be
>>>>>>> sure you are dropping elements in a diagram associated with the
>>>>>>> right EPackage.
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
Re: Creating Ecore class diagram with drag & drop. Can't get erefrences to show [message #620213 is a reply to message #128313] Thu, 07 August 2008 17:40 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080508090109040402090204
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Jacques,

I opened 243468 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=243468>
and 243469 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=243469>.


Jacques LESCOT wrote:
> My comments below,
>
> Ed Merks a


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Re: EMF Refactoring Plugin
Next Topic:[ecoretools] Why is my diagram so wide?
Goto Forum:
  


Current Time: Thu Mar 28 23:25:09 GMT 2024

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

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

Back to the top