Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EMF-IncQuery » After each workspace build every pattern has the same error
After each workspace build every pattern has the same error [message #1067041] Fri, 05 July 2013 14:46 Go to next message
Jan Reimann is currently offline Jan Reimann
Messages: 127
Registered: July 2009
Senior Member
Every pattern has the following error:

The package declaration must not be empty

This is annoying because I have to manually remove the error.

best regards,
Jan
Re: After each workspace build every pattern has the same error [message #1067045 is a reply to message #1067041] Fri, 05 July 2013 15:08 Go to previous messageGo to next message
Istvan Rath is currently offline Istvan Rath
Messages: 54
Registered: July 2009
Member
Is your patterns' package declaration really empty or is a wrong error message given?
Re: After each workspace build every pattern has the same error [message #1067051 is a reply to message #1067045] Fri, 05 July 2013 15:19 Go to previous messageGo to next message
Eclipse User
Istvan Rath wrote:
> Is your patterns' package declaration really empty or is a wrong error
> message given?

Ok, I thought this error message is wrong but then I tried out the New
Query Wizard and one can (!) specify a package. At first, I didn't know
what kind of package until I pressed the browse button and all the
source packages in my project were offered. So, that's my problem. My
pattern files are not contained in source folders. The question is why
they should contained there? I don't generate code from the patterns
since I use them with a generic matcher. This error marking is very
annoying although the wizard suggests optional specification of a package :(

best regards,
Jan
Re: After each workspace build every pattern has the same error [message #1067155 is a reply to message #1067051] Sat, 06 July 2013 18:06 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan Ujhelyi
Messages: 221
Registered: July 2009
Senior Member
Hi,

Originally, this matching between the pattern specification and the containment were really optional, however because of the internals of the Xbase expression handling (used for check expressions) it is required to infer a Jvm Model from the pattern code that the code generator uses, and this model has very strict connections to the Java classpath that is added here.

It might make sense to find a better solution for the non-IDE uses (however, I am not really sure what would be the good solution that also works in the generated approach similarly well). What we can do however is to make the IDE and the error message a bit more self-explanatory.

Cheers,
Zoltán
Re: After each workspace build every pattern has the same error [message #1067312 is a reply to message #1067155] Mon, 08 July 2013 09:35 Go to previous messageGo to next message
Jan Reimann is currently offline Jan Reimann
Messages: 127
Registered: July 2009
Senior Member
Ok, I can convert my pattern folders into source folders.

best regards,
Jan
Re: After each workspace build every pattern has the same error [message #1067317 is a reply to message #1067051] Mon, 08 July 2013 09:51 Go to previous messageGo to next message
Istvan Rath is currently offline Istvan Rath
Messages: 54
Registered: July 2009
Member
Quote:
Ok, I thought this error message is wrong but then I tried out the New
Query Wizard and one can (!) specify a package. At first, I didn't know
what kind of package until I pressed the browse button and all the
source packages in my project were offered. So, that's my problem. My
pattern files are not contained in source folders. The question is why
they should contained there? I don't generate code from the patterns
since I use them with a generic matcher. This error marking is very
annoying although the wizard suggests optional specification of a package Sad


The package specification is optional in the sense that you can (although generally should not) opt to create your patterns in the default package. (But always inside a source folder.)

As Zoltán pointed out, due to the way things work in recent Xtext and Xbase, running the generator on your EIQ patterns is not optional as many things (including certain validators) require the JVM model inferrer to execute. You can still switch the generator off (e.g. for debugging an issue), but this practice is not recommended in the long run.
Re: After each workspace build every pattern has the same error [message #1067322 is a reply to message #1067317] Mon, 08 July 2013 09:57 Go to previous message
Abel Hegedus is currently offline Abel Hegedus
Messages: 98
Registered: July 2009
Member
Istvan Rath wrote on Mon, 08 July 2013 05:51
The package specification is optional in the sense that you can (although generally should not) opt to create your patterns in the default package. (But always inside a source folder.)


Due to the naming convention used by the generator, I think the default package is not allowed, mainly because the default package cannot be exported.
Previous Topic:Package declaration "does not match the container package"
Next Topic:Error executing EValidator
Goto Forum:
  


Current Time: Fri Oct 24 14:46:04 GMT 2014

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

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