Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly(When I import "http://www.eclipse.org/xtext/common/JavaVMTypes" a warning marker is created)
Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly [message #842482] Thu, 12 April 2012 10:38 Go to next message
Jochen Schmich is currently offline Jochen SchmichFriend
Messages: 29
Registered: July 2009
Junior Member
Hi everybody,

if I introduce the following statement:

import "ht tp://www.eclipse.org/xtext/common/JavaVMTypes" as types


...a warning marker tells me that:
Quote:
The imported package is not on the classpath of this project
which may lead to follow up errors.


The MANIFEST.MF looks correct:

Require-Bundle: org.eclipse.xtext;bundle-version="2.1.0";visibility:=reexport,
 org.eclipse.xtext.common.types;visibility:=reexport,
 org.eclipse.xtext.xbase;bundle-version="2.1.0";resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.generator;resolution:=optional,
 org.eclipse.emf.codegen.ecore;resolution:=optional,
 org.eclipse.emf.mwe.utils;resolution:=optional,
 org.eclipse.emf.mwe2.launch;resolution:=optional,
 org.eclipse.xtext.util,
 org.eclipse.emf.ecore,
 org.eclipse.emf.common,
 org.antlr.runtime,
 org.eclipse.xtext.xbase.lib
Import-Package: org.apache.commons.logging,
 org.apache.log4j,
 org.eclipse.xtext.xbase.lib


The editor seems to work anyway (at least after a restart) - in terms of content assistance etc. JvmType, for example, can be referenced and used correctly. The generator doesn't complain either.

I do currently use Xtext SDK 2.3.0.v201204101126.
Re: Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly [message #842489 is a reply to message #842482] Thu, 12 April 2012 10:43 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Jochen,

That's probably a PDE issue. Please remove the common.types bundle from
your manifest, save it, re-add that bundle and save the manifest again.
That may help.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 12.04.12 12:38, schrieb Jochen Schmich:
> Hi everybody,
>
> if I introduce the following statement:
>
> import "ht tp://www.eclipse.org/xtext/common/JavaVMTypes" as types
>
>
> ...a warning marker tells me that:
> Quote:
>> The imported package is not on the classpath of this project
>> which may lead to follow up errors.
>
>
> The MANIFEST.MF looks correct:
>
> Require-Bundle:
> org.eclipse.xtext;bundle-version="2.1.0";visibility:=reexport,
> org.eclipse.xtext.common.types;visibility:=reexport,
> org.eclipse.xtext.xbase;bundle-version="2.1.0";resolution:=optional;visibility:=reexport,
>
> org.eclipse.xtext.generator;resolution:=optional,
> org.eclipse.emf.codegen.ecore;resolution:=optional,
> org.eclipse.emf.mwe.utils;resolution:=optional,
> org.eclipse.emf.mwe2.launch;resolution:=optional,
> org.eclipse.xtext.util,
> org.eclipse.emf.ecore,
> org.eclipse.emf.common,
> org.antlr.runtime,
> org.eclipse.xtext.xbase.lib
> Import-Package: org.apache.commons.logging,
> org.apache.log4j,
> org.eclipse.xtext.xbase.lib
>
> The editor seems to work anyway (at least after a restart) - in terms of
> content assistance etc. JvmType, for example, can be referenced and used
> correctly. The generator doesn't complain either.
>
> I do currently use Xtext SDK 2.3.0.v201204101126.
Re: Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly [message #842501 is a reply to message #842489] Thu, 12 April 2012 10:59 Go to previous messageGo to next message
Jochen Schmich is currently offline Jochen SchmichFriend
Messages: 29
Registered: July 2009
Junior Member
Right, that worked out nicely. Only tried reordering before. Thanks for the quick reply!
Re: Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly [message #842502 is a reply to message #842489] Thu, 12 April 2012 10:56 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The "Update the classpath settings" on the manifest editor overview page
is often a good way to persuade PDE to do what it could have done anyway.

Regards

ed Willink

On 12/04/2012 11:43, Sebastian Zarnekow wrote:
> Hi Jochen,
>
> That's probably a PDE issue. Please remove the common.types bundle
> from your manifest, save it, re-add that bundle and save the manifest
> again.
> That may help.
>
> Regards,
> Sebastian
Re: Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly [message #842554 is a reply to message #842502] Thu, 12 April 2012 12:02 Go to previous messageGo to next message
Jochen Schmich is currently offline Jochen SchmichFriend
Messages: 29
Registered: July 2009
Junior Member
Hi Ed - thanks for the hint -

Sadly, that didn't work in this particular case - this was one of the first things I tried, though. I had to follow Sebastians advice to get it to work.

[Updated on: Thu, 12 April 2012 12:02]

Report message to a moderator

Re: Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly [message #870879 is a reply to message #842501] Thu, 10 May 2012 07:13 Go to previous messageGo to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
hi,
i'm frank , i have the same problem with Xtext , when i generate an Xtext grammar from an Ecore model i have this 2 warnings :
- " The imported package is not on the classpath of this project which may lead to follow up errors."

- "The imported package refers to elements the package registry instead of using the instances from the workspace"

can you help me to fix this ?
thks
Re: Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly [message #870910 is a reply to message #870879] Thu, 10 May 2012 08:47 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=367013 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=366476.

Regards

Ed Willink

On 10/05/2012 08:13, frank fotso wrote:
> hi,
> i'm frank , i have the same problem with Xtext , when i generate an
> Xtext grammar from an Ecore model i have this 2 warnings :
> - " The imported package is not on the classpath of this project which
> may lead to follow up errors."
>
> - "The imported package refers to elements the package registry
> instead of using the instances from the workspace"
>
> can you help me to fix this ?
> thks
>
Previous Topic:mismatched input 'cmpResearchItem' expecting RULE_ID
Next Topic:dynamic template proposals in Xtext
Goto Forum:
  


Current Time: Sat Apr 20 03:14:26 GMT 2024

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

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

Back to the top