On 12 Sep 2017, at 10:29, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:

Hi guys

I’m coding an importer for moose to import metrics computed from other tools.

Now I created would like to see the imported metrics on FAMIX class.


So I added 

FAMIXClass >> TR_LCOM
<MSEProperty: #TR_LCOM type: #Number>
<MSEComment: 'lack of cohesion in methods from XX tools'>
<derived>
^ self propertyNamed: #TR_LCOM

and in my importer 

createFamixClassFor: aCollection
"aCollection in the form Name values* following the tag pattern"

| aClass |
aClass := FAMIXClass new.
aClass name: (aCollection first replaceAll: Character space with: $_).
self tags allButFirst
withIndexDo: [ :t :i | aClass propertyNamed: 'TR_' , t put: (aCollection at: i + 1) asNumber ].
self targetModel add: aClass.
^ aClass


testExtendedFAMIX
| importer fmClass |
importer := ThreImporter on: self streamExample.
importer import.
fmClass := importer createFamixClassFor: importer importedArray second.
self assert: fmClass name = 'Messages'.
self assert: (fmClass propertyNamed: 'TR_LoC') equals: 67.
self assert: fmClass TR_LCOM equals: 67.
self halt.

Two questions:

- why I do not see the metrics in the imported famix class? Is there a cache for the metadescription.

MooseModel resetMeta :)


- How do I add a Model to the UI? so that we can browse from the Moose Panel?


Tx

BTW I have to see because I do not get the email in my mailbox. 


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France