X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2Fmatcher%2FKeyedMatcher.java;h=f21756aeade63c97301487a9023a81f3efb0dcfd;hb=07108e505ff923f3b5135ffbdbb79259fe53432e;hp=ef1c702076c85ec5f5abba4012fd30423d555768;hpb=f8b17a9e7363b8a9e7cd12d61bc6d611c7c97d7d;p=jalview.git diff --git a/src/jalview/util/matcher/KeyedMatcher.java b/src/jalview/util/matcher/KeyedMatcher.java index ef1c702..f21756a 100644 --- a/src/jalview/util/matcher/KeyedMatcher.java +++ b/src/jalview/util/matcher/KeyedMatcher.java @@ -73,22 +73,24 @@ public class KeyedMatcher implements KeyedMatcherI } /** - * Answers a string description of this matcher, suitable for debugging or - * logging. The format may change in future. + * Answers a string description of this matcher, suitable for display, debugging + * or logging. The format may change in future. */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(String.join(COLON, key)).append(" ") - .append(matcher.getCondition().toString()).append(" "); - if (matcher.getCondition().isNumeric()) + .append(matcher.getCondition().toString()); + Condition condition = matcher.getCondition(); + if (condition.isNumeric()) { - sb.append(matcher.getPattern()); + sb.append(" ").append(matcher.getPattern()); } - else + else if (condition != Condition.Present + && condition != Condition.NotPresent) { - sb.append("'").append(matcher.getPattern()).append("'"); + sb.append(" '").append(matcher.getPattern()).append("'"); } return sb.toString();