From 72bf8216d81973ff39eba647a07cdca730d1054f Mon Sep 17 00:00:00 2001 From: Alexander Fedorov Date: Sun, 14 Jun 2020 20:17:03 +0300 Subject: [PATCH] Bug 564276 - Extract CDT Core templateengine to a separate bundle Remove dependency to org.eclipse.cdt.core.CCorePlugin during template schema URL resolution. The TemplateDescriptorSchema.xsd URI should be in one bundle with TemplateEngine. Change-Id: Ice2fbc4f33da6616184728d3a41cc803328526a6 Signed-off-by: Alexander Fedorov --- .../org/eclipse/cdt/core/templateengine/TemplateEngine.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java index 90b3c7de34c..6fe7c34449f 100644 --- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java +++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2012 Symbian Software Limited and others. + * Copyright (c) 2007, 2020 Symbian Software Limited and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -11,6 +11,7 @@ * Contributors: * Bala Torati (Symbian) - Initial API and implementation * Mark Espiritu (VaST Systems) - bug 215960 + * Alexander Fedorov (ArSysOp) - Bug 564276 *******************************************************************************/ package org.eclipse.cdt.core.templateengine; @@ -31,6 +32,7 @@ import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.Platform; +import org.osgi.framework.FrameworkUtil; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -377,7 +379,7 @@ public class TemplateEngine { */ public URL getTemplateSchemaURL() throws IOException { return FileLocator - .toFileURL(Platform.getBundle(CCorePlugin.PLUGIN_ID).getEntry("schema/TemplateDescriptorSchema.xsd")); //$NON-NLS-1$ + .toFileURL(FrameworkUtil.getBundle(getClass()).getEntry("schema/TemplateDescriptorSchema.xsd")); //$NON-NLS-1$ } /**