fix shortcuts

This commit is contained in:
Branislav Stojkovic
2019-02-09 10:02:32 +01:00
parent 0acca63ccd
commit 19bdf41655
@@ -659,7 +659,7 @@ public class TreePanel extends JPanel {
}
}
setText("<html>" + payload.toString() + shortCutHtml + variantsHtml + "</html>");
setText("<html>" + payload.forDisplay() + shortCutHtml + variantsHtml + "</html>");
}
return this;
@@ -704,7 +704,8 @@ public class TreePanel extends JPanel {
return clickListener;
}
private String categoryForDisplay() {
public String forDisplay() {
if (componentType == null) {
String display = category;
Matcher match = contributedPattern.matcher(display);
if (match.find()) {
@@ -714,10 +715,12 @@ public class TreePanel extends JPanel {
}
return display;
}
return componentType.getName();
}
@Override
public String toString() {
return componentType == null ? categoryForDisplay() : componentType.getName();
return componentType == null ? category : componentType.getName();
}
}