Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » CustomScopingFragment in Xtext 1.0 and Maven Build
CustomScopingFragment in Xtext 1.0 and Maven Build [message #696593] Thu, 14 July 2011 11:05 Go to next message
Christian Ammann is currently offline Christian AmmannFriend
Messages: 21
Registered: July 2010
Junior Member
Hi,

i have a problem. I have created a xtext 1.0 project with a simple grammar. Im using a custom scope provider to get local and global scoope providers at the same time. This technique is described in:

http://dslmeinte.wordpress.com/2010/09/02/configuring-local-and-global-scope-providers-at-the-same-time/

Therefore my MWE2-Workflow looks like:

//fragment = scoping.ImportNamespacesScopingFragment {}
fragment = scoping.CustomScopingFragment {}
fragment = exporting.QualifiedNamesFragment {}
fragment = builder.BuilderIntegrationFragment {}


Furthermore, i want to build the whole project with Maven. I have found a very good tutorial for xtext projects and Maven tycho:

http://kthoms.wordpress.com/2010/08/18/building-xtext-projects-with-maven-tycho/

It works rather good when the custom scope provider is turned off in the MWE2-Workflow (removing CustomScopingFragment and using ImportNamespacesScopingFragment instead). But when the CustomScopingFragment is used, i get the following error messages:

[INFO] Fornax Model Workflow Maven2 Plugin V3.2.0-SNAPSHOT
[ERROR] java.lang.IllegalStateException: [XtextLinkingDiagnostic: null:70 Couldn't resolve reference to JvmType 'scoping.CustomScopingFragment'.]
[ERROR] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:66 [org.eclipse.emf.mwe2.launch-1.0.2.v201102151014.jar:na]
[ERROR] at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52) ~[org.eclipse.emf.mwe2.launch-1.0.2.v201102151014.jar:na]
... 


Has anyone an idea how to solve this issue? My best guess is that the fornax maven2 plugin searches the scope provider in the package org.eclipse.xtext.generator.scoping but i dont know how to tell him to search the resource in the scoping directory of my current project. Can this be fixed by myself somehow or is this an issue with the Fornax Model Workflow Maven2 Plugin?

Best regards,

Christian

Re: CustomScopingFragment in Xtext 1.0 and Maven Build [message #696749 is a reply to message #696593] Thu, 14 July 2011 18:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13614
Registered: July 2009
Senior Member
Hi, the easiest solution i guess is to move the CustomScopingFragment to a own project/module

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: CustomScopingFragment in Xtext 1.0 and Maven Build [message #702058 is a reply to message #696749] Mon, 25 July 2011 22:55 Go to previous messageGo to next message
alex.ren2006 is currently offline alex.ren2006Friend
Messages: 46
Registered: June 2011
Member
I followed the "http://dslmeinte.wordpress.com/2010/09/02/configuring-local-and-global-scope-providers-at-the-same-time/
" on Xtext 2. It doesn't work. "import" is effective but classpath has no effect. Did you ever try Xtext 2? I just made my "AbstractStatemachineRuntimeModule.java" to look exactly like the "AbstractMyDslRuntimeModule.java" mentioned in the post. Did I miss something?
Re: CustomScopingFragment in Xtext 1.0 and Maven Build [message #702062 is a reply to message #702058] Mon, 25 July 2011 23:09 Go to previous message
alex.ren2006 is currently offline alex.ren2006Friend
Messages: 46
Registered: June 2011
Member
Please forget the previous post. I made a mistake. You post has nothing to do with my problem. Sorry for the confusion.
Previous Topic:Pure ecore to Java by Xtend2
Next Topic:JvmIdentifiableElement in XBase
Goto Forum:
  


Current Time: Tue Sep 29 12:16:06 GMT 2020

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

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

Back to the top