Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Formatter2: No GenPackage for NsURI http://www.eclipse.org/emf/2002/Ecore
Formatter2: No GenPackage for NsURI http://www.eclipse.org/emf/2002/Ecore [message #1728185] Thu, 31 March 2016 16:50 Go to next message
Andrey Petrenko is currently offline Andrey PetrenkoFriend
Messages: 8
Registered: March 2016
Junior Member
I'm trying to use formatter2
I added the following section to mwe2
formatter = {
    generateStub = true
}

Here is my grammar file
Reporting:
	(imports+=Import)*
	(tables+=Table)*;

Table:
	((type='table') name=ID ('with scheme' '{' (fields+=Field)* '}')?)
	|((type='view') name=ID '=' sourceTable=[Table] ('.' actions+=(FilterAction | JoinAction | DisjoinAction | GroupByAction))*)
	;

Import:
	'import' name=ID;

Field:
	name=ID ':' type=('long' | 'short' | 'string' | 'char' | 'boolean' | 'int' | 'object');

FilterAction:
	(name='filter') '(' (actionParams+=ActionParam (','actionParams+=ActionParam)*)? ')' ('{' mapping+=Mapping '}')?;

JoinAction:
	(name='join') '(' (actionParams+=ActionParam (','actionParams+=ActionParam)*)? ')' ('{' mapping+=Mapping '}')?;

DisjoinAction:
	(name='disjoin') '(' (actionParams+=ActionParam (','actionParams+=ActionParam)*)? ')' ('{' mapping+=Mapping '}')?;

GroupByAction:
	(name='groupBy') '(' (actionParams+=ActionParam (','actionParams+=ActionParam)*)? ')' ('{' mapping+=Mapping '}')?;

ActionParam:
	name=ID;

Mapping:
	sourceField=ID'=>'targetField=ID;

When I try to generate Formatter I get error:
java.lang.RuntimeException: No GenPackage for NsURI http://www.eclipse.org/emf/2002/Ecore.

but if change my `Table` rule the following way it works
Table:
	((type='table') name=ID ('with scheme' '{' (fields+=Field)* '}')?)
	|((type='view') name=ID '=' sourceTable=[Table] ('.' actions+=FilterAction)*)
	;

Does somebody know why it happens?

Best regards,
Andrey
Re: Formatter2: No GenPackage for NsURI http://www.eclipse.org/emf/2002/Ecore [message #1728192 is a reply to message #1728185] Thu, 31 March 2016 19:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
can you please file a bug for this.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Formatter2: No GenPackage for NsURI http://www.eclipse.org/emf/2002/Ecore [message #1728193 is a reply to message #1728192] Thu, 31 March 2016 19:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
as a workaround you could add common supertype for the actions != eobject

AbstractAction:
FilterAction | JoinAction | DisjoinAction | GroupByAction
;


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Formatter2: No GenPackage for NsURI http://www.eclipse.org/emf/2002/Ecore [message #1728235 is a reply to message #1728193] Fri, 01 April 2016 09:17 Go to previous message
Andrey Petrenko is currently offline Andrey PetrenkoFriend
Messages: 8
Registered: March 2016
Junior Member
Hi,

thanks for your reply

bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=490871
Previous Topic:XText 2.9 Generated Scope Provider Class
Next Topic:own scoping fragment with 2.9 generator
Goto Forum:
  


Current Time: Fri Apr 19 23:06:40 GMT 2024

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

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

Back to the top