Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » JET <ws:project...> effect
JET <ws:project...> effect [message #47328] Thu, 26 June 2008 12:45 Go to next message
Eugen Paraschiv is currently offline Eugen ParaschivFriend
Messages: 3
Registered: July 2009
Junior Member
I've been using JET for a short time and until now I had no need for
complex workspace navigation. Now I'm trying to get my bearings with this
functionality and I encountered a small problem. It may be solved already
in a different post (I admit I did not read all of the posts here,
although I plan to); the problems is that when the JET engine processes
the <ws:project...> tag, and a new project is created into the Eclipse
workbench, that project is a general and not a Java project; This is a
problem for the following execution, and my model processing results in an
error; The only workaround I found for this is to add the java nature by
hand in the XML configuration of the project. Is there any other way to do
Re: JET <ws:project...> effect [message #47374 is a reply to message #47328] Fri, 27 June 2008 18:10 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member

While JET has no tags to create a complete Java project, all is not lost.

All the project meta-data is stored within files in the workspace. The best
way to find out what the files are is to create a Java project using the
wizards, and then take a look at in the package explorer with the ".*
resources" filter off.

From experience, you need at least:

..project - an XML document that contains the project name, and the
builders and natures for a Java project. Typically, you only need to change
the project name.
..classpath - an XML document that defines the classpath. Typically, you
don't need to change this at all.
src - the Java source folder - the Java builders complain
bitterly if they cannot find this directory.

So, something like the following should work:

====== main.jet ============

<c:setVariable var="java.project" select=" '' "/>
<ws:project name="{$java.project">
<ws:file path=".project" template="templates/java.project/project.jet"/>
<ws:file path=".classpath"
<ws:folder path="src"/>

==== project.jet ====
<?xml version="1.0" encoding="UTF-8"?>
<name><c:get select="$java.project" /></name>

======= classpath.jet ===========
<?xml version="1.0" encoding="UTF-8"?>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>

Previous Topic:Generating OCL from Model
Next Topic:Problem loading ecore model as input in JET
Goto Forum:

Current Time: Sun Jun 24 20:21:54 GMT 2018

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

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

Back to the top