View Single Post
  #4   Spotlight this post!  
Unread 20-11-2016, 01:32
phurley67 phurley67 is offline
Programming Mentor
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 63
phurley67 is an unknown quantity at this point
Re: RobotBuilder Extensions

Okay found my problem (my silly mistake of course) -- I had a typo in the Java Export.yaml and the section name did not match my Command name.

I was able to generate my command, and add parameters, but the ClassName in the YAML is ignored. If I go into the the RobotBuilder source code and make the following changes:

Code:
+#macro( klass $cmd )#if( "#type($cmd)" == "" )Command#else#type($cmd)#end#end
 import edu.wpi.first.wpilibj.command.Command;
 import ${package}.Robot;
 
 /**
  *
  */
-public class #class($command.name) extends Command {
+public class #class($command.name) extends #klass($command) {
It seems to work (sorry if my velocity templating is goofy, I just sort of hacked at it till I got it to work). What I really would like to do is provide my own velocity templates for my own components -- any chance of making this a possibility? (or is it and I totally missed it :-)
Reply With Quote