Index: lutinutil/src/java/org/codelutin/option/OptionParserContexts.java diff -u lutinutil/src/java/org/codelutin/option/OptionParserContexts.java:1.3 lutinutil/src/java/org/codelutin/option/OptionParserContexts.java:1.4 --- lutinutil/src/java/org/codelutin/option/OptionParserContexts.java:1.3 Tue Jan 1 20:50:35 2008 +++ lutinutil/src/java/org/codelutin/option/OptionParserContexts.java Thu Jan 3 06:07:56 2008 @@ -368,7 +368,7 @@ lastArgument = null; lastGroup = null; // the group is no more available - availabledGroups.remove(context.groupDefinition); + availabledGroups.remove(def); return; } // remove group from available if @@ -447,6 +447,8 @@ result = detectArgument(group, argument, pos); if (result != null) { break; + } else { + optionalGroups.remove(0); } } return result; @@ -551,6 +553,14 @@ // we didn't find a _newFile, it could be also a string result = findArgumentByTypeAndValueType(type, ArgumentValueType.STRING, defs); } + if (result == null && valueType == ArgumentValueType.CLASS) { + // we didn't find a _newFile, it could be also a string + result = findArgumentByTypeAndValueType(type, ArgumentValueType.STRING, defs); + } + if (result == null && valueType == ArgumentValueType.BOOLEAN) { + // we didn't find a _newFile, it could be also a string + result = findArgumentByTypeAndValueType(type, ArgumentValueType.STRING, defs); + } log.info(argument + " : " + result); return result; } @@ -587,9 +597,9 @@ this.definition = definition; this.commandLinePosition = commandLinePosition; this.value = value; - this.pos = pos; + this.pos = groupDefinition.isMandatory()?pos:-1; this.groupDefinition = groupDefinition; - log.info(this); + log.debug(this); } public Argument instanciate() {