Hi,
On Mon, Mar 17, 2014 at 4:37 PM, Gabriela Arevalo (gmail) <
arevalo(a)iam.unibe.ch> wrote:
Hi guys,
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.
Welcome back! :)
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.
The corresponding to "MooseManager currentModel" is now "MooseModel root
allModels first".
However, you should not need to use this. Instead, once you have your hands
on a model in the Moose Panel, you should simply switch to the last tab
(with the [|] icon), and there self is your model. For example, if you need
all methods, you should:
- type "self allMethods"
- select all text
- press Cmd+o (or right click and open)
This should pop the list of all method to the right.
b) I see that you are using pragmas to define how we
calculate properties
in each source code entity. For example in:
FAMIXMethod
numberOfInvokedMethods
<MSEProperty: #numberOfInvokedMethods type: #Number>
<MSEComment: 'Return a number corresponding to the number of invoked
methods'>
<derived>
^ self privateState propertyAt: #numberOfInvokedMethods ifAbsentPut:
[self invokedMethods size]
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?
You probably need to reinitialize the meta descriptions. Programatically,
you can just do: "MooseModel resetMeta". Or you can spawn the Meta Browser
(from WorldMenu/Moose/Moose MetaBrowser) and then click on the refresh icon
from the top right.
Let us know how it works.
Cheers,
Doru
I will appreciate a lot your help.
Cheers,
Gabi
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Every thing has its own flow"