Thanks Doru. I do not really get what was wrong in my implementation,
but it loads well now.
Hum... But I am still stuck. Do you think I can solve this
allAccesses issue on my own?
Will give a try...
Alexandre
On 25 Nov 2007, at 12: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.
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