Indeed, it looks like MooseEntity>>isStub is the trouble maker.
Hi Doru,
I checked what Santiago has written and it looks okay to me. The following test fails. No idea why. ClassB is a stub
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
testStubAndHismo
| allModelClasses allHistoryModelClasses mooseSampleData sampleMooseModel hismoHistoryModel |
mooseSampleData := MooseSampleData new.
sampleMooseModel := (mooseSampleData readMSEString: self sampleMSE)
name: #'example'.
allModelClasses := sampleMooseModel allModelClasses.
self assert: (sampleMooseModel allModelClasses size = 1).
self assert: (sampleMooseModel allClasses size = 2).
hismoHistoryModel := HismoModelHistory new.
hismoHistoryModel addLastVersionForMooseModel: sampleMooseModel.
allHistoryModelClasses := hismoHistoryModel allClassHistories
select: [:each | each last isStub not].
self assert: allModelClasses size = allHistoryModelClasses size
sampleMSE
^ '(
(FAMIX.Namespace (id: 1) (name ''aNamespace''))
(FAMIX.Class (id: 2) (name ''ClassA'') (container (ref: 1)) (parentPackage (ref: 201)))
(FAMIX.Method (name ''methodA1'') (signature ''methodA1()'') (parentType (ref: 2)) (LOC 2))
(FAMIX.Attribute (name ''attributeA1'') (parentType (ref: 2)))
(FAMIX.Class (id: 3) (name ''ClassB'') (container (ref: 1)) (isStub true) (parentPackage (ref: 201)))
(FAMIX.Inheritance (subclass (ref: 3)) (superclass (ref: 2)))
(FAMIX.Package (id: 201) (name ''aPackage''))
(FAMIX.Package (id: 202) (name ''aPackage'') (parentPackage (ref: 201)))
)'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Alexandre
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
On 30 Sep 2011, at 10:08, Tudor Girba wrote:
> It looks like something is wrong with your models.
>
> Doru
>
>
> On Fri, Sep 30, 2011 at 2:27 PM, Santiago Vidal <santiago.a.vidal@gmail.com> wrote:
> Thanks for your answer but it doesn't work. I have tried before this method. All the HismoClassHistory instances return true to "last isStub not" so I'm getting all the FAMIX classes
>
>
> 2011/9/29 Tudor Girba <tudor@tudorgirba.com>
> hismoModel allClassHistories select: [:each | each last isStub not]
>
> Doru
>
>
> On 29 Sep 2011, at 21:36, Santiago Vidal wrote:
>
> > Hi,
> > I'm wondering if there is a way to obtain all the model classes from a HismoModel
> > I know that the statement "hismoModel allClassHistories" return all the FAMIX classes histories but I can't find the method to get only the model classes histories.
> > Cheers
> >
> > --
> > Santiago Vidal
> > _______________________________________________
> > Moose-dev mailing list
> > Moose-dev@iam.unibe.ch
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "It's not what we do that matters most, it's how we do it."
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> Santiago Vidal
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev