When Translator is started stand-alone (i.e., via translator.sh or translator.bat, respectively, as far as available, or as java -cp "Structorizer.app/Contents/Java/Structorizer.jar" lu.fisch.structorizer.locales.Translator) then the "Preview" button in the following dialog won't work:
Instead, a "silent" NullPointerException stacktrace runs into the error stream:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at lu.fisch.structorizer.gui.ElementNames.getElementName(ElementNames.java:207)
at lu.fisch.structorizer.gui.ElementNames.getElementName(ElementNames.java:243)
at lu.fisch.structorizer.gui.ElementNames.resolveElementNames(ElementNames.java:325)
at lu.fisch.structorizer.locales.TranslatorRowEditor.itemStateChanged(TranslatorRowEditor.java:600)
at java.desktop/javax.swing.AbstractButton.fireItemStateChanged(AbstractButton.java:1995)
at java.desktop/javax.swing.AbstractButton$Handler.itemStateChanged(AbstractButton.java:2315)
at java.desktop/javax.swing.DefaultButtonModel.fireItemStateChanged(DefaultButtonModel.java:458)
at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:364)
at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:382)
[...]
This is caused by:
a withheld argument value in the getElementName() delegation hierarchy and
missing precautions against null elements in a configuration array.
When started from Structorizer menu, however, this is unlikely to happen.
When Translator is started stand-alone (i.e., via translator.sh or translator.bat, respectively, as far as available, or as
java -cp "Structorizer.app/Contents/Java/Structorizer.jar" lu.fisch.structorizer.locales.Translator
) then the "Preview" button in the following dialog won't work: Instead, a "silent" NullPointerException stacktrace runs into the error stream:This is caused by:
getElementName()
delegation hierarchy andnull
elements in a configuration array.When started from Structorizer menu, however, this is unlikely to happen.