1

I don't understand why there are two different EObjects that (for me) should mean the same thing

var script1 = resource.getContents().get(0) as Script

var script2 = resource.parseResult.rootASTElement as Script

They seem to contain different information and I don't see why that would be.(yeah they come from different places) but more importantly I don't see why I'm there are two ways of getting (different) Script implementations (from the same sourcecode / resource).

script1 gets passed to the infererer. Why not script2?

tgoossens
  • 9,676
  • 2
  • 18
  • 23

1 Answers1

0

The model inference is triggered by the invocation of #getContents. Besides from that, both variables should point to the very same instance.

Sebastian Zarnekow
  • 6,609
  • 20
  • 23