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:
Numbers are int unless they end with a decimal number, then they're a double
true/false are boolean
Everything else is String
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;
}
}
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:
int
unless they end with a decimal number, then they're adouble
true
/false
areboolean
String
Example
Would create:
without the comments, obviously.