Resource resource = (Resource)(parameters.isLeftAssociation() ? found : parameters.getThisObject());
Rate rate = null;
if (matcher.group(2) != null) { // if text was empty use default
if (!getParameters().isAllowDetailsEntry())
throw new ParseException(Messages.getString("Message.cannotEnterUnits"),0);
RateFormat format = resource.getRateFormat();
rate = (Rate) format.parseObject(matcher.group(2));
percent = rate.getValue();
// Number percentNumber;
// if (resource.isLabor())
// percentNumber = percentFormat.parse(matcher.group(2)+ Settings.PERCENT); // force a percent sign at the end for labor. If there are two, it is ignored
// else //TODO allow parsing values like 3/d for material resources