Skip to content

Commit

Permalink
SwingMessageWidget: allow labeled messages
Browse files Browse the repository at this point in the history
Unlike other parameters, messages will only be labeled if a label was
actually specified. That is: a label will not be synthesized from the
parameter name when the label attribute is unset.
  • Loading branch information
ctrueden committed Aug 24, 2015
1 parent 9e1594d commit 84c30c0
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -60,7 +60,8 @@ public String getValue() {

@Override
public boolean isLabeled() {
return false;
final String l = get().getItem().getLabel();
return l == null || l.isEmpty();

This comment has been minimized.

Copy link
@imagejan

imagejan Aug 25, 2015

Member

This will return true when the label is empty or unset, won't it?

This comment has been minimized.

Copy link
@ctrueden

ctrueden Aug 25, 2015

Author Member

Yeah, good catch. Thanks Jan. I did test it, by creating two parameters: one with a label and one without. Then I verified that at runtime, one of them had a label and one didn't. But apparently I was tired and didn't notice it was the wrong way 'round. Doh!

Fixed in dec7922.

}

@Override
Expand Down

0 comments on commit 84c30c0

Please sign in to comment.