Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Change proejct type on the fly?
Change proejct type on the fly? [message #156597] Fri, 14 November 2003 03:30 Go to next message
Eclipse UserFriend
Originally posted by: s_s_patil.hotmail.com

Can I change the type of a project after its creation? I believe it may
have something to do with associating new plug-ins (and natures!) with the
project. Not sure how to get this done though?

Specifically - when I check out a project from a CVS repository, a simple
project gets created. In order to compile the code (it's Java), it seems
the project needs to be of "Java type". How do I now change the project
type without losing the CVS functionalities (compare with latest version,
etc)?

Thanks in advance
-- SP
Re: Change proejct type on the fly? [message #156653 is a reply to message #156597] Fri, 14 November 2003 09:29 Go to previous messageGo to next message
Chris Wege is currently offline Chris WegeFriend
Messages: 16
Registered: July 2009
Junior Member
> Can I change the type of a project after its creation? I believe it may
> have something to do with associating new plug-ins (and natures!) with the
> project. Not sure how to get this done though?

- Open the ".project" file of you project. You might have to switch to
the Resources perspective to do that.
- Find the "natures" section. For a plain java project it should look
like this:
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
- To attach a java builder, check the "buildSpec" section. It should
contain:
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
- You also might have to patch or even create the ".classpath" file. Its
"classpath" section should at least contain:
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- Depending on whether you have a "bin" directory you should have:
<classpathentry kind="output" path="bin"/>

But you should be able to resolve most of these issues during checkout.
When you checkout a project, that is not an Eclipse project, the "Check
out As..." dialog offers to "Checkout as project using the New Project
Wizard". Try that.

Hope that helps,
Chris
Re: Change proejct type on the fly? [message #156661 is a reply to message #156597] Fri, 14 November 2003 09:31 Go to previous message
Jerome Lanneluc is currently offline Jerome LannelucFriend
Messages: 572
Registered: July 2009
Senior Member
"SP" <s_s_patil@hotmail.com> wrote in message
news:bp1i8d$n0c$1@eclipse.org...
>
> Can I change the type of a project after its creation? I believe it may
> have something to do with associating new plug-ins (and natures!) with the
> project. Not sure how to get this

Not sure if you want to do it through a UI or programaticaly. Through a UI,
it is not possible (I believe there's a feature request somewhere in
bugzilla). Programaticaly, you need to set the description of the project
(see IProject.setDescription(...)).

> Specifically - when I check out a project from a CVS repository, a simple
> project gets created. In order to compile the code (it's Java), it seems
> the project needs to be of "Java type". How do I now change the project
> type without losing the CVS functionalities (compare with latest version,
> etc)?

If your project in the CVS repository was checked in without a .project
file, then when you check it out, just choose 'Check Out As...' and in the
New Project wizard choose 'Java project'.
Otherwise you can manually edit the .project file and add the following in
the projectdescription:
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>

Jerome
Previous Topic:[TextCellEditor] TableViewer not updated?
Next Topic:Filtering on subfolders
Goto Forum:
  


Current Time: Fri Oct 18 02:39:20 GMT 2024

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

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

Back to the top