A productivity plugin for FIRST Tech Challenge (FTC) robotics teams using IntelliJ IDEA or Android Studio.
Note: This plugin currently generates templates for the SolversLib command-based framework. Support for other frameworks may be added in future versions.
Generate boilerplate code quickly for SolversLib command-based FTC patterns:
- Autonomous OpMode - Create autonomous programs with pre-configured structure
- TeleOp OpMode - Create driver-controlled programs
- Subsystem - Create subsystems following the read-loop-write pattern
- WSubsystem Base Class - Abstract base class for the read-loop-write architecture
- Command - Create commands for structured robot control
- Robot Container - Create robot container classes
- Java templates
- Kotlin templates
- Configurable default language preference in settings
- Open IntelliJ IDEA or Android Studio
- Go to Settings/Preferences → Plugins → Marketplace
- Search for "FTC Code Snippets"
- Click Install
- Restart the IDE
- Download the latest release
.zipfile from Releases - Go to Settings/Preferences → Plugins️ → Install Plugin from Disk...
- Select the downloaded
.zipfile - Restart the IDE
- Right-click in the Project view on a directory
- Select New → FTC Snippets
- Choose the template type you want to create
- Enter the class name
- The file will be generated with the appropriate boilerplate code
Go to Settings/Preferences → Tools → FTC Code Snippets to configure:
- Preferred Language: Choose between Java and Kotlin as the default language for generated templates
The plugin encourages the read-loop-write pattern for subsystems:
public class MySubsystem extends WSubsystem {
@Override
public void read() {
// Read all sensor/encoder values
}
@Override
public void loop() {
// Process data, run control logic
}
@Override
public void write() {
// Write outputs to hardware
}
}This pattern helps organize code and ensures consistent timing behavior.
- IntelliJ IDEA 2025.1+ or Android Studio 2025.1+
- Java 21+
- SolversLib added to your FTC project
# Clone the repository
git clone https://github.com/cohenhill/FTC_Code_Snippets.git
cd FTC_Code_Snippets
# Build the plugin
./gradlew build
# Run a test IDE instance
./gradlew runIdeContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- FIRST Tech Challenge for inspiring robotics education
- Seattle Solvers for the SolversLib command-based framework
- JetBrains for the IntelliJ Platform SDK
Project Link: https://github.com/cohenhill/FTC_Code_Snippets
