Skip to content

Developing in other IDEs

Nicklas Boserup edited this page Aug 17, 2017 · 8 revisions

Please note that this article is still in progress...

If you, like some of us, prefer to develop in a specific IDE, that is not Eclipse, read on here!

Internally in our team, we use Netbeans and IntelliJ IDEA alongside Eclipse and are therefore going to focus on these in this article. But the general approach should be similar in other IDE's as well.

The easiest approach is to create a WPILib java project in Eclipse, and then importing that project into either Netbeans or IntelliJ.

The DK-Robotics FRC project in this GitHub repository is actually stored as an Eclipse project. Therefore, you can import it directly into Eclipse, or import it into either Netbeans or IntelliJ, as described below

Importing the project

Fortunately, both Netbeans and IntelliJ have options for importing existing Eclipse projects into the respective applications. This is what you should do, if you want to develop this project in Netbeans or IntelliJ.

Netbeans

In Netbeans, go to the menu File -> Import Project -> Eclipse Project.... If you have the Eclipse project in Eclipse's workspace directory, then choose Import Projects from Workspace and navigate to the projects folder. If you, however, do not have the project in the Eclipse workspace directory (ie if you have just downloaded this project, and haven't had it open in Eclipse before), then choose the latter option in the dialog; Import Project ignoring Project Dependencies, locate the project folder, and choose a destination directory.

Either way, just click Finish, and the magic will happen!

Notice that this DK-Robotics FRC project contains four .jar files, that are automatically linked as libraries. These files are located in frc2017/libs. It is vital that you include these files! So be sure to do so, if you create your own new project, that you intend to develop outside of Eclipse.

IntelliJ IDEA

In IntelliJ, go to the menu File -> New -> Project from Existing Sources... and navigate to the Eclipse project folder and click OK. This will open up the Import Project dialog. Select Import project from external model, select Eclipse and hit Next and Next again. Everything should already be selected the right way by default, so simply follow the wizard to the end.

Notice that this DK-Robotics FRC project contains four .jar files, that are automatically linked as libraries. These files are located in frc2017/libs. It is vital that you include these files! So be sure to do so, if you create your own new project, that you intend to develop outside of Eclipse.

Building and running the project

As long as the dependencies/libraries are correctly imported (as they are in this Github project, as stated in the note above), you can build the project just like you are used to doing in both Netbeans and IntelliJ. This might be a nice way to check for any possible syntax errors.

Unfortunately, though, it is not possible to upload the project to the RoboRIO and run it, as the FRC WPILib plugin is only available in Eclipse...

The good news, however, is that Eclipse will automatically synchronize the projects and all the files, when you save or build the project from any other IDE. Therefore, you can just have Eclipse hanging around in the background, do all your coding/development in Netbeans or IntelliJ (or both, since they all reflect file changes in the background), and merely use Eclipse to upload and run the code on the robot.

This is our current approach, and even though it is not ideal, it is actually working quite fine.

We are currently investigating how it might be possible to compile the project, upload it to the robot, and run it from other IDE's than Eclipse (via terminal/CLI)... We think that it should be possible by some Ant-task/build, but we haven't figured out how, just yet. If you know how, please let us know!

Clone this wiki locally