project types and file types - please help [message #179443] |
Fri, 10 November 2006 10:49  |
Eclipse User |
|
|
|
I have been trying to find answers to these questions, but haven't gotten
any useful feedbacks... so I am going to give it another shot.
Question 1. Is there a[n] [easy] way to convert an existing generic project
to a Java project? The answer I got before was to use import project, but
the problem with import is I must use a different project name, or place it
under a different workspace directory. What I would like to do is to change
the project type in-place, can I do that?
Question 2. How can I check in a new Java project into CVS along with its
project type information? It seems that only the code is checked in but not
the project type information (the .project and other files), so if I check
it out from a different machine, it goes back to the "generic project" type,
which goes to Question 1.
Question 3. Why newly created files are all treated as binaries? The rules
under Team->File Content says *.java are ASCII Text, but whenever i create a
new class, that new java file shows up as Binary, and I have to manually
change it to ASCII only after it's been committed into the CVS? What did I
do wrong?
I have been boggled by these three questions for a long time, and would
appreciate it very much if any of you Eclipse experts can help me clearing
them.
-- Jim
|
|
|
Re: project types and file types - please help [message #179477 is a reply to message #179443] |
Fri, 10 November 2006 14:51   |
Eclipse User |
|
|
|
Originally posted by: eclipse4.rizzoweb.com
Jim Bear wrote:
> I have been trying to find answers to these questions, but haven't gotten
> any useful feedbacks... so I am going to give it another shot.
>
> Question 1. Is there a[n] [easy] way to convert an existing generic project
> to a Java project? The answer I got before was to use import project, but
> the problem with import is I must use a different project name, or place it
> under a different workspace directory. What I would like to do is to change
> the project type in-place, can I do that?
You can try editing the .project file manually to include the Java
nature and builder. Here is a sample from one of my projects:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MyProject</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
</natures>
</projectDescription>
I don't know for certain, but I think if you do this and restart Eclipse
it will generate a .classpath file for you. If not, create a new dummy
Java project and steal the .classpath from that.
> Question 2. How can I check in a new Java project into CVS along with its
> project type information? It seems that only the code is checked in but not
> the project type information (the .project and other files), so if I check
> it out from a different machine, it goes back to the "generic project" type,
> which goes to Question 1.
Just check in the .project and .classpath files along with everything else.
>
> Question 3. Why newly created files are all treated as binaries? The rules
> under Team->File Content says *.java are ASCII Text, but whenever i create a
> new class, that new java file shows up as Binary, and I have to manually
> change it to ASCII only after it's been committed into the CVS? What did I
> do wrong?
Perhaps something on your CVS server configuration. It works as expected
for me with Eclipse 3.2/3.2.1
Hope this helps,
Eric
|
|
|
Re: project types and file types - please help [message #179509 is a reply to message #179477] |
Fri, 10 November 2006 18:22   |
Eclipse User |
|
|
|
Hi Eric,
Thank you so much for getting back to me and clearing the questions that
have been bugging me for centuries... Yet I am still not quite sure about
the 2nd question - you said I can check in the .project along with other
files.. but when I do a share project, only the codes are showing in the
team-synchronization perspective, but not those hidden files. do I have to
check them in manually using cvs command line? thanks.
-- Jim
"Eric Rizzo" <eclipse4@rizzoweb.com> wrote in message
news:ej2l7m$aeo$1@utils.eclipse.org...
> Jim Bear wrote:
>> I have been trying to find answers to these questions, but haven't gotten
>> any useful feedbacks... so I am going to give it another shot.
>>
>> Question 1. Is there a[n] [easy] way to convert an existing generic
>> project to a Java project? The answer I got before was to use import
>> project, but the problem with import is I must use a different project
>> name, or place it under a different workspace directory. What I would
>> like to do is to change the project type in-place, can I do that?
>
> You can try editing the .project file manually to include the Java nature
> and builder. Here is a sample from one of my projects:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <projectDescription>
> <name>MyProject</name>
> <comment></comment>
> <projects>
> </projects>
> <buildSpec>
> <buildCommand>
> <name>org.eclipse.jdt.core.javabuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
> </buildSpec>
> <natures>
> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
> <nature>org.eclipse.jdt.core.javanature</nature>
> <nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
> </natures>
> </projectDescription>
>
> I don't know for certain, but I think if you do this and restart Eclipse
> it will generate a .classpath file for you. If not, create a new dummy
> Java project and steal the .classpath from that.
>
>> Question 2. How can I check in a new Java project into CVS along with
>> its project type information? It seems that only the code is checked in
>> but not the project type information (the .project and other files), so
>> if I check it out from a different machine, it goes back to the "generic
>> project" type, which goes to Question 1.
>
> Just check in the .project and .classpath files along with everything
> else.
>
>>
>> Question 3. Why newly created files are all treated as binaries? The
>> rules under Team->File Content says *.java are ASCII Text, but whenever i
>> create a new class, that new java file shows up as Binary, and I have to
>> manually change it to ASCII only after it's been committed into the CVS?
>> What did I do wrong?
>
> Perhaps something on your CVS server configuration. It works as expected
> for me with Eclipse 3.2/3.2.1
>
> Hope this helps,
> Eric
>
|
|
|
Re: project types and file types - please help [message #179630 is a reply to message #179509] |
Sat, 11 November 2006 21:29  |
Eclipse User |
|
|
|
Originally posted by: eclipse4.rizzoweb.com
Jim Bear wrote:
> Hi Eric,
>
> Thank you so much for getting back to me and clearing the questions that
> have been bugging me for centuries... Yet I am still not quite sure about
> the 2nd question - you said I can check in the .project along with other
> files.. but when I do a share project, only the codes are showing in the
> team-synchronization perspective, but not those hidden files. do I have to
> check them in manually using cvs command line? thanks.
I was pretty sure that those files get included when you check in a
project. If you can reproduce the behavior where they do not get
included, I recommend you file a bug report.
In any case, you can just select the files in the Navigator and commit
them from the right-click menu.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.11641 seconds