First of all, I have no experience with CDT, but I met a similar situation with JDT (Java Development Tooling), so my answer may help. Hereinafter, the term <workspace> denotes the root directory of your workspace.
- Eclipse projects want to be created all the time directly in the workspace at the top level.
- However, it is possible to choose another location for the project. This should be done as follows:
- In the create project dialog box, enter a name for the project.
- Uncheck the "Use default location" box and manually enter the directory
<workspace>/level_1/project_1 . - End the dialogue.
- Repeat this process with the following inputs:
<workspace>/level_1/project_2<workspace>/level_2/level_3/project_3
- You should now have 3 projects in Eclipse.
- When you look at the file system (outside of eclipse), you should see the directory structure you want to get.
- It is impossible to have projects inside other projects. So
level_1 , level_2 and level_3 are only directories, without projects. And they are not visible in the eclipse. There are exceptions to this rule (for example, the m2e plugin for integrating Maven into Eclipse), but it must be implemented by plugins. I do not know the solutions for CTS, but I do not know CDT.
Detailed instructions
In the Indigo installation (Eclipse 3.7), where the CDT was added as a function (version 8.0.0), the following was added.
- Go to the "C / C ++" perspective.
- Select in the "Project Explorer"
New > C-Project (should also work in C ++). - Uncheck the box next to "Use default location."
- Paste in the Location:
<workspace>/level_1/project_1 text box. - Enter the name of the project:
project_1 . - End the dialogue.
- As a result, you have the directory structure
<workspace>/level_1/project_1 , and in the project explorer - the name of the project project_1 . - Repeat step 2-5 with the directory
<workspace>/level_1/project_2 and the project name project_2 .
At the end, you have 2 projects named project_1 and project_2 , which are in the shared directory level_1 . Hopefully now thatβs enough to recreate it for you.
source share