Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross-reference mistake
icon5.gif  Cross-reference mistake [message #893633] Thu, 05 July 2012 03:43
Kevin Sun is currently offline Kevin SunFriend
Messages: 32
Registered: August 2010
Location: China
Member

I have a language that may be programmed in the following way:

entity X;    
use X;


The second line is a reference to the "X" defined in the first line. But sometimes I meet the problem of cross-reference. When I remove the definition of "X", the cross-reference at the second line will be resolved and get an EObjectDescription with the URI points to the first element in the file. Becuase the first line has been removed, it get the "using x" statement as the first element in the file and try to typecast it to an "entity" for the cross-reference in "using x" statement. At this time, the typecast exception will be thrown.

It seems that the EObjectDescriptions are not updated when I remove the entity "X" and before the cross-reference being resolved.

Who would like to give some hint on this problem? By the way the grammar I used is large, nearly 1500 lines in xtext file. And I do lots of things at "afterModelLinked" to give more information to the AST.

[Updated on: Thu, 05 July 2012 06:27]

Report message to a moderator

Previous Topic:non-LL(*) decision due to recursive rule invocations
Next Topic:Recursion without recursion?
Goto Forum:
  


Current Time: Wed Feb 26 17:13:48 GMT 2020

Powered by FUDForum. Page generated in 0.05287 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top