MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - Relationship lines visibility
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Relationship lines visibility

 Post Reply Post Reply
Author
Message
Christopher View Drop Down
Contributor
Contributor
Avatar

Joined: 04.Jun.2010
Location: Austria
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Christopher Quote  Post ReplyReply Direct Link To This Post Topic: Relationship lines visibility
    Posted: 04.Jun.2010 at 10:51
Hi,

I want to hide some objects and their relations in a Graph. I could manage to make the object invisible. Is it also possible to hide relationship lines?

Cheers,
Chris
Back to Top
jkouwer View Drop Down
Major Contributor
Major Contributor


Joined: 08.Mar.2010
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote jkouwer Quote  Post ReplyReply Direct Link To This Post Posted: 04.Jun.2010 at 12:00
Hello Christopher,

This is exactly what took some time to sink in for me (and I'm not convinced that I understand it completely): The graph is your model. So when you remove something from the graph, you remove it from the model.

With objects you can be lucky that when they are referred to in a property of another object, they are still part of the tale you are telling, so they remain "in the model" (In fact they were never removed from the model, because they are still part of the value of a property.).

With this tool you create a language. With all the Graph / Object / Property / Port / Relation and Role editors you create the grammer and the vovabulary of your language, And the stories you are going to tell are displayed in the graphs. So when you remove something from the graph, you effectively remove it from what you are expressing and it is out of the model.

No EMF approach here where your diagram is a view on the model and where you (heavily depending on the tool you are using) might be able to remove something from the view but retain it in the model, but more a "The diagram is your model" approach with metaedit+

It takes getting used to, but it can be remarkebly refreshing when you get it right.

Regards,
Jeroen Kouwer
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 643
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 04.Jun.2010 at 12:41
Originally posted by Christopher Christopher wrote:

I want to hide some objects and their relations in a Graph. I could manage to make the object invisible. Is it also possible to hide relationship lines?
 
Hi Chris,
 
The modeler can hide and reveal objects and relationships by type in the Diagram Editor with View | Selected.
 
The metamodeler can make the line for a role type (nearly) invisible for all instances by setting its color to white.
 
In the next version you'll be able to have conditional role lines and transparent role lines, so which ones to hide can be chosen per instance by the modeler (e.g. by a property in the role) or by the metamodeler (e.g. by a generator condition in the role symbol), and of course totally hidden in all situations (although it's hard to imagine the use case for that).
 
Hope this helps,
Steve
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 643
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 04.Jun.2010 at 13:00
Jeroen: EMF is based on strong containment, like a tree: every element of a model has a single parent. This can be very restrictive, and is actually at the heart of many of the problems of EMF, in particular with scaling, multiple users etc.
 
MetaEdit+ is more object-oriented: elements just exist on their own, without any single particular parent; they can be referred to by many other elements, e.g. a graph refers to its objects, and an object refers to its properties. The objects aren't owned by the graph, though: the same object can be in many graphs.
 
Everything is loaded by starting from the projects, which are simple flat collections of graphs. Once created and committed, an object remains in the repository forever (until an explicit garbage collect of the repository); of course if there are no references to it from anywhere, you won't be able to get to it. The slight exception to that is that once you have loaded an object in a particular MetaEdit+ session, it will remain in memory until you exit (unless you run out of memory and the cached objects are flushed), even if there are no more references to it. This lets you delete an object from a graph and still be able to find it a few minutes later from the Type Browser or Component Selection Tool. Both of these show only loaded objects, not every object of that type in the whole repository (which would of course be too slow in a large repository, and impossible in a multi-user repository).
 
Just to correct one thing: there is actually a clear distinction between diagram and graph, and in general between representation and concept. You can have a graph G containing object O, and with diagrams D1 and D2, both containing representations of O, OR1 and OR2. If you remove OR1, object O remains in the graph G, because it still has a representation in D2. If you remove OR2 too, O is removed from G because it no longer has a representation. This behavior can be changed by the setting "Automatically delete unused objects" - I wouldn't advise changing that in general, because it can be confusing to have a graph with a single diagram, remove all the objects, and then discover that generators still find them all!
 
Sections 6.2-6.3 in the MetaEdit+ User Guide and Chapter 1 in the Workbench User Guide talk more about these areas.
 
Hope this helps,
Steve
Back to Top
Christopher View Drop Down
Contributor
Contributor
Avatar

Joined: 04.Jun.2010
Location: Austria
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Christopher Quote  Post ReplyReply Direct Link To This Post Posted: 04.Jun.2010 at 19:11
Originally posted by stevek stevek wrote:


The modeler can hide and reveal objects and relationships by type in the Diagram Editor with View | Selected.


Thank you - that is exactly what I was looking for. Hmmm.... a bit embarassing that I did not find it myself :-) I always tried to hide the relation lines as metamodeler. If I want to do that: Is there a possibility to hide the line (set the line-color to white) only if a certain condition evaluates to true? In the Symbol Editor for Roles I just found a way to set the line color permanent to white.

Regards,
Chris
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 643
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 04.Jun.2010 at 19:20
Originally posted by Christopher Christopher wrote:

Is there a possibility to hide the line (set the line-color to white) only if a certain condition evaluates to true? In the Symbol Editor for Roles I just found a way to set the line color permanent to white.
 
That's something to look forward to in the next version Smile: the conditional role lines I mentioned above.
Back to Top
th View Drop Down
Contributor
Contributor
Avatar

Joined: 12.Sep.2008
Location: Bremen
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote th Quote  Post ReplyReply Direct Link To This Post Posted: 04.Jun.2010 at 21:37
Hello everybody,

this is a really interesting discussion!

@Steve: I really need this feature! When will the next version be released? I hope, it's some time soon! :-)

@Christopher: Somewhere in the forum, there must be a discussion about this topic already (Topic: Attach generator to role line?, http://www.metacase.com/forums/forum_posts.asp?TID=120) . Steve suggested to use "internal patches" which are called by merl. This works but you need to press the f5 (or f9?) button to refresh the graph - or you could use the Soap API and do I really complicated: you use merl to run an external program which calls the refresh function via the API. This works... really! ;-)
Best regards,
Tobias
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 643
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 05.Jun.2010 at 16:46
Originally posted by stevek stevek wrote:

The metamodeler can make the line for a role type (nearly) invisible for all instances by setting its color to white. 
...actually, you can even set it to transparent. It shows up wrong in the Symbol Editor, but works in the Diagram Editor.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.05
Copyright ©2001-2022 Web Wiz Ltd.

This page was generated in 0.024 seconds.