stream= new BufferedInputStream(url.openStream());
TemplateReaderWriter reader= new TemplateReaderWriter();
TemplatePersistenceData[] datas= reader.read(stream, bundle);
for (int i= 0; i < datas.length; i++) {
TemplatePersistenceData data= datas[i];
if (data.isCustom()) {
if (data.getId() == null)
EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_no_id, data.getTemplate().getName()));
else
EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_deleted, data.getTemplate().getName()));
} else if (!validateTemplate(data.getTemplate())) {
if (contextExists(data.getTemplate().getContextTypeId()))
EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_validation_failed, data.getTemplate().getName()));
} else {
templates.add(data);
}
}
} finally {