git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-629 Fix missing icon for command line launch
[jalview.git]
/
src
/
jalview
/
bin
/
argparser
/
ArgValues.java
diff --git
a/src/jalview/bin/argparser/ArgValues.java
b/src/jalview/bin/argparser/ArgValues.java
index
f2c299c
..
f25fc9a
100644
(file)
--- a/
src/jalview/bin/argparser/ArgValues.java
+++ b/
src/jalview/bin/argparser/ArgValues.java
@@
-8,6
+8,7
@@
import java.util.stream.Collectors;
import jalview.bin.Console;
import jalview.bin.argparser.Arg.Opt;
import jalview.bin.Console;
import jalview.bin.argparser.Arg.Opt;
+import jalview.bin.argparser.Arg.Type;
public class ArgValues
{
public class ArgValues
{
@@
-31,6
+32,11
@@
public class ArgValues
private Map<String, ArgValue> idMap = new HashMap<>();
private Map<String, ArgValue> idMap = new HashMap<>();
+ /*
+ * Type type is only really used by --help-type
+ */
+ private Type type = null;
+
protected ArgValues(Arg a)
{
this.arg = a;
protected ArgValues(Arg a)
{
this.arg = a;
@@
-53,6
+59,17
@@
public class ArgValues
return arg;
}
return arg;
}
+ protected void setType(Type t)
+ {
+ if (this.arg().hasOption(Opt.HASTYPE))
+ this.type = t;
+ }
+
+ public Type getType()
+ {
+ return type;
+ }
+
protected int getCount()
{
return argCount;
protected int getCount()
{
return argCount;
@@
-76,8
+93,10
@@
public class ArgValues
return this.negated;
}
return this.negated;
}
- protected void setBoolean(boolean b, int i, boolean beingSetByWildcard)
+ protected void setBoolean(Type t, boolean b, int i,
+ boolean beingSetByWildcard)
{
{
+ this.setType(t);
// don't overwrite a wildcard set boolean with a non-wildcard set boolean
if (boolIndex >= 0 && !this.setByWildcard && beingSetByWildcard)
return;
// don't overwrite a wildcard set boolean with a non-wildcard set boolean
if (boolIndex >= 0 && !this.setByWildcard && beingSetByWildcard)
return;
@@
-117,15
+136,16
@@
public class ArgValues
return sb.toString();
}
return sb.toString();
}
- protected void addValue(String val, int argIndex, boolean wildcard)
+ protected void addValue(Type type, String val, int argIndex,
+ boolean wildcard)
{
{
- addArgValue(new ArgValue(arg(), val, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), type, val, argIndex), wildcard);
}
}
- protected void addValue(SubVals sv, String content, int argIndex,
- boolean wildcard)
+ protected void addValue(SubVals sv, Type type, String content,
+ int argIndex, boolean wildcard)
{
{
- addArgValue(new ArgValue(arg(), sv, content, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), sv, type, content, argIndex), wildcard);
}
protected void addArgValue(ArgValue av, boolean beingSetByWildcard)
}
protected void addArgValue(ArgValue av, boolean beingSetByWildcard)