{
if (custom) {
try {
unitStep = Double.parseDouble(arguments[0].toString());
} catch (NumberFormatException e) {
throw new CommandFailedException("Not a valid number");
}
}
EditableParameterModel[] params = getTargets();
int num = params.length;
if (num == 0)
throw new CommandFailedException("Need at least 2 targets");
int maxv = params[0].getParameterDescriptor().getMaxValue().intValue();
int minv = params[0].getParameterDescriptor().getMinValue().intValue();
int currv;
try {
currv = params[0].getValue().intValue();
double rng = maxv - minv;
if (rng == 0.0)
percentFact = 1.0;
else
percentFact = ((currv - minv) / rng);
} catch (ParameterUnavailableException e) {
throw new CommandFailedException("First Parameter not available");
}
currStep = 0;
ParameterModelUtilities.dispatchEditChainGroups(ParameterModelUtilities.extractEditableParameterModelChainGroups(params), new EditableParameterModel.EditChainValueProvider() {