Using Moose => Questions
by Gabriela Arevalo (gmail)
I started to play with Moose, because I need to analyze some code to detect
some bad smells.
As I used Moose ** a long time ago ** I am bit confused (and also lost)
with the way of using and manipulating the objects in the Moose panel.
Just an example to explain what I need is that:
1- I loaded a package of Pharo (let's say Collections-Sequenceable)
I can see all the information offered by the panel, but I would like to do
is the following:
a) How can I access to the information of the model, for example, to
manipulate the methods of the analyzed classes? In previous versions of
Moose, we could do something like MooseManager currentModel, but I see that
the design has changed drastically, and now I can not see how I can do it.
I need specifically access to the info stored in the model.
b) I see that you are using pragmas to define how we calculate properties
in each source code entity. For example in:
<MSEProperty: #numberOfInvokedMethods type: #Number>
<MSEComment: 'Return a number corresponding to the number of invoked
^ self privateState propertyAt: #numberOfInvokedMethods ifAbsentPut: [self
I added a new property with the same structure, but when I analyzed again a
previous application, my new property is not appearing in the list of
properties for a method in Moose.
Should I call a special message, or make a class invoke another method to
update the properties used to analyze the application?
I will appreciate a lot your help.