TemplateBuilder templateBuilder = TemplateBuilderFactory.getInstance().createTemplateBuilder(spec);
Collection<ErlangTopType> types = PsiTreeUtil.findChildrenOfType(spec, ErlangTopType.class);
for (ErlangTopType type : types) {
templateBuilder.replaceElement(type, type.getText());
}
templateBuilder.run(editor, false);
}
});
}
}, "Generate spec template editor", null);
}