protected TemplateData(EObject model) { template = EcoreUtil2.getContainerOfType(model, Codetemplate.class); if (template != null) { templates = EcoreUtil2.getContainerOfType(template, Codetemplates.class); language = templates.getLanguage(); rule = template.getContext(); } }
if (templates != null && template != null) { Grammar language = templates.getLanguage(); AbstractRule rule = template.getContext(); ContextTypeIdHelper helper = languageRegistry.getContextTypeIdHelper(language); if (helper != null && rule != null && !rule.eIsProxy() && rule instanceof ParserRule) {
String id = null; TemplateContextType contextType = null; if (template.getContext() != null) { id = helper.getId(template.getContext()); if (id != null) contextType = contextTypeRegistry.getContextType(id);