Demonstration of an eclipse bug logged at https://bugs.eclipse.org/bugs/show_bug.cgi?id=560588
Importing existing projects into eclipse do not respect the Project name as defined in the .project
file depending on where the workspace is located in the code's top level directory (i.e. nested 1 or 2 levels above the .project
file)
- Open Eclipse
- Switch the workspace to the
/EclipseBug/
directory - Select from Eclipse top menu
File
->Import
->General
->Existing projects into workspace
- Use the current directory (
/EclipseBug/
) as the root directory and ensure Search for nested projects is selected - The projects that should be displayed are
CoreInf
andNotCoreInf
(as expected, using the.project
name) - Switch the workspace to the
/EclipseBug/myWorkspace/
directory - Select from Eclipse top menu
File
->Import
->General
->Existing projects into workspace
- Use the current directory (
/EclipseBug/myWorkspace/
) as the root directory and ensure Search for nested projects is selected - The projects that should be displayed are
CoreInf
andcoreinf
(not expected, using the directory name)
When the workspace is set to the top level directory of the projects, Eclipse should import using the project name rather than the subdirectory name of the project.
Expected projects for Import - 2 levels above project dir (e.g. /EclipseBug/
)
Actual projects for Import - 1 levels above project dir (e.g. /EclipseBug/myWorkspace
)
It would be expected that the behavour would be the same irrespective of the placement of the workspace directory/import root directory and that the .project
name would always be used over the directory name.
Ensure your workspace is at a level where imported projects are not nested one level deep (i.e. set your project at least two levels above the codebase)