Skip to main content



      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 09:28 Go to next message
Eclipse UserFriend
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 09:31 Go to previous messageGo to next message
Eclipse UserFriend
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 09:33 Go to previous messageGo to next message
Eclipse UserFriend
did you put your stuff to the classpath of the project that fails to resolve the references
Re: Unresolved reference with dsl in jar library [message #1832409 is a reply to message #1832407] Thu, 17 September 2020 09:41 Go to previous messageGo to next message
Eclipse UserFriend
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 09:48 Go to previous messageGo to next message
Eclipse UserFriend
how does the requiredPlugins container in package explorer look like?
does it contain the mydsl file? can you share a screenshot?
Re: Unresolved reference with dsl in jar library [message #1832413 is a reply to message #1832411] Thu, 17 September 2020 09:56 Go to previous messageGo to next message
Eclipse UserFriend
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 10:06 Go to previous messageGo to next message
Eclipse UserFriend
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 10:18 Go to previous messageGo to next message
Eclipse UserFriend
does it look the same for you?


index.php/fa/38924/0/
Re: Unresolved reference with dsl in jar library [message #1832417 is a reply to message #1832416] Thu, 17 September 2020 10:18 Go to previous messageGo to next message
Eclipse UserFriend
why is project closed?
Re: Unresolved reference with dsl in jar library [message #1832419 is a reply to message #1832417] Thu, 17 September 2020 10:26 Go to previous messageGo to next message
Eclipse UserFriend
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 13:30 Go to previous message
Eclipse UserFriend
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: Sat Jul 12 12:46:12 EDT 2025

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

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

Back to the top