FAMIXClass and All superclasses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FAMIXClass and All superclasses

Fuhrmanator
Hello,

I'm trying to visualize hierarchies that include Java interfaces, but I'm very new to Moose/Pharao/Mondrian. I'm using the sample MSE data for ArgoUML described in the book at http://themoosebook.org/download/ArgoUML-0-28-1.zip

I'm confused because when I browse in the Moose Panel to "All famixclasses" and then a class, e.g., org::argouml::uml::ui::DefaultPredicate that implements an interface, e.g., org::argouml::application::api::Predicate, I can see it has an "All superclasses" list. However, when I inspect the FAMIXClass, I can only see "superclass" as an available variable.

The sample code below works, but only shows one "superclass" link (and thus none of the interfaces, which are Green appear to be linked). I'd like to have it show links to all superclasses (including the interfaces) as well.

In short, how does one map these "All x" things seen in the Moose Panel browser to the variables/methods in the FAMIXClass? My apologies if this is really obvious and I missed it somehow.

Here's the sample code adapted from the RTMondrianExample class in Moose Suite 6.0 under Windows. I restrict the classes to only those truly in ArgoUML:

| b |
   b := RTMondrian new.

   b shape circle
      size: 30;
      color: [ :cls | cls isInterface ifTrue: Color green ifFalse: Color gray].
   b nodes: (MooseModel root allModels first allClasses select:
      [ :each | (each container name beginsWith:'org::argouml')]).

   b shape arrowedLine color: Color black; withShorterDistanceAttachPoint.
   b edges connectTo: #superclass.
   b layout force charge: -500; nbIterations: 50.

   b build.
   ^ b view
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXClass and All superclasses

abergel
Hi!

You can send the message #directSuperclasses or #directSubclasses

Here is your script (adapted for my Moose models):
-=-=-=-=-=-=-=-=-=
  b := RTMondrian new.

  b shape circle 
     size: 30;
     color: [ :cls | cls isInterface ifTrue: Color green ifFalse: Color
gray].
  b nodes: (MooseModel root allModels third allClasses).

  b shape arrowedLine color: Color black; withShorterDistanceAttachPoint.
  b edges connectFromAll: #directSuperclasses.
  b layout force charge: -500; nbIterations: 50.

 b
-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre

On Sep 9, 2016, at 3:15 PM, Fuhrmanator <[hidden email]> wrote:

Hello,

I'm trying to visualize hierarchies that include Java interfaces, but I'm
very new to Moose/Pharao/Mondrian. I'm using the sample MSE data for ArgoUML
described in the book at http://themoosebook.org/download/ArgoUML-0-28-1.zip

I'm confused because when I browse in the Moose Panel to "All famixclasses"
and then a class, e.g., org::argouml::uml::ui::DefaultPredicate that
implements an interface, e.g., org::argouml::application::api::Predicate, I
can see it has an "All superclasses" list. However, when I inspect the
FAMIXClass, I can only see "superclass" as an available variable.

The sample code below works, but only shows one "superclass" link (and thus
none of the interfaces, which are Green appear to be linked). I'd like to
have it show links to all superclasses (including the interfaces) as well.

In short, how does one map these "All x" things seen in the Moose Panel
browser to the variables/methods in the FAMIXClass? My apologies if this is
really obvious and I missed it somehow.

Here's the sample code adapted from the RTMondrianExample class in Moose
Suite 6.0 under Windows. I restrict the classes to only those truly in
ArgoUML:

| b |
  b := RTMondrian new.

  b shape circle
     size: 30;
     color: [ :cls | cls isInterface ifTrue: Color green ifFalse: Color
gray].
  b nodes: (MooseModel root allModels first allClasses select:
     [ :each | (each container name beginsWith:'org::argouml')]).

  b shape arrowedLine color: Color black; withShorterDistanceAttachPoint.
  b edges connectTo: #superclass.
  b layout force charge: -500; nbIterations: 50.

  b build.
  ^ b view



--
View this message in context: http://forum.world.st/FAMIXClass-and-All-superclasses-tp4915017.html
Sent from the Moose mailing list archive at Nabble.com.
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXClass and All superclasses

abergel
In reply to this post by Fuhrmanator
https://www.facebook.com/ObjectProfile/posts/1180702092016386

Alexandre

> On Sep 9, 2016, at 3:15 PM, Fuhrmanator <[hidden email]> wrote:
>
> Hello,
>
> I'm trying to visualize hierarchies that include Java interfaces, but I'm
> very new to Moose/Pharao/Mondrian. I'm using the sample MSE data for ArgoUML
> described in the book at http://themoosebook.org/download/ArgoUML-0-28-1.zip
>
> I'm confused because when I browse in the Moose Panel to "All famixclasses"
> and then a class, e.g., org::argouml::uml::ui::DefaultPredicate that
> implements an interface, e.g., org::argouml::application::api::Predicate, I
> can see it has an "All superclasses" list. However, when I inspect the
> FAMIXClass, I can only see "superclass" as an available variable.
>
> The sample code below works, but only shows one "superclass" link (and thus
> none of the interfaces, which are Green appear to be linked). I'd like to
> have it show links to all superclasses (including the interfaces) as well.
>
> In short, how does one map these "All x" things seen in the Moose Panel
> browser to the variables/methods in the FAMIXClass? My apologies if this is
> really obvious and I missed it somehow.
>
> Here's the sample code adapted from the RTMondrianExample class in Moose
> Suite 6.0 under Windows. I restrict the classes to only those truly in
> ArgoUML:
>
> | b |
>   b := RTMondrian new.
>
>   b shape circle
>      size: 30;
>      color: [ :cls | cls isInterface ifTrue: Color green ifFalse: Color
> gray].
>   b nodes: (MooseModel root allModels first allClasses select:
>      [ :each | (each container name beginsWith:'org::argouml')]).
>
>   b shape arrowedLine color: Color black; withShorterDistanceAttachPoint.
>   b edges connectTo: #superclass.
>   b layout force charge: -500; nbIterations: 50.
>
>   b build.
>   ^ b view
>
>
>
> --
> View this message in context: http://forum.world.st/FAMIXClass-and-All-superclasses-tp4915017.html
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev