The ugly code is actually in
FAMIXAbstractStructuralEntity>>incomingAccess. But the error is due to
not setting the mooseModel properly which is strange because
MooseModel>>addEntity: should set it.
Doru
On Nov 26, 2007, at 2:07 PM, Stéphane Ducasse wrote:
On 25 nov. 07, at 16:55, Tudor Girba wrote:
Hi Alex,
We have a back pointer to the model because we want to easily
navigate
anywhere else. This is set in the background when you addEntity: to
the model.
I took a quick look, and I also noticed that you created the model in
a wrong way. I fixed it in a new branch. Please take a look and if
you
like it, republish it without the branching suffix.
However, somehow the backpointer to the model is not set. I could not
see it at first glance.
Anyway, the code in allAccesses you just discovered an ugly piece of
code that instead of having the incomingAccesses set locally, it
depends on the global things in the model. This must be changed.
Doru can you tell us where that I have a look too?
I only see
FAMIXAbstractBehavioralEntity>>allAccesses
<navigation: 'Accesses'>
^Group withAll: self accesses asSet withDescription: 'Accesses'
Stef
Cheers,
Doru
On Nov 25, 2007, at 2:52 AM, Alexandre Bergel wrote:
Dear MOOSEers,
As an exercise, I am parsing Java files and loading the
corresponding Java classes in a moose model.
Whereas it seems that I fill the model well, I got a rollback when
using the Moose GUI façade.
I spend some time on it, but I failed in trying to debug it.
It seems that a famix element should know about the model it is part
of. But I do not know how to set it.
the error comes from the method:
FAMIXAbstractStruture >>incomingAccesses
^self entityGroups at: #incomingAccesses ifAbsentPut: [self
mooseModel allAccesses select: [:each | each accesses = self]].
self mooseModel returns nil
If you want to try, you can load the package JavaSupport4Moose in
the SCGStore.
I attached a short java file to try this. Once the package loaded,
click on the "..." button in the Moose GUI.
The test Java4MOOSETest>>testReadingJavaFile is green
cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
<Test.java>_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
www.tudorgirba.com/blog
"There are no old things, there are only old ways of looking at
them."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."