My team was recently accepted as a Beta Tester for the 2017 software. The eclipse plugins of the new software are different in ways that make previous year’s code uncompilable when using them. In order to maintain backwards compatibility, we decided to manage two separate Eclipse installations. However, the WPIlib plugins always install to C:/Users/USER/wpilib. Is there any way to define this during installation? If not, what method would you recommend of maintaining backwards compatibility with the WPI plugins?
Is there any way to change the WPILib plugin installation directory?
Short answer is no, there’s no easy way. Longer answer is to take a look at this issue: https://github.com/wpilibsuite/EclipsePlugins/issues/15. If you change your HOME environment variable and then fix up things inside eclipse, you can do it. I’d suggest instead just keeping a backup of the ~/wpilib directory and swapping it as needed. If you also have two eclipse instances, each with a different version installed, you can just delete the ~/wpilib directory and then let them restore it.
In addition to the CANTalon problem we were seeing a weird eclipse error where the code would not compile if the plugins were not installed completely when eclipse started. The problem would be fixed by either generating a new blank robot project or going through each .java file and saving it again.
Replacing the wpilib folder to match whichever installation we were running worked. Thanks!