IntelliJ is a Java Integrated Development Environment (IDE) created by Jetbrains, the core program is used to create numerous enterprise java projects, including Android apps. IntelliJ is vastly superior to VSCode’s linting, auto-correct, navigation, features, etc.
Why does WPILib not support IntelliJ?
WPILib requires that it’s “IDE” support both C++ and Java, which the Jetbrains IDEs do not (the C++ one (Clion) is not free). Also Jetbrains extension format is absolutely garbage even in comparison to Eclipse’s.
Creating the Robot Project
This is where the dependency is required. You can either use VSCode to create the robot project, or copy a template from the GradleRIO repo. If you do attempt to do it manually, please note that are various configuration files you’ll need to edit, I won’t be going into that. I’ll assume you used VSCode to create your robot project. This tutorial assumes you used the WPILibInstaller to install all of the required dependencies.
Just use VSCode to import vendor dependencies, it’s probably the easiest. However you can drop the appropriate vendor json in the vendordeps folder if you so wish.
Importing the Robot Project into IntelliJ
This is where the fun begins. Go ahead and open up IntelliJ. You’ll want to first select Open
You’ll then want to navigate to wherever your robot project is stored and select the folder.
You’ll know want to configure IntelliJ to point to Java (JDK) 11. Go ahead and click on File -> Project Structure.
Now you’ll want to select New -> JDK
Then you’ll want to navigate to the frcXXXX (where XXXX is the year) directory. By default this is located at
C:\Users\Public\frc2019\jdk. Note that for the 2020 season, this will change to
Lastly, you should change the project language level to 11. Then select Apply then Ok.
At this point, Intellisense should just work out of the box.
Building/Deploying a Robot Project
Of course, simply using the IDE to write the code isn’t enough. You’ll probably want to deploy your code to an actual robot. Let’s create the task.
In the top right window of IntelliJ, select Add Configuration.
Then press the + icon, and scroll down and click Gradle.
Name your project “Gradle Deploy” and then click the folder icon next to the gradle project input box. Select your gradle project.
Type in “deploy” in the tasks bar, and select the “deploy” task. Then click Apply and then Ok.
At this point, you’re all done! Simply select the green arrow in the top right point of IntelliJ to deploy your task!
This tutorial is not supported by WPILib in any way.
What IntelliJ theme are you using? I’m using the Material Design IntelliJ theme with the slim buttons option selected.
IntelliJ randomly stopped working!!! You probably messed up the steps. Repeat the tutorial. If you’re sure you know what you were doing, select Invalidate Caches/Restart from the top left menu underneath File.
Feel free to comment any questions below.