Language language = project.getLanguageByStructureModel(languageStructure);
if (language == null) {
JOptionPane.showMessageDialog(null, "Couldn't find Language for structure model " + languageStructure.getUID());
return;
}
<BUG>SModel languageEditor = language.getEditorModel();
</BUG>
if (languageEditor != null) {
Iterator<SNode> iterator = languageEditor.roots();
while (iterator.hasNext()) {

Language language = project.getLanguageByStructureModel(languageStructure);
if (language == null) {
JOptionPane.showMessageDialog(null, "Couldn't find Language for structure model " + languageStructure.getUID());
return;
}
final SModel languageEditor = language.getEditorModel();
if (languageEditor != null) {
Iterator<SNode> iterator = languageEditor.roots();
while (iterator.hasNext()) {
