Properly format --help output.

refs #35
This commit is contained in:
Fabian Becker 2014-11-16 00:51:00 +01:00
parent 35bd5c4a9e
commit e5c8322d78
2 changed files with 2 additions and 8 deletions

View File

@ -67,10 +67,11 @@ public class Main {
System.out.println("Options:");
for (Parameter key : parameters) {
System.out.printf("\t--%s\t%s\n", key.getName(), key.getType().toString());
System.out.printf("\t\033[1m--%s\033[0m \033[4m%s\033[0m\n", key.getName(), key.getType().getName());
System.out.printf("\t\t%s\n", key.getDescription());
}
}
System.out.print("\n\n");
}
private static void executeArguments(String[] args) {

View File

@ -9,12 +9,8 @@ import java.util.*;
* An array of Strings that can be selected and deselected. May be created directly from an Enum.
* An analogous set of descriptive strings may be added for each field, for example to produce
* tool tips in a GUI.
*
* @author mkron
*/
public class StringSelection implements Serializable {
private static final long serialVersionUID = -1512329288445831907L;
private String[] strObjects;
private String[] toolTips;
boolean[] selStates;
@ -158,9 +154,6 @@ public class StringSelection implements Serializable {
* @return
*/
public boolean isSelected(Enum<?> e) {
// if (isSelected(e.ordinal())) {
// return e.toString().equals(strObjects[e.ordinal()]);
// } else return false;
if (enumClass != null) {
if (e.getClass().equals(enumClass)) {
return isSelected(e.ordinal());