Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problem with import warning in xtext grammar
Problem with import warning in xtext grammar [message #1404598] Mon, 04 August 2014 11:39 Go to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
I have the following import in my xtext grammar:

import "platform:/resource/com.puppetlabs.geppetto.pp/model/PP.ecore" as pp

Everything works fine but I get a warning:

"The imported package is not on the classpath of this project which may lead to follow up errors."

This raises a couple of questions:
1. Which "package" is it referring to? Is it the package where the actual ecore file resides (model) or the package that is declared in the ecore declaration (pp)? None of them are on the classpath and none of the should be.
2. Does xtext look into the adjacent PP.genmodel file to find what packages that should be imported?
3. I've tried various ways of getting rid of the warning to no avail. Googling reveals that I'm not alone with this problem. Is there some way I can ignore the warning?

[Updated on: Mon, 04 August 2014 11:41]

Report message to a moderator

Re: Problem with import warning in xtext grammar [message #1404623 is a reply to message #1404598] Mon, 04 August 2014 14:13 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2014-04-08 13:39, Thomas Hallgren wrote:
> I have the following import in my xtext grammar:
>
> import "platform:/resource/com.puppetlabs.geppetto.pp/model/PP.ecore" as pp
>
> Everything works fine but I get a warning:
>
> "The imported package is not on the classpath of this project which may
> lead to follow up errors."
>
> This raises a couple of questions:
> 1. Which "package" is it referring to? Is it the package where the
> actual ecore file resides (model) or the package that is declared in the
> ecore declaration (pp)? None of them are on the classpath and none of
> the should be.
> 2. Does xtext look into the adjacent PP.genmodel file to find what
> packages that should be imported?

I think it does.
- henrik

> 3. I've tried various ways of getting rid of the warning to no avail.
> Googling reveals that I'm not alone with this problem. Is there some way
> I can turn the warning off?
Re: Problem with import warning in xtext grammar [message #1404626 is a reply to message #1404623] Mon, 04 August 2014 14:41 Go to previous message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Quote:

I think it does.
- henrik


Then it doesn't do it properly it seems. All needed packages are imported in the manifest and thus on the classpath (I tried a bundle requirement too to no avail).

[Updated on: Mon, 04 August 2014 22:26]

Report message to a moderator

Previous Topic:OSX getting started with xtext
Next Topic:Does mwe2 require Java 1.7?
Goto Forum:
  


Current Time: Tue Apr 23 06:29:55 GMT 2024

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

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

Back to the top