Skip to content
This repository was archived by the owner on Jul 22, 2018. It is now read-only.

Commit

Permalink
Fix substitution in Command File Templates (#170)
Browse files Browse the repository at this point in the history
Fixes #169
  • Loading branch information
sciencewhiz authored and bradamiller committed Dec 28, 2017
1 parent fe5ec60 commit f6ef9c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public void run(IProgressMonitor monitor) throws InvocationTargetException {
*/
private void doFinish(IProject project, String className, String folderName, IProgressMonitor monitor) throws CoreException {
Map<String, String> map = new HashMap<String, String>();
map.put("$classname", className);
map.put("$folder", folderName);
map.put("\\$classname", className);
map.put("\\$folder", folderName);
String filepath = folderName+File.separator+className;
try {
// Create Header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public void run(IProgressMonitor monitor) throws InvocationTargetException {
*/
private void doFinish(IProject project, String className, String packageName, IProgressMonitor monitor) throws CoreException {
Map<String, String> map = new HashMap<String, String>();
map.put("$classname", className);
map.put("$package", packageName);
map.put("\\$classname", className);
map.put("\\$package", packageName);
String filepath = "src/"+packageName.replace(".", "/")+"/"+className+".java";
try {
URL url = new URL(WPILibJavaPlugin.getDefault().getBundle().getEntry("/resources/templates/"), source);
Expand Down

0 comments on commit f6ef9c5

Please sign in to comment.