Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » import xtext resource file from other projects
import xtext resource file from other projects [message #997199] Fri, 04 January 2013 12:46 Go to next message
Rober Borecki is currently offline Rober BoreckiFriend
Messages: 1
Registered: January 2013
Junior Member
Hi,

I need to import xtext resource files writed in external eclipse projects. So I wan't to create a basic project with generic types in my language. The other projects should have possibility to see the elements from the elements created in the own and in the basic project.

Example1: "BaseProject/src/resources/basetypes.xtext"
module de.base
entity BaseEntity {
...
}

Example2: "MyProject/src/resources/carsmanagement.xtext"
import de.base

entity Car extends BaseEntity {
...
}

The question is how to set xtext, so that i see also the elements defined in other projects. In the moment i see only local files in the own project.

Re: import xtext resource file from other projects [message #997269 is a reply to message #997199] Fri, 04 January 2013 20:45 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

you have to set a project dependency between the projects. (this is a std. eclipse means)

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: import xtext resource file from other projects [message #997615 is a reply to message #997199] Mon, 07 January 2013 00:40 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
This is described in the documentation. It is either "all in same
project", use OSGi class loaders, or custom (IIRC).

The most powerful out of the box is the OSGi class loaders. I would
recommend using that unless you have a requirement to run without JDT
being installed. (In Cloudsmith Geppetto @ github, we do not include
JDT, and use custom visibility between projects since the language it is
supporting uses a different kind of metadata than OSGi). (It was not
that easily achieved; and hence I recommend using the standard java/OSGi
way of making things visible).

Hope that helps.
Regards
- henrik

On 2013-04-01 19:21, Rober Borecki wrote:
> Hi,
>
> I need to import xtext resource files writed in external eclipse
> projects. So I wan't to create a basic project with generic types in my
> language. The other projects should have possibility to see the elements
> from the elements created in the own and in the basic project.
>
> Example1: "BaseProject/src/resources/basetypes.xtext"
> module de.base
> entity BaseEntity {
> ...
> }
>
> Example2: "MyProject/src/resources/carsmanagement.xtext"
> import de.base
>
> entity Car extends BaseEntity {
> ...
> }
>
> The question is how to set xtext, so that i see also the elements
> defined in other projects. In the moment i see only local files in the
> own project.
>
>
Previous Topic:Formatter ignoring "comment" rules - remember to provide own IHiddenTokenHelper implementa
Next Topic:Errors and not showing in Problems view
Goto Forum:
  


Current Time: Thu Apr 25 16:50:25 GMT 2024

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

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

Back to the top