Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » ws:project tag: How to specify a project type?
ws:project tag: How to specify a project type? [message #42615] Mon, 03 March 2008 14:41 Go to next message
Steve Robenalt is currently offline Steve Robenalt
Messages: 22
Registered: July 2009
Junior Member
Hi Paul,

I have a large project built around JET2 that generates code for multiple
platforms in C and Java, as well as XML and HTML artifacts. During the
generation phase, a single source model (EMF-based model) leads to the
creation of multiple projects, each of which contain the appropriate
artifacts. These projects are created using the ws:project workspace tag.

The problem is that ws:project creates an untyped project, so (for
example) the Java-based artifacts don't compile, since the project doesn't
have the Java nature assigned to them.

I've been mulling over the idea of creating an addNature tag which would
allow me to set the project type after creation. However, I'm wondering if
there is either a current or planned enhancement to either the ws:project
tag or a new tag that would achieve the same thing.

Thanks for any help you can offer.

Steve Robenalt
Re: ws:project tag: How to specify a project type? [message #42676 is a reply to message #42615] Wed, 05 March 2008 10:57 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Steve:

At the Eclispe Resource API level, there is no real concept of a project
type. The information you pass to the APIs gets reflected in the .project
file (which is an XML document). Some project 'types' - e.g. Java have
secondard files as well (e.g. .classpath).

Rather than try to know all of this things in the engine (a futile task), it
is assumed that you will simply generated all the files associated with the
type of project you want to produce:

Ex:

<ws:project name="myProject">
<ws:file path=".project" template="projectXType.jet"/>
...
</ws:project

The best way to find out what files need to be created is to run the New
project wizard, and take a look. Removing explorer filters of . files is
helpful.

Paul

"Steve Robenalt" <steve@webcircuit.com> wrote in message
news:567b2e9bcff108153dbd0c7a42d6f997$1@www.eclipse.org...
> Hi Paul,
>
> I have a large project built around JET2 that generates code for multiple
> platforms in C and Java, as well as XML and HTML artifacts. During the
> generation phase, a single source model (EMF-based model) leads to the
> creation of multiple projects, each of which contain the appropriate
> artifacts. These projects are created using the ws:project workspace tag.
>
> The problem is that ws:project creates an untyped project, so (for
> example) the Java-based artifacts don't compile, since the project doesn't
> have the Java nature assigned to them.
>
> I've been mulling over the idea of creating an addNature tag which would
> allow me to set the project type after creation. However, I'm wondering if
> there is either a current or planned enhancement to either the ws:project
> tag or a new tag that would achieve the same thing.
>
> Thanks for any help you can offer.
>
> Steve Robenalt
>
>
Re: ws:project tag: How to specify a project type? [message #42770 is a reply to message #42676] Wed, 05 March 2008 11:45 Go to previous message
Steve Robenalt is currently offline Steve Robenalt
Messages: 22
Registered: July 2009
Junior Member
Hi Paul,

Thanks for the quick reply. I guess generating the remaining project files
is a viable option. I was thinking that the "addNature" option might have
saved me some work and insulated me from platform changes, particularly
when building plugin or CDT projects.

BTW, my project is up to 51 templates and I haven't written a scriptlet
yet.

Steve Robenalt
Previous Topic:JET Exceptions and Exception Handling
Next Topic:The problem of <c:dump/> tag in jet2
Goto Forum:
  


Current Time: Thu Jul 24 06:48:48 EDT 2014

Powered by FUDForum. Page generated in 0.02026 seconds