Hi!
Just to share a small use I had of Moose.
I am working on Roassal2. Roassal2 will be largely compatible with Roassal1. I am trying
to make GraphET use Roassal2, and I need to know where Roassal is actually used by
GraphET. Moose is ideal for this.
I opened the moose panel, imported GraphET and type the following script in a Roassal
easel opened on a class group:
-=-=-=-=-=-=-=-=-=-=-=-=
view shape rectangle
if: #isStub fillColor: Color veryVeryLightGray;
if: #isSUnitTestCase borderColor: Color green.
view nodes: classGroup forEach: [ :cls |
view shape rectangle
if: [ :m | (m queryAllOutgoingAssociations atTypeScope select: [:c | c name
beginsWith: 'RO' ] ) notEmpty ] fillColor: Color red;
if: [ :m | (m queryAllOutgoingAssociations atTypeScope select: [:c | c name
beginsWith: 'RT' ] ) notEmpty ] fillColor: Color blue.
view interaction
popupText: [ :m | ((m queryAllOutgoingAssociations atTypeScope select: [:c | c name
beginsWith: 'RO' ]) inject: '' into: [ :s :e | s, ' ', e name ]),
String cr, '-----', String cr, m sourceText ];
action: #inspect;
on: ROMouseClick do: [:event | event model browseSource ].
view nodes: cls methods.
view gridLayout.
].
view edgesFrom: #superclass.
view treeLayout
-=-=-=-=-=-=-=-=-=-=-=-=
It gives a pictures as the following one:
large squares are classes
link are inheritance: superclass is above its subclasses
Inner squares are methods
red square are methods of GraphET that reference to Roassal1 classes
blue square are methods that have been migrated to Roassal2.
Gray classes are stub classes
A popup window details what is the reference. E.g.,
This is a popup I get by having the mouse above a method initialize. The reference to
Roassal is because of the use of “ROElement”. I can click on the class to open a code
browser on it. I can then modify the reference of ROElement to RTElement...
Happy new year!
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.