[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: workspace setup

Andrew Younge wrote:

that diagram is pretty much correct, except for the naming of the labx files. it would look something like this:

CS1:
-labs
-lab1
-lab2
-lab3 ...
-lec
-lec1
-lec2
...
-proj
-proj1
-proj2

what i need is for every labx, lecx, and projx to be a seperate eclipse project, and to keep that directory structure. im currently trying to use the import project thing in eclipse, however this is proving to be a pain. even if eclipse just listed like labsx, lecx and projx and didnt show the path or whatever that would be fine, as long as behind the scenes it knew and worked by the correct directory stucture.

I can see a couple of options. As you said, make each labx, lecx, and projx a seperate project. You can do this in a couple of ways. Perform New Project. Check Create Project at External Location on the project definition page, select Browse, and navigate to the labx etc directory for the project you are creating. This will leave the source and other resources in the directory structure.


A second way is to create the project in the default location and add a link to each labx etc directory. After creating the project go to the Java Build Path property page and select the Source tab. Click Add Folder then Create New Folder. Click Advanced, give the the folder a name (lab1), and check the link to folder in file system. If the directory location is going to be in the same place for everyone, you can simply Browse to the location. If the directory can be in a different location on each workstation, define a variable that can be pointed to a root location. This method allows you to include directories from different locations in the file system. For example, it would allow you to include labx and lecx directories in the same project.

You could also use Source Folders to manage what is included in a project at any given point in time. Create 3 projects: labs, lecs, projs. Specify External Location for each of them and point to the labs, lec, and proj directories as their location. The directories to be included at any point in time would then be managed off of the Java Build Path->Source tab. This method allows the student to keep as many labs, lecs, and projs active in their workspace as they want.

Keep in mind that compiler errors in one assignment don't prevent you from working on a different project. You can configure the problems view to filter out problems that you aren't currently interested in by setting a filter to only show problems for selected element or selected element and all children. You can also define a working set that narrows the scope of elements displayed in the package explorer. Working sets are defined using the upside down triangle at the top of the package explorer or project explorer.

A project can have more than one main class, you can have a main class in each lab. You can run each main class seperately without having to have all files in the project free of compiler errors.