Importing an Eclipse project into VS Code
To make it easy for teams to use existing projects with the new IDE, we have implemented a wizard for importing Eclipse projects into VS Code. This will generate the necessary Gradle components and load the project into VS Code.
Launch the Import Wizard
Press Ctrl+Shift+P and type "WPILib" or click the WPILib icon to locate the WPILib commands. Select "Upgrade a WPILib Eclipse Project.
You'll be presented with the WPILib Eclipse Project Upgrade window. This is similar to the process of creating a new project and the window and the steps are shown below.
Perform the following steps to fill in the Eclipse Project Upgrade window:
- Select the eclipse project to convert. Select the build.properties file in the root directory of the eclipse project.
- Fill in the new project folder by pressing the "Select a new project folder" button.
- If the "Create new folder" checkbox is checked, then the project will be stored in a new folder under the one selected in 2. If it is not checked, then the project will be placed in the folder specified. It must be empty in that case.
- Enter the name of the new project.
- Enter the team number for the creation of the project and for the robot deployment.
- And finally, click "Upgrade Project" to begin the upgrade.
The eclipse project will be upgraded and copied into the new project directory from step 3 above. You can then either open the new project immediately or open it later using the Ctrl-O (or Command-O for Mac) shortcut.
C++ Configurations (C++ Only)
For C++ projects, there is one more step to set up IntelliSense. Whenever you open a project, you should get a pop-up in the bottom right corner asking to refresh C++ configurations, click Yes to setup IntelliSense.