strongback / strongback-java

A library for FIRST Robotics Competition robots that makes it easier to write and test your robot code.
MIT License
41 stars 38 forks source link

Corrected the Windows problems when initializing Eclipse and creating new Eclipse projects (Issue 54) #55

Closed rhauch closed 8 years ago

rhauch commented 8 years ago

The new-project tool manipulates quite a few paths and generates/updates files. On Windows, the backslashes in the paths were causing problems with String.replaceAll, even though the backslashes appeared only in the replacement strings. The fix turned out to be replacing the backslashes used in the replacement paths with forward slashes, which is okay since Java file and path resolution works fine with both (even in the files generated for Eclipse).

However, to get there I had to add a bunch of debug statements to track what was going on. I did first replicate the problem on a borrowed Windows installation, and the debug statements helped me figure out what was going on. I was able to verify that this PR fixes the problem on Windows and that the behavior or Linux and OS X remains correct.

I was also able to verify that the Eclipse preference file that Strongback is updating didn't appear to be changed when the problem was manifesting itself. Therefore, affected users shouldn't need to clean anything up prior to installing the next version of Strongback (1.1.1) and re-running the functionality.

rhauch commented 8 years ago

Closes #54