Problems with JBLabel.setText(text) after updating to 2019.2

When i'm creating JBLabel by constructor

new JBLabel (text) 

 all works fine. But when i am changing text in label by

JBLabel.setText (text) 

it stops to work. Lable just didnt shown . Problems begins after updating idea to 2019.2. When i am trying to build plugin on 2019.1 - all work fine.

3 comments
Comment actions Permalink

From where do you update setText()? Is it called in EDT?

0
Comment actions Permalink

Yes, it is EDT thread. 

may be this code will help 

private JBLabel createLink(String linkText, String linkHref) {
JBLabel label = new JBLabel();
label.setCopyable(true);
updateLink(label, linkText, linkHref);
return label;
}

private void updateLink(JBLabel linkLabel, String linkText, String linkHref) {
linkLabel.setText(String.format("<html><a href=\"%s\">%s</a></html>", linkHref, linkText));
}
0
Avatar
Vassiliy Kudryashov
Comment actions Permalink

Cannot find a bug, specified code snippet works for me. Please check if linkText and linkHref don't contain tags or any special symbols,

0

Please sign in to leave a comment.