Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Filter a model diagram?
Filter a model diagram? [message #489346] Fri, 02 October 2009 14:16 Go to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I have a very big model diagram. Now I want to document it and need to
hide elements to show only concepts. Is it possible anyhow to put a
filter on my diagram or at least to create a new diagram into which I
can paste the desired concepts?

best regards,
Gilbert
Re: Filter a model diagram? [message #489354 is a reply to message #489346] Fri, 02 October 2009 14:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Gilbert,

Yes, you can create any number of diagrams and you can delete things
from only the diagram without changing the model to produce filtered
diagrams.


Gilbert Mirenque wrote:
> I have a very big model diagram. Now I want to document it and need to
> hide elements to show only concepts. Is it possible anyhow to put a
> filter on my diagram or at least to create a new diagram into which I
> can paste the desired concepts?
>
> best regards,
> Gilbert
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Filter a model diagram? [message #489469 is a reply to message #489354] Sat, 03 October 2009 15:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

> Yes, you can create any number of diagrams and you can delete things
> from only the diagram without changing the model to produce filtered
> diagrams.

I tried this and made the experience that my ecore file will be changed
when deleting elements. I do that with selecting elements I don't need
in my filtered diagram and then press delete. Is something wrong with
that procedure? Fortunately my project stands under version control and
I always can do a revert but that's not the best practice.
Re: Filter a model diagram? [message #489472 is a reply to message #489354] Sat, 03 October 2009 15:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

In this context I have also to ask if it is possible to do the other way
around. Imagine I deleted an association between two classes in the
diagram but the corresponding association still exists in the model. Can
I let the association re-appear in the diagram?
Re: Filter a model diagram? [message #489502 is a reply to message #489472] Sun, 04 October 2009 07:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Gilbert,

You need to use Delete From Diagram, not Delete from Model. The
Navigate menu will help with restoring things, and you can drag and from
the outline.


Gilbert Mirenque wrote:
> In this context I have also to ask if it is possible to do the other way
> around. Imagine I deleted an association between two classes in the
> diagram but the corresponding association still exists in the model. Can
> I let the association re-appear in the diagram?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Filter a model diagram? [message #489505 is a reply to message #489502] Sun, 04 October 2009 08:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Thanks Ed,
I thought that elements will be deleted from the diagram only when I
press the delete button on my keyboard. The fact with the outline is
interesting. It is new for me that I can use it for dragging and
dropping. But I tried to remove an composite association between two
classes in the diagram and after that drop it from the outline back into
the diagram. But there was no drop target in the diagram. How does it work?
Re: Filter a model diagram? [message #489515 is a reply to message #489505] Sun, 04 October 2009 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

> But I tried to remove an composite association between two
> classes in the diagram and after that drop it from the outline back into
> the diagram. But there was no drop target in the diagram. How does it work?

I got it now. When an association was removed you have to remove a
associated class as well and drop it from the outline back into the
diagram. Then the association will be present again.
Re: Filter a model diagram? [message #489883 is a reply to message #489502] Tue, 06 October 2009 12:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Under which condition isn't dragging and dropping from the outline
supported? I'm asking because it does not work now. I remove a class
from the diagram and want to drop it immediately back into it but the
diagram isn't active as drop target. Are there any conditions?
Re: Filter a model diagram? [message #490142 is a reply to message #489515] Wed, 07 October 2009 13:54 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Gilbert,

You can also restore that link without having to remove and then restore
the EClass. Just use the "Navigate > Restore Related Elements" action
available from the contextual menu (see
http://wiki.eclipse.org/EcoreTools_New_Noteworthy#Improve_su pport_for_multi-model_diagrams
for more details). It will try to restore all incoming or outgoing
connections to the selected element.

Regards,
Jacques

Gilbert Mirenque a écrit :
>> But I tried to remove an composite association between two
>> classes in the diagram and after that drop it from the outline back into
>> the diagram. But there was no drop target in the diagram. How does it work?
>
> I got it now. When an association was removed you have to remove a
> associated class as well and drop it from the outline back into the
> diagram. Then the association will be present again.
Re: Filter a model diagram? [message #490143 is a reply to message #489883] Wed, 07 October 2009 13:59 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
The only main restriction is about connections that could not be redrawn
by DND from the outline. Usually you should be able to DND an EClass
several times, as long a you are dropping on an EPackage element (the
diagram canvas is also considered as an EPackage element).
Can you open a bug against the Ecore Tools component in the EMFT project
: please, attach the erroneous model+diagram files and specify the
different steps.

Regards,
Jacques

Gilbert Mirenque a écrit :
> Under which condition isn't dragging and dropping from the outline
> supported? I'm asking because it does not work now. I remove a class
> from the diagram and want to drop it immediately back into it but the
> diagram isn't active as drop target. Are there any conditions?
Re: Filter a model diagram? [message #492400 is a reply to message #490143] Tue, 20 October 2009 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Hi Jacques,
I can't reproduce the error. The next day after my post it worked again.
Until today. Now I can't drag and drop any elements from the outline
into the canvas anymore :( Should I open a bug report anyway?

Jacques LESCOT wrote:
> The only main restriction is about connections that could not be redrawn
> by DND from the outline. Usually you should be able to DND an EClass
> several times, as long a you are dropping on an EPackage element (the
> diagram canvas is also considered as an EPackage element).
> Can you open a bug against the Ecore Tools component in the EMFT project
> : please, attach the erroneous model+diagram files and specify the
> different steps.
>
Re: Filter a model diagram? [message #492401 is a reply to message #492400] Tue, 20 October 2009 11:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

additionally I want to remark that the editor doesn't get the focus when
dragging something over it. Normally it should.
Re: Filter a model diagram? [message #492412 is a reply to message #492400] Tue, 20 October 2009 11:25 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I found out that when I add a new class to my meta model, save it and
remove it then drag and drop works again. But I don't know if it is an
always working workaround neither which causes this state.
Re: Filter a model diagram? [message #621412 is a reply to message #489346] Fri, 02 October 2009 14:33 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Gilbert,

Yes, you can create any number of diagrams and you can delete things
from only the diagram without changing the model to produce filtered
diagrams.


Gilbert Mirenque wrote:
> I have a very big model diagram. Now I want to document it and need to
> hide elements to show only concepts. Is it possible anyhow to put a
> filter on my diagram or at least to create a new diagram into which I
> can paste the desired concepts?
>
> best regards,
> Gilbert
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Filter a model diagram? [message #621416 is a reply to message #489354] Sat, 03 October 2009 15:31 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

> Yes, you can create any number of diagrams and you can delete things
> from only the diagram without changing the model to produce filtered
> diagrams.

I tried this and made the experience that my ecore file will be changed
when deleting elements. I do that with selecting elements I don't need
in my filtered diagram and then press delete. Is something wrong with
that procedure? Fortunately my project stands under version control and
I always can do a revert but that's not the best practice.
Re: Filter a model diagram? [message #621417 is a reply to message #489354] Sat, 03 October 2009 15:51 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

In this context I have also to ask if it is possible to do the other way
around. Imagine I deleted an association between two classes in the
diagram but the corresponding association still exists in the model. Can
I let the association re-appear in the diagram?
Re: Filter a model diagram? [message #621419 is a reply to message #489472] Sun, 04 October 2009 07:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31900
Registered: July 2009
Senior Member
Gilbert,

You need to use Delete From Diagram, not Delete from Model. The
Navigate menu will help with restoring things, and you can drag and from
the outline.


Gilbert Mirenque wrote:
> In this context I have also to ask if it is possible to do the other way
> around. Imagine I deleted an association between two classes in the
> diagram but the corresponding association still exists in the model. Can
> I let the association re-appear in the diagram?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Filter a model diagram? [message #621421 is a reply to message #489502] Sun, 04 October 2009 08:45 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Thanks Ed,
I thought that elements will be deleted from the diagram only when I
press the delete button on my keyboard. The fact with the outline is
interesting. It is new for me that I can use it for dragging and
dropping. But I tried to remove an composite association between two
classes in the diagram and after that drop it from the outline back into
the diagram. But there was no drop target in the diagram. How does it work?
Re: Filter a model diagram? [message #621422 is a reply to message #489505] Sun, 04 October 2009 11:31 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

> But I tried to remove an composite association between two
> classes in the diagram and after that drop it from the outline back into
> the diagram. But there was no drop target in the diagram. How does it work?

I got it now. When an association was removed you have to remove a
associated class as well and drop it from the outline back into the
diagram. Then the association will be present again.
Re: Filter a model diagram? [message #621429 is a reply to message #489502] Tue, 06 October 2009 12:07 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Under which condition isn't dragging and dropping from the outline
supported? I'm asking because it does not work now. I remove a class
from the diagram and want to drop it immediately back into it but the
diagram isn't active as drop target. Are there any conditions?
Re: Filter a model diagram? [message #621442 is a reply to message #489515] Wed, 07 October 2009 13:54 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
Gilbert,

You can also restore that link without having to remove and then restore
the EClass. Just use the "Navigate > Restore Related Elements" action
available from the contextual menu (see
http://wiki.eclipse.org/EcoreTools_New_Noteworthy#Improve_su pport_for_multi-model_diagrams
for more details). It will try to restore all incoming or outgoing
connections to the selected element.

Regards,
Jacques

Gilbert Mirenque a écrit :
>> But I tried to remove an composite association between two
>> classes in the diagram and after that drop it from the outline back into
>> the diagram. But there was no drop target in the diagram. How does it work?
>
> I got it now. When an association was removed you have to remove a
> associated class as well and drop it from the outline back into the
> diagram. Then the association will be present again.
Re: Filter a model diagram? [message #621443 is a reply to message #489883] Wed, 07 October 2009 13:59 Go to previous message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
The only main restriction is about connections that could not be redrawn
by DND from the outline. Usually you should be able to DND an EClass
several times, as long a you are dropping on an EPackage element (the
diagram canvas is also considered as an EPackage element).
Can you open a bug against the Ecore Tools component in the EMFT project
: please, attach the erroneous model+diagram files and specify the
different steps.

Regards,
Jacques

Gilbert Mirenque a écrit :
> Under which condition isn't dragging and dropping from the outline
> supported? I'm asking because it does not work now. I remove a class
> from the diagram and want to drop it immediately back into it but the
> diagram isn't active as drop target. Are there any conditions?
Re: Filter a model diagram? [message #621500 is a reply to message #490143] Tue, 20 October 2009 11:00 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Hi Jacques,
I can't reproduce the error. The next day after my post it worked again.
Until today. Now I can't drag and drop any elements from the outline
into the canvas anymore :( Should I open a bug report anyway?

Jacques LESCOT wrote:
> The only main restriction is about connections that could not be redrawn
> by DND from the outline. Usually you should be able to DND an EClass
> several times, as long a you are dropping on an EPackage element (the
> diagram canvas is also considered as an EPackage element).
> Can you open a bug against the Ecore Tools component in the EMFT project
> : please, attach the erroneous model+diagram files and specify the
> different steps.
>
Re: Filter a model diagram? [message #621501 is a reply to message #492400] Tue, 20 October 2009 11:02 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

additionally I want to remark that the editor doesn't get the focus when
dragging something over it. Normally it should.
Re: Filter a model diagram? [message #621502 is a reply to message #492400] Tue, 20 October 2009 11:25 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I found out that when I add a new class to my meta model, save it and
remove it then drag and drop works again. But I don't know if it is an
always working workaround neither which causes this state.
Previous Topic:[EcoreTools] Choosing attribute type
Next Topic:EEF + XSD.ecore
Goto Forum:
  


Current Time: Sun Jun 13 05:36:48 GMT 2021

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

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

Back to the top