Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 212252
Collapse All | Expand All

(-)src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java (+6 lines)
Lines 68-73 Link Here
68
		log(multi);
68
		log(multi);
69
	}
69
	}
70
70
71
	public static void log(String message, Throwable e) {
72
		if (message == null)
73
				message= ""; //$NON-NLS-1$
74
		log(new Status(IStatus.ERROR, EditorsUI.PLUGIN_ID, IEditorsStatusConstants.INTERNAL_ERROR, message, e));
75
	}
76
71
	public static void log(Throwable e) {
77
	public static void log(Throwable e) {
72
		log(new Status(IStatus.ERROR, EditorsUI.PLUGIN_ID, IEditorsStatusConstants.INTERNAL_ERROR, TextEditorMessages.EditorsPlugin_internal_error, e));
78
		log(new Status(IStatus.ERROR, EditorsUI.PLUGIN_ID, IEditorsStatusConstants.INTERNAL_ERROR, TextEditorMessages.EditorsPlugin_internal_error, e));
73
	}
79
	}
(-)src/org/eclipse/ui/editors/text/templates/ContributionTemplateStore.java (-4 / +2 lines)
Lines 147-156 Link Here
147
								EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_no_id, data.getTemplate().getName()));
147
								EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_no_id, data.getTemplate().getName()));
148
							else
148
							else
149
								EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_deleted, data.getTemplate().getName()));
149
								EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_deleted, data.getTemplate().getName()));
150
						} else if (!validateTemplate(data.getTemplate())) {
150
						} else if (validateTemplate(data.getTemplate())) {
151
							if (contextExists(data.getTemplate().getContextTypeId()))
152
								EditorsPlugin.logErrorMessage(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_validation_failed, data.getTemplate().getName()));
153
						} else {
154
							templates.add(data);
151
							templates.add(data);
155
						}
152
						}
156
					}
153
					}
Lines 190-195 Link Here
190
			try {
187
			try {
191
				getRegistry().getContextType(contextTypeId).validate(template.getPattern());
188
				getRegistry().getContextType(contextTypeId).validate(template.getPattern());
192
			} catch (TemplateException e) {
189
			} catch (TemplateException e) {
190
				EditorsPlugin.log(NLSUtility.format(ContributionTemplateMessages.ContributionTemplateStore_ignore_validation_failed, template.getName()), e);
193
				return false;
191
				return false;
194
			}
192
			}
195
		}
193
		}

Return to bug 212252