Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » imports do not work anymore in Xtext 2.4
imports do not work anymore in Xtext 2.4 [message #995243] Sat, 29 December 2012 09:03 Go to previous message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1120
Registered: July 2009
Senior Member
Hi

I've just installed Xtext 2.4 M4 and I see that import statements seem
broken: I've also tested it with the domain model example (freshly
imported in a new workspace)

and this new test fails

@Test
def void testParsingAndLinkingWithImports() {
'''
import java.util.List
package example {
entity MyEntity {
p : List<String>
}
}
'''.parse.assertNoErrors
}

with

java.lang.AssertionError: Expected no errors, but got :[ERROR:Couldn't
resolve reference to JvmType 'List'. (__synthetic0.dmodel line : 4)]

if I put the fully qualified name it works...

@Test
def void testParsingAndLinkingWithImports() {
'''
import java.util.List
package example {
entity MyEntity {
p : java.util.List<String>
}
}
'''.parse.assertNoErrors
}

is it a known issue?

cheers
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
 
Read Message
Read Message
Read Message
Previous Topic:Check nature of XExpression
Next Topic:[Xtext] IllegalStateException "Stack of grammar elements seems to be corrupt."
Goto Forum:
  


Current Time: Sat May 25 02:32:54 EDT 2013

Powered by FUDForum. Page generated in 0.01834 seconds