Hello,
Just to clarify, I am returning tomorrow (Wednesday), not today (Tuesday) :)
If you want to try an automatic way to export the properties (metrics)
opening the Moose image, run the script below:
Gofer new
squeaksource: 'HoraExp';
package: 'FameExportMSE';
package: 'FameExportProperties';
load.
Then, right-click on an entity, Utilities -> Export properties, and select
the metrics to export. If you export clicking on the MooseModel, several
files can be generated, for each group. Export clicking on others entities
generates one file.
The results (CSV or XML) are in the directory: Contents/Resources.
If you want to export the metrics using the command line (or a shell script
or a Java app..), you can use the attached smalltalk script. You have to
open the script and set the metrics to be exported in the line:
- selectors: #(#numberOfLinesOfCode #numberOfMethods #fanIn #fanOut).
The command to run the script is:
./path_vm imageName.image runMetrics.st path_mse outputName.csv
For example, in MacOS, in the folder Contents/Resources of your image, run:
./../MacOS/'Squeak VM Opt' Moose.image runMetrics.st /Users/hora/Downloads/
Moose-27.app/Contents/Resources/collection.mse myOutput.csv
If you are in Linux or Windows you should set the correct path_vm:
Contents/Linux/squeak or /Contents/Windows/Squeak.exe
The result (outputName.csv) is saved into the folder where your image is
stored (normally Contents/Resources).
If you don't have the mse file representing your project, you can easily
generate it using VerveineJ or inFusion. See the Moose Book or old emails of
this list to do that.
The script is also below:
----------------------------------------------
Gofer new
squeaksource: 'HoraExp';
package: 'FameExportMSE';
package: 'FameExportProperties';
load.
!
| stream model msePath eContext |
msePath := (CommandLine uniqueInstance allParameters) at: 2.
csvName := (CommandLine uniqueInstance allParameters) at: 3.
model := MooseModel new importFromMSEStream: (StandardFileStream
readOnlyFileFullyNamed: msePath).
stream := MultiByteFileStream newFileNamed: csvName.
eContext := PropertyExportingContext new
separator: $,;
selectors: #(#numberOfLinesOfCode #numberOfMethods #fanIn
#fanOut).
(model allModelClasses) exportPropertyOnStream: stream context: eContext.
stream close.
WorldState addDeferredUIMessage: [
SmalltalkImage current snapshot: false andQuit: true ].
----------------------------------------------
--
Andre Hora
On Tue, Sep 20, 2011 at 12:46 PM, mpescuma <mpescuma(a)libero.it> wrote:
Hi, news about andre ?
sorry the insistence, but I have a small time to develop a solution.
--
View this message in context:
http://moose-dev.97923.n3.nabble.com/moose-data-analysis-exporter-xml-or-ot…
Sent from the moose-dev mailing list archive at
Nabble.com.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
Andre Hora