Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Add Environment Library
Add Environment Library [message #986682] Wed, 21 November 2012 11:08 Go to next message
Andrea Margheri is currently offline Andrea Margheri
Messages: 20
Registered: July 2012
Junior Member
Hi,
I have developed a DSL project in Xtext and its related wizard for creating a new project; I need a Java project due to generated files are java class.
Thus, the wizard create a new java project, but how can I add to Java Environment an external library?
This library is yet into Eclipse environment, infact is referenced by the DSL plugin. Manually I can add this to Java project, but I'd like to do it programmatically.
How?

Thanks

Andrea
Re: Add Environment Library [message #986913 is a reply to message #986682] Thu, 22 November 2012 10:59 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan Koehnlein
Messages: 656
Registered: July 2009
Senior Member
I'd expect that to be in the JavaProjectFactory but it doesn't have an
hook for that, as we usually generate Plugin projects, which use plugin
dependencies rather than libs.

Looks like you have to override the JavaProjectFactory and add the
functionality yourself. AFAIK it boils down to adding a classpath entry,
but that's more a JDT related question.



Am 21.11.12 12:09, schrieb Andrea Margheri:
> Hi, I have developed a DSL project in Xtext and its related wizard for
> creating a new project; I need a Java project due to generated files are
> java class. Thus, the wizard create a new java project, but how can I
> add to Java Environment an external library? This library is yet into
> Eclipse environment, infact is referenced by the DSL plugin. Manually I
> can add this to Java project, but I'd like to do it programmatically.
> How?
>
> Thanks
>
> Andrea


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Add Environment Library [message #986915 is a reply to message #986913] Thu, 22 November 2012 11:09 Go to previous message
Andrea Margheri is currently offline Andrea Margheri
Messages: 20
Registered: July 2012
Junior Member
I've fixed using bundle for get the uri of plugin and adding it, manually, as a new ClassPath entry.

Andrea
Previous Topic:[Xtext] Default values for optional assignments?
Next Topic:import resolution during editing
Goto Forum:
  


Current Time: Mon Sep 22 20:36:59 GMT 2014

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

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