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-4353 Preserve the user given 'linkedId' with ArgValue, to help with deciding...
[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
8e4fe2c
..
55e1211
100644
(file)
--- a/
src/jalview/bin/argparser/ArgValues.java
+++ b/
src/jalview/bin/argparser/ArgValues.java
@@
-44,6
+44,8
@@
public class ArgValues
private boolean setByWildcard = false;
private boolean setByWildcard = false;
+ private String givenLinkedId = null;
+
private int boolIndex = -1;
private List<Integer> argsIndexes;
private int boolIndex = -1;
private List<Integer> argsIndexes;
@@
-52,16
+54,19
@@
public class ArgValues
private Map<String, ArgValue> idMap = new HashMap<>();
private Map<String, ArgValue> idMap = new HashMap<>();
+ private ArgValuesMap avm;
+
/*
* Type type is only really used by --help-type
*/
private Type type = null;
/*
* Type type is only really used by --help-type
*/
private Type type = null;
- protected ArgValues(Arg a)
+ protected ArgValues(Arg a, ArgValuesMap avm)
{
this.arg = a;
this.argValueList = new ArrayList<ArgValue>();
this.boolValue = arg.getDefaultBoolValue();
{
this.arg = a;
this.argValueList = new ArrayList<ArgValue>();
this.boolValue = arg.getDefaultBoolValue();
+ this.avm = avm;
}
protected boolean setByWildcard()
}
protected boolean setByWildcard()
@@
-114,7
+119,7
@@
public class ArgValues
}
protected void setBoolean(Type t, boolean b, int i,
}
protected void setBoolean(Type t, boolean b, int i,
- boolean beingSetByWildcard)
+ boolean beingSetByWildcard, String givenLinkedId)
{
this.setType(t);
// don't overwrite a wildcard set boolean with a non-wildcard set boolean
{
this.setType(t);
// don't overwrite a wildcard set boolean with a non-wildcard set boolean
@@
-123,6
+128,7
@@
public class ArgValues
this.boolValue = b;
this.boolIndex = i;
this.setSetByWildcard(beingSetByWildcard);
this.boolValue = b;
this.boolIndex = i;
this.setSetByWildcard(beingSetByWildcard);
+ this.givenLinkedId = givenLinkedId;
}
protected boolean getBoolean()
}
protected boolean getBoolean()
@@
-157,15
+163,17
@@
public class ArgValues
}
protected void addValue(Type type, String val, int argIndex,
}
protected void addValue(Type type, String val, int argIndex,
- boolean wildcard)
+ boolean wildcard, String givenLinkedId)
{
{
- addArgValue(new ArgValue(arg(), type, val, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), type, val, argIndex, wildcard,
+ givenLinkedId, avm.getLinkedId()), wildcard);
}
protected void addValue(SubVals sv, Type type, String content,
}
protected void addValue(SubVals sv, Type type, String content,
- int argIndex, boolean wildcard)
+ int argIndex, boolean wildcard, String givenLinkedId)
{
{
- addArgValue(new ArgValue(arg(), sv, type, content, argIndex), wildcard);
+ addArgValue(new ArgValue(arg(), sv, type, content, argIndex, wildcard,
+ givenLinkedId, avm.getLinkedId()), wildcard);
}
protected void addArgValue(ArgValue av, boolean beingSetByWildcard)
}
protected void addArgValue(ArgValue av, boolean beingSetByWildcard)
@@
-238,4
+246,11
@@
public class ArgValues
}
return false;
}
}
return false;
}
+
+ public boolean setByWildcardLinkedId()
+ {
+ // looking for deliberately user set wildcard
+ return this.setByWildcard && this.givenLinkedId != null;
+ }
+
}
\ No newline at end of file
}
\ No newline at end of file