Eclipse Usage questions?

J

Jim Crowell

System Details:
Version: Eclipse 2.1.0
OS: Win XP Pro

I am developing a Java Package designed to produce a Form Centric Java
Application. Most of the recent work has been done on a Linux box using
EMacs. I went to this system after a bad experience with Win 98 and a
commercial IDE.

I recently went to Eclipse because I have a bunch of "clean up" re-factoring
to do. Due to my own ignorance, I have had a hard time getting Eclipse setup
for my needs but I now have it working well and I really like what it gives
me in comparison to the above mentioned commercial "buggy" IDE.

In my attempt to setup my Eclipse Project, I initially tried to have Eclipse
work on my files as they exist in the folders illustrated in items a) and b)
below. However, I was only successful in setting up a workspace as depicted
by items c) and d) below.
_____________________________
| Folders:
| a) C:/my_Form_Package
| - contains original Form Package .java files
| b) C:/my_Application
| - contains Application original Main and Application Form Class's
| c) C:/Java/IDE/Eclipse/workspace/my_Eclipse_Project
| - contains Application Main Class and Application Form Class's
| d) C:/Java/IDE/Eclipse/workspace/my_Eclipse_Project/my_Form_Package
| - contains copies of Form Package .java and .class Files
|____________________________

Problem:
My Package is designed to do some dynamic file generations during the
"Development" phase based on the Application Form Class .java files. The
Package, by design, looks for the .java Source Files in the b) [above]
Folder.

Therefore, with my current Eclipse Setup, I have to copy the Application
Form Class .java files from c) to b) during my development phase.

Questions:
1. Is there a way to fix my current Eclipse Project to use the original [a)
and b)] folders or do I have to setup a new Eclipse Project and try to tell
it to use the original folders?
2. Before composing this message I did try setting up a new Project. I
placed my Main Class and a single Form Class in a new folder and under
"Project Contents" of the new Project Wizard, I browsed to that new Folder.
However, when I try to import the Main Class and the single Application Form
Class I get the "Source is in the Hierarchy of the destination" error?

This looks awful familiar from when I did my initial Eclipse Project setup.
I guess I am just dumb because setting up a Project in Eclipse should not be
this difficult.

Any suggestions on what I am doing wrong here?

3. Re-factoring: When I rename one of my Form Package classes from "Fudge"
to "Whatever" will I need to change the file name in the Eclipse Project and
the Windows Folder myself or is Eclipse 2.1.0 smart enough to do that for
me?

Regards,
Jim...
 
C

Chris Smith

Jim said:
Questions:
1. Is there a way to fix my current Eclipse Project to use the original [a)
and b)] folders or do I have to setup a new Eclipse Project and try to tell
it to use the original folders?

I'm not aware of a way to reference outside the project directory to add
source folders to an Eclipse project. So I think you need a new
project.
2. Before composing this message I did try setting up a new Project. I
placed my Main Class and a single Form Class in a new folder and under
"Project Contents" of the new Project Wizard, I browsed to that new Folder.
However, when I try to import the Main Class and the single Application Form
Class I get the "Source is in the Hierarchy of the destination" error?

This looks awful familiar from when I did my initial Eclipse Project setup.
I guess I am just dumb because setting up a Project in Eclipse should not be
this difficult.

Any suggestions on what I am doing wrong here?

Generally speaking, it's best to set up a separate subdirectory (called
"bin" or "build" for example) for the generated class files. That said,
though, I haven't seen the problem you're mentioning.
3. Re-factoring: When I rename one of my Form Package classes from "Fudge"
to "Whatever" will I need to change the file name in the Eclipse Project and
the Windows Folder myself or is Eclipse 2.1.0 smart enough to do that for
me?

If you use Alt-Shift-R (or the refactor menu) to do the renaming, it
will do that for you. It will also update references from the rest of
the project.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top