For the 2023 season, I’ve released new version 3.0.1 of the (unofficial) FRC Plugin for IntelliJ IDEA . Versions 2022.1.x, 2022.2.x and 2022.3.x of IntelliJ IDEA are supported for all editions (Community, Education, and Ultimate). As of last year, I am increasing the major version number each build season for better clarity of when the plugin supports the next build season. Hence the 3.0 version.
Installation
You can install by going to File | Settings | Plugins, select the “Marketplace” tab, and then search for “FRC”. Select the “FRC” plugin and click the Install button. After it completes, you may need to restart IntelliJ IDEA.
To upgrade, go the File | Settings | Plugins, select the “Installed” tab, then search either for “FRC” or for “/outdated”. Click the “Update” button. After it completes, you may need to restart IntelliJ IDEA.
What’s New
2023 WPILib Support and Templates
I’ve updated of the New FRC Project Wizard to support the 2023 templates. The Java templates are direct ports of the official WPI Lib templates, with the ability to add some enhancements such as Kotlin support, include a customized the .gitignore
file (or exclude it), and more. The Kotlin templates are my conversions of the official Java templates, and are modified to be more Kotlinesque. The Kotlin files are created in src/main/java
rather than src/main/kotlin
so you can very easily use both Java and Kotlin code in the project, with the classes living side by side.
Creation of Run/Debug Configurations
When you use the the FRC Project Wizard within IntelliJ IDEA, it creates a series of IntelliJ IDEA Run/Debug Configurations for running the various gradle tasks to build and/or deploy the robot, and for attaching the debugger. In the past, this was the only time or way to create the run/debug configurations. As requested in this comment by @warren.parsons IntelliJ IDEA will now create the run debug configurations when adding the FRC Facet. The FRC Facet should automatically be added when opening a robot project for the first time in IntelliJ IDEA, such as one created externally. (You can also manually add the FRC Facet to the Gradle main
module as described in the IntelliJ IDEA documentation.) Finally, you can add the run/debug configurations via an action from the menu: Tools | FRC | Create Run/Debug Configurations | Create Build, Deploy, and Debugging Run/Debug Configurations . Note that the configurations are saved in a .run
directory in the root of the project. This directory can be stored in Git (or your version control of choice) for team sharing. Its presence will not affect VS Code users.
Previous features
RioLog Console Tool Window
While the Gradle “riolog” task can be used to view the riolog output in the Gradle build window, the FRC Plugin provides a dedicated RioLog Console Tool Window which allows for pausing, restarting, search, and clearing of the output, either on demand or automatically upon robot restart. It also provides native supports the awesome Grep Console plugin providing you with color syntax highlighting, output folding – so you can have those verbose debug statements folded out of view until you need them – as well as the ability to filter out lines. (FYI, I have no affiliation with the free Grep Console plugin. I just think its a great plugin and therefore wanted to provide support for it, if for no other reason then for my own use )
Command Based Robot Templates
There are several command based robot class templates to make coding easier. For example, when creating a command, you can select required subsystems:
The resultant created command will have the appropriate call to addRequirements
:
In Commands written in Kotlin as well:
Run/Debug Configurations
Projects created via the new project wizard have run debug configurations generated for them. This not only makes building and deploying easier – and accessible from all the familiar run/debug keyboard shortcuts – but it makes debugging easier. No more digging through the docs or Chief Delphi to refresh your memory on how to configure things to attach your Robot to the debugger. Simply run the “Build & Deploy Robot for Debugging” configuration, then use one of the “Debug Robot” debugger tasks (depending on how you are connected to the robot) to attach IntelliJ IDEA’s debugger.
You can also access the gradle based run/debug configurations from the Gradle tool window:
You can, as of 2023, also create these run/debug configurations via the menu: Tools | FRC | Create Run/Debug Configurations | Create Build, Deploy, and Debugging Run/Debug Configurations.
Theses run/debug configurations are stored in a .run
directory in the root of the project to allow sharing via git. It you do share via git, when updating the project in another instance of IntelliJ IDEA, they may not get recognized and added to the UI immediately. Closing the project and reopening will result in their discovery. (This is a core IntelliJ IDEA feature and the delay of them being recognized is out of my hands.)
Automatic notifications of WPILib Updates Available
When a WPILib update is available, the FRC Plugin will provide a notification to you. And with one click, your gradle build file will be updated to the new version, and your project re-imported (i.e. sync’ed).
The check for update can also be run manually from the Tool menu:
Feedback Welcome
As always, I sincerely appreciate any feedback you have. Please let me know if you are finding the plugin worthwhile by commenting below, or giving it a quick 5 star rating, or leaving a review. Also please feel free to open any feature requests, or report any issue via the Project’s Issue Tracker . I have a few more minor tweaks I hope to get done and pushed out soon before my Software Mentoring duties become my main focus for Q1.
Good luck to all the teams this year. I hope this plugin helps you to develop your robot with pleasure.