Hi Sara,
I understood that you would want a visualization that would work for
any meta-model, but what I did not understand is: What would the goal
of the visualization be?
What you probably want is some visualization that would just
interpret the EMOF description in some way.
One generic visualization I can think of is to see what kind of
instances are there loaded and how many of each are there. But, this
would basically be not much more than the list we show in the browser.
Another possibility would be to have all objects in the model, or at
least a collection of them, and then show all the pointers between them.
I quickly put together this visualization and I attached an example
of the LAN model: each node is an entity colored according to its
type, and each edge represents a pointer to another entity. The nodes
are arranged according to a force based layout (which is very slow).
As you can see, the problem here is that even with a small model, you
can get complex pictures. The visualization is available in
MooseModel>>viewAllEntititesOn: in the MondrianPaintings bundle.
Many times the meta-model of the case study and and the meta-model of
the visualization are not the same. For example, in a FAMIX meta-
model, InheritanceDefinition is a first class, just like Class, but
in a class hierarchy visualization, classes are represented as nodes
and inheritances as edges. In this case, the naive generic
visualization I described above would probably map inheritances on
nodes as well.
I mentioned Mondrian, because the idea behind it is to provide a kind
of an infrastructure with which you can quickly script your
visualization to show what you want from the model. With Mondrian you
besically specify a meta-model transformation.
Cheers,
Doru
On Jul 2, 2007, at 1:04 PM, sellossa(a)ensieta.fr wrote:
Hello Doru
I have to be more precise :)
The models that I import are not conformed to FAMIX. My models can be
conformed to anything.
Let me give you an example:
Imagine that I work with a meta model with a class Chicken and a
class Egg.
Imagine then that I import the instances of Chicken and Egg into
Moose.
With Moose, I can inspect may instances, apply the navigations. But, I
couldn't apply the Mondrian visualizations as "blueprint
complexity", "UML
macro" .... because they are no defined in my classes Chicken and
Egg. The
only views avalaible is "Name of occurrences" but it leads into a
bug :(
Therefore, I want to know if it is possible to generate a
visualisation
for my instances of Chicken and Egg. And apply the same
visualization for
instances of an other meta model (Flower and Tree for example).
Do you understand what I want?
thank you for you help
sara
Hi Sara,
Mondrian is a generic visualization framework and it is part of Moose
Config. Mondrian has a graph model behind, it works at the level of
Smalltalk objects and allows you to script your visualization.
For example, if you have a FAMIX model in a variable called
mooseModel and you want to show the hierarchy of classes you can do:
view := Mondrian.ViewRenderer new.
view nodes: mooseModel allClasses.
view
edges: mooseModel allInheritanceDefinitions
from: #superclass
to: #subclass.
view treeLayout.
view open.
You can find more details here:
http://smallwiki.unibe.ch/moose/tools/mondrian/
But, could you elaborate on what you have in mind when you say
generic visualizations?
Cheers,
Doru
On Jul 2, 2007, at 10:22 AM, sellossa(a)ensieta.fr wrote:
Hi,
I am still working on an Ecore Importer in Moose and I need some
advices
for a particular point.
Here is the context: First, I managed to generate code from a meta-
model
conformed to Ecore. Then I managed to import into Moose instances
of this
meta-model in generating allmethods in MooseModel.
For the moment, there is no visualisation for the instances
imported.
That's why I think it could be great if I generated generic
visualisations
with my code generator.
I had a look on FAMIX entities to see how some visualisations are
implemented, but it's still difficult for me to know how I could
generate
generic visualisations.
What do you think about it?
thank you for your help
sara
Hi Sara,
Your meta-model of chicken and eggs sounds really nice :). Did you
also manage to have relationships between entities?
Currently, we synchronize the meta-descriptions only manually. But,
indeed it would be nice if we could recompute the meta-descriptions
at compile time or unload time. This is part of the future work,
and
until then .
I saw that you used System reinitializeDefaultSystem. However,
at the
moment in the case of Moose you need to call AbstractEntity
initializeAllMofDescriptions, or just used from the VW main menu:
Tools/Moose Utilities/Reinitialize meta descriptions. This deals
with
some specific meta-annotations related to Moose.
Cheers,
Doru
--
www.iam.unibe.ch/~girba
www.iam.unibe.ch/~girba/blog/
"One cannot do more than one can do."
--
www.iam.unibe.ch/~girba
www.iam.unibe.ch/~girba/blog/
"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."