Hi
two remarks
First - It seems strange that candidateClass is defined in ImportingTask
while only the MooseCompositeImporterTask use it and also define the
method run and doNotRun
=> so I pushed down these methods to the right place and the instance
variable too.
MooseImportClassesTask could not run the candidateOperator (it still
cannot).
Now MooseImportClassesTask does not import but just spit out classes
so this is ok and updated the class comments
to reflect that.
Second
you normally do not have to specify the CandidateListOperator
(this is only to switch between FAMIX2 and FAMIX3)
so do not use it
Similarly do not use importerClass: if you do not need it.
It is set by default in ImportingTask>>initialize (this is only
to switch between FAMIX2 and FAMIX3)
Do not do
model := MooseModel new.
importer := MooseSqueakClassPackageImporterTask new.
importer importingContext mergeClassAndMetaclass.
importer candidateClass: CandidateListOperator.
importer importerClass: SmalltalkImporter.
importer model: model; addFromPackagesNamed: packagesToImport; run.
MooseModel root add: model.
but
model := MooseModel new.
importer := MooseSqueakClassPackageImporterTask new.
importer importingContext mergeClassAndMetaclass.
importer model: model; addFromPackagesNamed: packagesToImport; run.
MooseModel root add: model.
Dear All,
Computing the number of lines of code is realized through:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FAMIXBehavioralEntity>>numberOfLinesOfCode
<MSEProperty: #LOC type: #Number>
<property: #LOC longName: 'Lines of code' description:
'The number of lines of code in a method'>
^self
lookUpPropertyNamed: #LOC
computedAs:
[self mooseModel isSmalltalk
ifTrue:
[| parser |
parser := VisualWorksParseTreeMetricCalculator new.
parser processMethod: self usingImporter: nil inModel: nil.
parser numberOfLinesOfCode]
ifFalse: [-1]]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
How to compute the number of lines of code with a C function?
How comes that this method is so closely related to Smalltalk ?
I am tempted to replace this method with something like:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FAMIXBehavioralEntity>>numberOfLinesOfCode
<MSEProperty: #LOC type: #Number>
<property: #LOC longName: 'Lines of code' description:
'The number of lines of code in a method'>
^self
lookUpPropertyNamed: #LOC
computedAs:
[self source lineCount]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Where source will be defined as:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FAMIXBehavioralEntity>>source
^ self sourceAnchor source
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Any comments before I proceed?
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi All,
Simon and I discovered the pragma 'viewEvolutionMatrixOn: view '. It
is employed in ClassHistoryGroup>> viewEvolutionMatrixOn:.
What is this pragma for?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Dear List,
I tried to understand the ScatterplotLayout in VW. Few questions on
the design raised to me:
- Why NodeFigure has variables xBlock and yBlock. I understand what
these variables are for. However, I expected to see them in the shape,
since the node is meant to represent the model, and should therefore
not be aware of where it is supposed to be displayed.
- What xOffset and yOffset are for? I could not really infer their
meaning from the various examples I found
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi guys,
Does anybody have models of the evolution of Azureus in mse format? I
had multiple versions, but they are in xmi and moose can not load
them anymore...
A nice day.
Mircea.
I know some of you had troubles with this.
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Dear All,
In the last version of Mondrian, I added MOGraphElement >>
threadholdSize.
The value returned by this method is the smallest size before the
figure is rendered using a different strategy. Typically, below this
size, an edge is not drawn at all. And a rectangle is rendered as a line
Apparently, this is necessary to scale down large pictures.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi All,
Stef told me he made an attempt with Doru to code a distribution map
has been made a while ago. Is the code available somewhere ?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi all,
first of all I would like to introduce myself. My name is Alberto
Bacchelli and I began my Informatics Ph.D. studies in the University
of Lugano last wednesday. Currently, I am studying Squeak reading the
book Squeak By Example.
I'd like to know if and where I can find a starting point (downloads,
documentation, example, ...) to learn and use Moose in Squeak or Pharo.
Thank you.
Ciao,
Alberto
Hi all,
With Simon, we think that it will be interessant to put mooseName in
privateState.
The method is:
----
mooseName
|stream|
^ self privateState at: #mooseName ifAbsentPut: [
stream := (String new: 64) writeStream.
self moosePrintOn: stream.
stream contents asSymbol
]
----
Is there any negative impact of this idea ?
---
Jannik Laval
PhD Student - Rmod Team - INRIA
Certified Project Management Associate (IPMA)
http://www.jannik-laval.euhttp://rmod.lille.inria.fr
---
Begin forwarded message:
> From: Alexandre Bergel <Alexandre.Bergel(a)inria.fr>
> Date: April 21, 2009 10:20:10 AM CEDT
> To: Pharo Development <Pharo-project(a)lists.gforge.inria.fr>
> Subject: [Pharo-project] RuntimeStorage
> Reply-To: Pharo-project(a)lists.gforge.inria.fr
>
> Dear List,
>
> This morning, Jannik and I were surprised by the class RuntimeStorage.
>
> RuntimeStorage>>initialize: capacity
>
> byGroup := Dictionary new: 24.
> byName := IdentityDictionary new: 10000.
> elements := OrderedCollection new: capacity
>
> Why byName reference an identify dictionary? Why not a dictionary?
> Names are usually accessed through their name as a String apparently
> (e.g., importing Smalltalk packages keys entities with a String).
> Should entities be accessed through a symbol instead of a string?
>
> If entities are stored in an identity dictionary, then names must be
> accessed with a symbol. If entities are to be accessed with a string,
> then a dictionary should be used instead of an identitydictionary.
>
> Cheers,
> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
Hi guys,
I'm trying to add some mondrian views to the list context menu in the
Moose browser (VW). I thought this required the use of the following
pragma on a MooseEntity (such as ClassGroup) in order for the method
to appear in the menu:
<menuItem: 'Some name' category: 'Mondrian'>
However, it does not show. Can someone quickly point me to the correct
way to do this?
thanks!
----------------------------
Johan Brichau
johan.brichau(a)uclouvain.be
Begin forwarded message:
> From: Adrian Kuhn <akuhn(a)gmx.ch>
> Date: April 20, 2009 3:35:12 PM CEDT
> To: Stéphane Ducasse <stephane.ducasse(a)inria.fr>
> Subject: Re: where is the fm3.mse file?
>
> https://www.iam.unibe.ch/scg/svn_repos/Sources/Fame/Java/samples/ch/unibe/f…
>
> --AA
>
>
> On Apr 14, 2009, at 08:40 , Stéphane Ducasse wrote:
>
>> Hi adrian
>>
>> apparently the file is missing from
>>
>> http://smallwiki.unibe.ch/fame/fm3/
>> where can I find it?
>>
>> Stef
>
>
Hi,
I noticed that FAMIXEntity has a comments property that points to a
collection of Strings. We should instead have a FAMIXComment entity
that also has a sourceAnchor.
Cheers,
Doru
--
www.tudorgirba.com
"If you interrupt the barber while he is cutting your hair, you will
end up with a messy haircut."
Dear All,
I would like to know how far are we from getting rid of FAMIX2 in the
Pharo version of Moose? FAMIX2 comprises 55 classes and 1084 methods.
I have never used any of these. Jannik, does DSM works on FAMIX3 ?
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi All,
I added a FAMIX2-All in the Moose repository. Loading this file
install all FAMIX2 related files
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Dear All,
Together with Simon and David, we enhanced the OB-based Moose browser.
This was enabled with the last extension of OB to render morphs.
This means that in addition to Fame and OB, you need to load OB-
Mondrian-Diagrams from wiresong _before_ loading Moose-All.
MooseLoader and PersonalSettings are updated.
When we will have The MooseBrowser based on Glamour, this requirement
will probably be relaxed.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
It should work for now. Please update to the last version of Moose. If
you encounter problems (especially green tests in a version < 311 that
is not green anymore), let me know.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Take the one of Simon instead.
I tried to not make Moose depends on FAMIX2, but this is a hell...
Will provide an up-to-date soon
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
I was taking a quick look at DefaultEntityState and I have a few
questions about its purpose, related to the instance variables
declared inside:
- entity: easy enough, link back to the moose entity
- properties: cache for properties like metric values....
- attributes: cache for attributes? (like derived attributes?) why in
a different slot? And why is it an array of Association and not a
dictionary like properties
- groups: cache for groups? But it is currently useless as there is no
accessor to fill it up
--
Simon
Hi all,
When I import packages with references between classes,
I have nothing in myClass1>>outgoingReferences, but there is the good
thing in myClass2>>incomingReferences
Is it the importer which doesn't work ?
Thanks.
Cheers
---
Jannik Laval
PhD Student - Rmod Team - INRIA
Certified Project Management Associate (IPMA)
http://www.jannik-laval.euhttp://rmod.lille.inria.fr
---
Hi All,
David R. and I are playing with Glamour, a cool framework to define
browsers. Currently, the Moose browser @ Pharo uses OB. Although it
works fine, it sticks to the Smalltalk way of browsing code, which we
find a bit limited.
I apology in advance for cutting & pasting code here. We defined the
following method:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
mooseFinder
| browser |
browser := GLMFinder new .
browser list
display: [:each | each entities];
when: [:each | "(each isKindOf: MooseAbstractGroup)" each ==
MooseModel root ].
browser list
title: 'Classes';
display: [:each | each allClasses ];
when: [:each | (each isKindOf: MooseAbstractGroup) and: [each
allClasses notEmpty] ].
browser list
title: 'Methods';
display: [:each | each allMethods ];
when: [:each | (each isKindOf: MooseAbstractGroup) and: [each
allMethods notEmpty] ].
browser list
title: 'Superclasses';
display: [:each | each superclassHierarchyGroup ];
when: [:each | (each isKindOf: FAMIXClass) and: [each
superclassHierarchyGroup notEmpty]].
browser list
title: 'Subclasses';
display: [:each | each subclassHierarchy ];
when: [:each | (each isKindOf: FAMIXClass) and: [each
subclassHierarchy notEmpty]].
^ browser
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
It shows up a small MacOSX-like finder that shows classes,
superclasses and subclasses. Very cool!
Few questions now:
- Lists (Classes, Methods, Superclasses, Subclasses) are statically
defined. In Moose however, these are defined with pragmas. How can we
describe the automatic generations of lists?
- If we want to embed this browser into a bigger one, how do we pass
the right-most selected element ? Using a GLMTableLayoutBrowser, one
would do a "browser sendTo: #outer -> #selectedElement from:
#element" (modulo names). Here, we need something like "browser
sendTo: #outer -> #lastSelection".
Cheers,
David & Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.