Just in time for Kickoff 2020, I’ve released a new version of the (unofficial) FRC Plugin for IntelliJ IDEA . Versions 2019.2.x and 2019.3.x of IntelliJ IDEA are supported for all editions (Community, Education, and Ultimate).
You can install by going to File | Settings | Plugins, select the “Marketplace” tab, and then search for “FRC”. Select the plugin and click the Install button. After it completes, you will 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 will need to restart IntelliJ IDEA.
New Project Wizard
In addition to the some polishing of the New Project Wizard announced in the last upgrade , all the 2020 project templates and examples form the WPI Lib project creation tool were ported over. There are now 45 example projects (up from 18). They will appear when a 2020 version of WPI Library is selected on the first step in the wizard:
Several Gradle Run & Debug Configurations are now automatically created when you create a new project. (You can of course edit or delete them.) They are all accessible via the Run drop down, or in the Gradle ones in the Gradle tool window. (The “Debug Robot” ones to attach the debugger are of course available only in the run window since they are not Gradle execution configurations.)
Updated New Class feature
The new class/component feature was completely rewritten to take advantage of more features in the IntelliJ IDEA API. Now instead of just being prompted for the name of the class, additional options are available. For any applicable components, you will be asked what class to use as the base class. In addition to the ones from the WPI Library, any relevant abstract classes or classes who’s name ends in “Base” from your project will be listed. For example, in the below screenshot, two Team specific base classes are shown.
When creating New Commands, all available subsystems are listed and can be selected for inclusion. Those selected will automatically be imported and added to a call to the addRequirements() method.
The Subsystems options include the ability to create the Subsystem as a Singleton.
To ensure quick class creation, your selections are remembered for the next time the dialog opens … except for the desired base class. I did not get a chance to add that yet. But it will be included in a new update soon, likely next week.
The templates also support both the “original” version 1 Command Based API as well as the new Version 2 Command Based API being introduced this year. The templates automatically change based on which version of the API your project is configured to use in the Gradle Build.
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, and clearing of the output. It also provides native supports the awesome Grep Console plugin providing you with 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 )
New in this update, the RioLog Console reads the team number from the project’s
wpilib_preferences.json file. Previously it used an application wide configured team number. This supports teams that create a second robot using a different team number.
Schema suport for the
wpilib_preferences.json file was added. While you should never have to edit this file manually, it’s good to know you now have error highlighting and code completion available to ensure that it is correct.
The update includes a number of miscellaneous changes such as more words added to the FRC/WPI specific spell checking dictionary, the squashing of some bugs and quirks, and other improvements.
As always, I appreciate any feedback you have. Please let me know if you are finding the plugin worthwhile by commenting below. 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 next week before my Software Mentoring duties become my main focus for Q1 of 2020. The plugin currently has 4,659 downloads. Here’s hoping it crossed the 5,000 mark during the 2020 build season.
Good luck to all the teams this year. I hope this plugin helps you to develop your robot with pleasure.