Community
Participate
Working Groups
I have a directory containing a Java project created on an earlier occasion (in a different workspace). I want to create a new workspace and re-create that project and use the existing directory. I can't seem to do this without losing the class information. Steps to reproduce: 1. Launch eclipse; create a Java project named "Hello Project" with source files from /Hello Project/src; create /Hello Project/src/HelloWorld.java (i.e., in the default package); build; exit eclipse. 2. Launch eclipse for a new workspace (I did this using a separate install of eclipse). 3. Create a new Java project specifying the location of the existing "Hello Project" project directory inside the old workspace. Observe: Although there are local files existing on disk at the project location, they are not accessed immediately. In particular, the classpath in the dialog comes up empty. If I proceed, the existing .classpath file is overwritten and the previously-set classpath is lost. Expectation: When a project is being created in the workbench, there is always the possibility that the files for the project already exist on disk. If they do exist, they should be used; if they do not, they should be created. NOTES: PM (5/14/2001 11:24:42 AM) I think the problem comes from the fact you use the UI wizard which does enforce a classpath initialization. This takes precedence over an eventual .classpath file existency (which is only read when opening the Java project), in fact it will be rewritten before the Java model can read it. Unclear though if existing APIs allow to solve this one, but this sounds like a problem which could affect WSA as well. Moving to Java UI. EG (5/28/01 4:38:46 PM) The Wizard could check whether a .classpath exists before initializing a new one. This might require additional API to refresh the project's build path from the .classpath file. MA (20.08.2001 17:46:23) I think, the New Java Project wizard should be allowed to assume that the project is not existing. I guess I would have to set the Java nature first, no have access to the existing .classpath file. This, however, I can not do before the user pressed finished (cancel is always possible). The feature sounds more like a 'Add existing project' where you can specify the location of an existing project, and mount it in your workspace. I think this could be supported by the desktop in general (not only for Java project). What is needed is the information of the '.vcm_meta' file. Why isn't '.classpath' part of '.vcm_meta'? We should have one project description file, containing all project specific settings.
moved to 'active'
PRODUCT VERSION: eclipse sdk build 105 (jdk)
I agree with Martin. It is fair play when the NewJavaProjectCreationWizard assumes that the project doesn't exist.
we have to revisit given the .project file support it has to be possible to point to an existing folder with an existing .project and .classpath file. The assumption that the project does not exist is too limiting. The capability based wizards create the project before pressing finish so setting the nature before pressing finish should be OK.
fixed > 20020328 with the new capability support. When a project is created that points to a location with existing .classpath file, the classpath is taken form this file.