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.
- 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 http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 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
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 http://stephane.ducasse.free.fr http://stephane.ducasse.free.fr/ http://www.synectique.eu http://www.synectique.eu/ / http://www.pharo.org http://www.pharo.org/ 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 http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 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
You were faster :-)
-- Pavel
2017-09-12 10:31 GMT+02:00 Stéphane Ducasse stephane.ducasse@inria.fr:
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 http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 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 http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 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
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Have you tried MooseModel resetMeta?
-- Pavel
2017-09-12 10:29 GMT+02:00 Stéphane Ducasse stephane.ducasse@inria.fr:
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.
- 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 http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 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
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Hi,
On Sep 12, 2017, at 10:29 AM, 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.
How do I add a Model to the UI? so that we can browse from the Moose Panel?
If you want to add it to the MooseModel root unique instance you can do: model install.
However, you can also directly inspect a model, and you will get pretty much the same interface.
Doru
Tx
BTW I have to see because I do not get the email in my mailbox.
Stéphane Ducasse http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 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
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"If you interrupt the barber while he is cutting your hair, you will end up with a messy haircut."