adds the names of the components to the generic help dialog

This commit is contained in:
hneemann 2021-01-07 19:06:07 +01:00
parent cf323d03ad
commit eb71b37077

View File

@ -226,9 +226,12 @@ public class ElementHelpDialog extends JDialog {
if (translatedName.endsWith(".dig")) if (translatedName.endsWith(".dig"))
translatedName = new File(translatedName).getName(); translatedName = new File(translatedName).getName();
w.append("<h3>").append(escapeHTML(translatedName)).append("</h3>\n"); w.append("<h3>").append(escapeHTML(translatedName)).append("</h3>\n");
String descr = et.getDescription(elementAttributes); String descr = et.getDescription(elementAttributes);
if (showKeys)
descr += " (" + Lang.get("msg_keyAsGenericAttribute", et.getName()) + ")";
if (!descr.equals(translatedName)) if (!descr.equals(translatedName))
w.append("<p>").append(escapeHTML(et.getDescription(elementAttributes))).append("</p>\n"); w.append("<p>").append(escapeHTML(descr)).append("</p>\n");
PinDescriptions inputs = et.getInputDescription(elementAttributes); PinDescriptions inputs = et.getInputDescription(elementAttributes);
if (inputs != null && inputs.size() > 0) { if (inputs != null && inputs.size() > 0) {