Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [SOLVED] Couldn't resolve reference to JvmDeclaredType (in xtext 2.8.0)
[SOLVED] Couldn't resolve reference to JvmDeclaredType (in xtext 2.8.0) [message #1693001] Tue, 21 April 2015 07:46 Go to next message
Yoel Pinhas is currently offline Yoel PinhasFriend
Messages: 17
Registered: October 2013
Junior Member
Hi,

here is a grammar that use JvmDeclaredType
grammar altair.lang.xtext.example.jvmtypes.JvmTypes with org.eclipse.xtext.common.Terminals
import "http://www.eclipse.org/xtext/common/JavaVMTypes" as jvmTypes

generate jvmTypes "http://www.lang.altair/xtext/example/jvmtypes/JvmTypes"

Model:
	greetings+=Greeting*;
	
Greeting:
	'Hello' name=ID '!' javaDeclaredType=JavaDeclaredType;

FQN:
	ID ('.' ID)*;
	
JavaDeclaredType:
	javaDeclaredType=[jvmTypes::JvmDeclaredType|FQN];


here is an example of grammar usage:
Hello jvmType! test.MyJvmType
Hello jvmType! MyJvmType


I have a java project with xtext nature, in it I have 2 files:
(1) a java class a named MyJvmType and (2) a dls file with the content above.

I get "Couldn't resolve reference to JvmDeclaredType" for both lines

NOTE:
This is a reduced example
the bigger problem I'm trying to solve involves types that come from other projects. all of this this used (a few weeks ago) to work. off course in the case of other projects I added the projects to the build path.

help please Smile


edit:
I followed the tutorial from Lorenzo Bettini
http://java.dzone.com/articles/using-jvm-types-xtext-21-and
before xtext 2.8.0 it worked and I think now it doesn't

edit2:
working on 2.7.2.v201409160908
not working on 2.8.0.v201503090534
I opened a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465091

edit3:
this issue is resolved in 2.8.1 ad on
I personally checked it on 2.8.2 and Holger Schill said he checked it on 2.8.1

[Updated on: Tue, 21 April 2015 13:39]

Report message to a moderator

Re: Couldn't resolve reference to JvmDeclaredType (in xtext 2.8.0) [message #1693055 is a reply to message #1693001] Tue, 21 April 2015 13:00 Go to previous messageGo to next message
Holger Schill is currently offline Holger SchillFriend
Messages: 75
Registered: July 2009
Member
Hi Yoel,

as already mentioned in the bugzilla it works with 2.8.1. Could you please double check it that works for you, too?

Thanks,
Holger


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Couldn't resolve reference to JvmDeclaredType (in xtext 2.8.0) [message #1693147 is a reply to message #1693055] Wed, 22 April 2015 05:37 Go to previous message
Yoel Pinhas is currently offline Yoel PinhasFriend
Messages: 17
Registered: October 2013
Junior Member
Hi Holger,

I have upgraded to 2.8.2 and it does work.

Thanks, Yoel.
Previous Topic:XtextCon: Only 30 tickets left
Next Topic:OperationCanceledException while running MWE2 Workflow
Goto Forum:
  


Current Time: Sat May 08 04:36:14 GMT 2021

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

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

Back to the top