Is RobotBuilder Broken [JAVA issues]

While readying myself with the new features of Robotbuilder to teach the programming students I have ran into some new issues.

  1. I added a Constant to my Subsystem. I forgot to give it a value [errors in eclipse Mars]. When I corrected the error in Robot builder and regenerated code the values did not appear. I tried to add a new Constant and regenerate Java code it did not appear. I created a new command and it DID appear so I know the Preferences>General>Workspace>Refresh using native hooks or polling is correct.

A. Seems Robot builder is not rebuilding the Constants code on code Regenerate.
B. Robot builder should test these fields to assure they are populated before Code generation. Like it dose for IO port conflicts.

  1. I was testing a hobby servo. I named my subsystem “Servo” = !BAD and the actuator “Servo” too. It understandably error because Eclipse did didn’t know what Servo class to use edu.wpi.first.wpilibj.Servo or my Prodject Servo class.

C. Robot builder should test user names (Commands, Subsystems, IO devices) to assure they don’t match edu.wpi.first.wpilibj classes and other common Java classes.

Add button to smart dashboard not working as well. I have to manually add the code

  1. This will be fixed in the next update

  2. The assumption here is that programmers should know that certain names will already be used by parts of WPILib or the Java standard libraries. This may get added in the future, but it’s fairly low priority.

Do you have parameter presets? If a command takes parameters, a button will be generated for each preset. If it doesn’t, that’s a bug

No I did not have presets. This maybe why the buttons did not generate.

I have been testing the update and the issues I have expressed are fixed. Found a new one.

When adding a parameter to a command the private double m_? does not generate if the command already has been created.
ie.
1 create “my Command” with parameter a,b and presets 0,1
2 The myCommand is created with private double m_a; and m_b;.

public class myCommand extends Command {

    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS
    private double m_a;
    private double m_b;
 
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS

    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
    public myCommand(double a, double b) {

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
        m_a = a;
        m_b = b;

        // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
    }

3 The IO class created a new smartdashboard item adding the button with presets 0,1

SmartDashboard.putData("my Command: pre", new myCommand(0,1));

4 add a parameter to myCommand in robot builder [c] and a value to the presets for it [2]
5 The myCommand in eclipse does not add the private double m_c;
Still=

public class myCommand extends Command {

    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS
    private double m_a;
    private double m_b;
 
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_DECLARATIONS

    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
    public myCommand(double a, double b) {

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
        m_a = a;
        m_b = b;

        // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES
    }

6 the IO class DOES have the preset added to the smartdashboard entery [0,1,2] but is errored because myCommand only has 2 parameters.

SmartDashboard.putData("my Command: pre", new myCommand(0,1,2));