IncrementalProjectBuilder (newbie) [message #249675] |
Fri, 04 June 2004 14:21  |
Eclipse User |
|
|
|
Originally posted by: karypid.inf.uth.nospam.gr
Hi all,
How can I add a nature I created to _already_ existing Java projects?
From the docs I only found programmatic ways to associate the nature with
the project, when the project is created.
The proble is that my nature is supposed to be applied to JDT projects,
which are created by the JDT wizard. I don't want to change the JDT code.
Is there a way to tell Eclipse to "attach" a nature to a project, once it
has been created?
--
In theory, there is no difference between theory and practice.
In practice, there is. -- Yogi Berra.
Alexandros Karypidis
University of Thessaly
Computer & Communications Engineering dept.
|
|
|
Re: IncrementalProjectBuilder (newbie) [message #250066 is a reply to message #249675] |
Mon, 07 June 2004 09:20  |
Eclipse User |
|
|
|
According to the "Java Developer's Guide to Eclipse" you need to do the
following:
get the descriptions of a Projet (projet.getDescription())
you can now retrieve the old natures using getNatureIds on the
description. Create a new array with the old natures and you own.
set the newNatures using setNatureIds, and finally set the description
using setDescription on the project.
hope that helps.
// florian
Alexandros Karypidis wrote:
> Hi all,
>
> How can I add a nature I created to _already_ existing Java projects?
>
> From the docs I only found programmatic ways to associate the nature with
> the project, when the project is created.
>
> The proble is that my nature is supposed to be applied to JDT projects,
> which are created by the JDT wizard. I don't want to change the JDT code.
>
> Is there a way to tell Eclipse to "attach" a nature to a project, once it
> has been created?
>
|
|
|
Powered by
FUDForum. Page generated in 0.07132 seconds