Skip to content

Commit

Permalink
improve object debug clarity with colors
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 23, 2019
1 parent 98f80c1 commit ad0da7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,13 @@ public static <T extends ObjectTag> String debugList(String prefix, Collection<T
}
StringBuilder sb = new StringBuilder();
for (ObjectTag obj : objects) {
String output = obj.debug();
sb.append(output.substring((obj.getPrefix() + "='<A>").length(), output.length() - 6)).append(", ");
sb.append(obj.debuggable()).append("<G>, ");
}
if (sb.length() == 0) {
return debugObj(prefix, sb);
}
else {
return debugObj(prefix, "[" + sb.substring(0, sb.length() - 2) + "]");
return debugObj(prefix, "[" + sb.substring(0, sb.length() - "<G>, ".length()) + "<Y>]");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public String getPrefix() {

@Override
public String debuggable() {
return "d@" + seconds + "s (" + formatted() + ")";
return "d@" + seconds + "s <GR>(" + formatted() + ")";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public ObjectTag setPrefix(String prefix) {

@Override
public String debuggable() {
return "s@" + name + " (" + getType() + ")";
return "s@" + name + "<GR> (" + getType() + ")";
}

@Override
Expand Down

0 comments on commit ad0da7e

Please sign in to comment.