Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 740 by usman.bh...(a)gmail.com: classNamedOrNil test is bogus
http://code.google.com/p/moose-technology/issues/detail?id=740
There correct test should be
When we give a metaclass name we should get the metaclass of the class and
not nil
testClassNamedOrNil
"(self selector: #testClassNamedOrNil) debug"
self assert: (MooseUtilities classNamedOrNil: Model name) = Model.
self assert: (MooseUtilities classNamedOrNil: FAMIXNameResolver name) =
FAMIXNameResolver.
self assert: (MooseUtilities classNamedOrNil: (FAMIXNameResolver name ,
FAMIXNameResolver metaclassTag) asSymbol) = FAMIXNameResolver class
I discovered MooseMonticelloImporter…. :)
and some methods cannot compile :)
I would merge MooseMonticelloPopulator and MooseMonticelloVisitor (because this is about only 3 stupid accessors).
scope is undeclared. :(
sad it means that there are not tests :(
importFileNamed: name
| version definitions visitor progressBar step |
self setMooseModel.
[ version := self repository versionFromFileNamed: name. ]
on: Error
do: [:ex | self inform: 'Package ', name, ' not accessible from the file system?'. ^ self targetModel].
definitions := version snapshot definitions.
MooseCustomTask runWithProgress: [:bar |
visitor := MooseMonticelloClassPopulator new importer: self.
definitions do: [ :def | def accept: visitor.
bar increment].
] description: 'Importing classes' length: (definitions size).
self setSuperclassesAndCreateStubs.
"create a scope, this is necessary for the method visitor which is VW aware"
scope := Dictionary new.
self targetModel allClasses do: [:famixClass |
famixClass attributes do: [:famixAttribute |
(self scopeOfClass: famixClass) at: famixAttribute name bind: famixAttribute]].
MooseCustomTask runWithProgress: [:bar |
"import methods"
definitions do: [ :def |
(def isKindOf: MCMethodDefinition)
ifTrue: [
visitor := MooseMonticelloMethodPopulator new importer: self.
def accept: visitor.
self targetModel addAll: visitor entities]].
bar increment.
] description: 'Importing methods' length: (definitions size).
^ self targetModel
Here is a proposal
MooseTask
MooseAbstractImporter (which right now is not used and only contain
error handling and importingContext)
this class could hold the plugin mechanism that
would be run as a tearDown from now.
MooseImportingTask - Renamed SmalltalkImportingTask (add
importerClass logic)
MooseCompositeImporterTask
MooseSqueakClassPackageImporterTask
-> MoosePharoClassPackageExtractTask
MooseSqueakClasssCategoriesImporterTask -
>MoosePharoClassCategoriesExtractTask
MooseImportClassesTask ->
MooseExtractClassesTask
FileStructureImporter(/Extractor)
MooseOperator
Since we will not be able to inherit from the same superclass MSEReader and
MooseAbstractImporter.
We could define one trait to represent the plugin management and apply to
the MSEReader and MooseAbstractImporter.
So let us know what you think.
Stef and Usman
to have a default select: [:each | 'pac*' match
and to avoid to have ' in drop box and this is not in the latest version of
moose.
How do we know merge process work in moose?
Stef