Revision 2870 org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/DefaultEditingServiceParameterOptions.java
DefaultEditingServiceParameterOptions.java | ||
---|---|---|
68 | 68 |
return option.getValue(); |
69 | 69 |
} |
70 | 70 |
} |
71 |
for (ParameterOption option : this.options) { |
|
72 |
if(StringUtils.startsWithIgnoreCase(option.getConsoleValue(), s)){ |
|
73 |
return option.getValue(); |
|
71 |
if(StringUtils.isNotBlank(s)){ |
|
72 |
for (ParameterOption option : this.options) { |
|
73 |
if(StringUtils.startsWithIgnoreCase(option.getConsoleValue(), s)){ |
|
74 |
return option.getValue(); |
|
75 |
} |
|
74 | 76 |
} |
75 | 77 |
} |
76 | 78 |
if(isValidValue(defaultValue)){ |
... | ... | |
107 | 109 |
} |
108 | 110 |
return null; |
109 | 111 |
} |
112 |
|
|
113 |
@Override |
|
114 |
public String getConsoleValue(Object value) { |
|
115 |
for (ParameterOption option : this.options) { |
|
116 |
if(ObjectUtils.equals(option.getValue(), value)) { |
|
117 |
return option.getConsoleValue(); |
|
118 |
} |
|
119 |
} |
|
120 |
return ""; |
|
121 |
} |
|
110 | 122 |
|
111 | 123 |
|
112 | 124 |
public static class DefaultParameterOption<T> implements ParameterOption, Comparable{ |
Also available in: Unified diff