}
oldCode = e;
try {
// build panel
FormBuilder f = new FormBuilder("event.code.list." + e.getCommand().getIcon());
f.addHeader("basic", new FormHeader(I18N.t("Basic"), e.getCommand().getIcon()));
// build it
getSelectedObject().buildPanel(f);
// add modifikation
f.addChangeListener(new FormElementChangeListener() {
@Override
public void stateChanged(FormElement form) {
e.setModified(true);
e.setTitleCache(null);
}
});
if (getSelectedObject().getCommand().isBeta() || YLevel.IS_DEVELOPER) {
f.addHeader("warn", new FormHeader(I18N.t("Hinweis für die Benutzung"), "info").setSorting(8));
if (getSelectedObject().getCommand().isBeta()) {
f.addElement(
"warn.info",
new FormInfo("", I18N.t("Die Unterstützung von {0} ist noch experimentell. Es kann zu Problemen kommen.", e.getCommand().getName())));
}
if (YLevel.IS_DEVELOPER) {
f.addElement("warn.code", RubyForm.getError(I18N.t("Code"), "@code", e.getObject()));
f.addElement("warn.id", new FormInfo(I18N.t("ID"), e.getId()));
f.addElement("warn.para", RubyForm.getError(I18N.t("Parameter"), "@parameters", e.getObject()));
f.addElement("warn.indent", RubyForm.getError(I18N.t("Indent"), "@indent", e.getObject()));
}
}
// display right the infos
gui.setRight(f.getPanel(true));
} catch (Throwable t) {
YEx.info("Can not create Panel", t);
}
}