Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Unresolved reference with dsl in jar library
Unresolved reference with dsl in jar library [message #1832404] Thu, 17 September 2020 13:28 Go to next message
Yannick DAVELUY is currently offline Yannick DAVELUYFriend
Messages: 14
Registered: July 2020
Junior Member
Hello,

I am trying to put default types of my dsl in a separate plugin.
My dsl is based on theTerminal grammar and does not used xbase.

I created a "Default" plugin with defaults.myDsl which contains all basics types I need.

My others project have a dependency in their Manifest on "Default" plugin.

I can reference types from "Default" without any pb when the "Default" plugin is opened in the current workspace.

Now I would like to put "Default" in a jar library. I exported the plugin to a fragment and installed it in my eclipse. In the plugin dependency of my projects, the "Default" plugin is found and contains the file defaults.myDsl.
My problem is that references are not resolved, it seems that "Default" plugin is not visible by xtext.

Do you have any idea how to resolve this pb ?

Thanks

Yannick
Re: Unresolved reference with dsl in jar library [message #1832405 is a reply to message #1832404] Thu, 17 September 2020 13:31 Go to previous messageGo to next message
Yannick DAVELUY is currently offline Yannick DAVELUYFriend
Messages: 14
Registered: July 2020
Junior Member
I used the following tuto :
https://nittka.github.io/2011/08/07/scoping3.html

Yannick
Re: Unresolved reference with dsl in jar library [message #1832407 is a reply to message #1832405] Thu, 17 September 2020 13:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13641
Registered: July 2009
Senior Member
did you put your stuff to the classpath of the project that fails to resolve the references

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: Unresolved reference with dsl in jar library [message #1832409 is a reply to message #1832407] Thu, 17 September 2020 13:41 Go to previous messageGo to next message
Yannick DAVELUY is currently offline Yannick DAVELUYFriend
Messages: 14
Registered: July 2020
Junior Member
The clasppath contains
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="output" path="bin"/>
</classpath>


I think that the org.eclipse.pde.core.requiredPlugin should resolve the plugin location.

In the Plug-in dependencies of the project, the "Default" plugin is present and contains defaults.myDsl.

Yannick
Re: Unresolved reference with dsl in jar library [message #1832411 is a reply to message #1832409] Thu, 17 September 2020 13:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13641
Registered: July 2009
Senior Member
how does the requiredPlugins container in package explorer look like?
does it contain the mydsl file? can you share a screenshot?


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: Unresolved reference with dsl in jar library [message #1832413 is a reply to message #1832411] Thu, 17 September 2020 13:56 Go to previous messageGo to next message
Yannick DAVELUY is currently offline Yannick DAVELUYFriend
Messages: 14
Registered: July 2020
Junior Member
Sorry, I can't share screenshot.

In the case the Default plugin is opened in the current workspace, the StateBasedContainerManager#getVisibleContainers returns list of handles [Default,Test]

In the case the Default plugin is a jar plugin I have only [Test]. I continue my investigation with the debugger.

Yannick
Re: Unresolved reference with dsl in jar library [message #1832415 is a reply to message #1832413] Thu, 17 September 2020 14:06 Go to previous messageGo to next message
Yannick DAVELUY is currently offline Yannick DAVELUYFriend
Messages: 14
Registered: July 2020
Junior Member
In the case the Default plugin is not resolved, it's because the project is not accessible:
XtextProjectHelper#hasNature
--> project.isAccessible() --> returns false

so the Default project is closed.

This project contains only a myDsl file.

Yannick
Re: Unresolved reference with dsl in jar library [message #1832416 is a reply to message #1832413] Thu, 17 September 2020 14:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13641
Registered: July 2009
Senior Member
does it look the same for you?


index.php/fa/38924/0/


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: Unresolved reference with dsl in jar library [message #1832417 is a reply to message #1832416] Thu, 17 September 2020 14:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13641
Registered: July 2009
Senior Member
why is project closed?

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: Unresolved reference with dsl in jar library [message #1832419 is a reply to message #1832417] Thu, 17 September 2020 14:26 Go to previous messageGo to next message
Yannick DAVELUY is currently offline Yannick DAVELUYFriend
Messages: 14
Registered: July 2020
Junior Member
Yes it looks the same.

I don't know why the project is closed.

Thanks for your help. I continue to investigate.

Yannick
[SOLVED] Re: Unresolved reference with dsl in jar library [message #1832427 is a reply to message #1832419] Thu, 17 September 2020 17:30 Go to previous message
Yannick DAVELUY is currently offline Yannick DAVELUYFriend
Messages: 14
Registered: July 2020
Junior Member
The problem is resolved !

There was an error in my ui Module. I was using the SimpleResourceSetProvider instead of the XtextResourceSetProvider (by default).

Yannick
Previous Topic: generator denies to run
Next Topic:Xtend template expressions are not resolved using Xtend Maven plugin
Goto Forum:
  


Current Time: Tue Oct 27 23:20:55 GMT 2020

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

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

Back to the top