logandhillon / FRC-Development-Tools

Tools to aid development with FIRST Robotics programming
GNU General Public License v3.0
1 stars 0 forks source link

`newConstant` command #8

Open logandhillon opened 11 months ago

logandhillon commented 11 months ago

Create a constant variable from anywhere in the project

args

All are required

Path

The subclass the constant will be placed in. Default to current class name. (string)

Name

The name of the constant. (string)

Value

Value of constant. Automatically figures out variable type as such:

Example

path=null, name=speed, value=10.75

Would create:

public class Constants { // if it doesn't already exist, otherwise add to it
    public static class Drivetrain { // the command was called while the user was in Drivetrain.java
        public static double /* automatically figured out it is a double */ speed = 10.75;
    }
}

without the comments, obviously.