Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlexander Fedorov2020-06-14 17:23:12 +0000
committerAlexander Fedorov2020-06-15 18:21:21 +0000
commit8b039257b7066dd89155397ea4de83676d2461a9 (patch)
tree1b655eb8e98962141153a853b7c211dcb40bb549 /core
parenta5dce82d5402b9fbbc152b932b5be6e9ce5df3bf (diff)
downloadorg.eclipse.cdt-8b039257b7066dd89155397ea4de83676d2461a9.tar.gz
org.eclipse.cdt-8b039257b7066dd89155397ea4de83676d2461a9.tar.xz
org.eclipse.cdt-8b039257b7066dd89155397ea4de83676d2461a9.zip
Bug 564276 - Extract CDT Core templateengine to a separate bundle
Hide the value of extension point identifier "org.eclipse.cdt.core.templateProcessTypes" with dedicated type. After moving to another bundle we will preserve the identifier value for compatibility. Change-Id: I8dbca52f1223e8751ebb5ac7844845c30a1f0266 Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java9
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/internal/core/templateengine/TemplateProcessTypes.java24
2 files changed, 28 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java
index d9f51a3b5c1..6120c6c0e2e 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 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
@@ -10,6 +10,7 @@
*
* Contributors:
* Bala Torati (Symbian) - Initial API and implementation
+ * Alexander Fedorov (ArSysOp) - Bug 564276
*******************************************************************************/
package org.eclipse.cdt.core.templateengine.process;
@@ -18,19 +19,17 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.templateengine.TemplateEngineUtil;
+import org.eclipse.cdt.internal.core.templateengine.TemplateProcessTypes;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
/**
* Factory class for creating the Process Runners.
*/
public class ProcessRunnerFactory {
- private static final String EXTENSION_POINT_PROCESSES = CCorePlugin.PLUGIN_ID + ".templateProcessTypes"; //$NON-NLS-1$
private static final String ELEM_NAME = "name"; //$NON-NLS-1$
private static final String ELEM_PROCESS_RUNNER = "processRunner"; //$NON-NLS-1$
private static ProcessRunnerFactory instance;
@@ -51,7 +50,7 @@ public class ProcessRunnerFactory {
*/
private synchronized void initializeProcessRunners() {
processRunnerMap = new HashMap<>();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_PROCESSES);
+ IExtensionPoint point = new TemplateProcessTypes().getExtensionPoint();
IExtension[] extensions = point.getExtensions();
for (int i = 0; i < extensions.length; i++) {
IExtension extension = extensions[i];
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/internal/core/templateengine/TemplateProcessTypes.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/internal/core/templateengine/TemplateProcessTypes.java
new file mode 100644
index 00000000000..349de48fd1f
--- /dev/null
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/internal/core/templateengine/TemplateProcessTypes.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2020 ArSysOp and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.templateengine;
+
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+
+public final class TemplateProcessTypes {
+
+ private final String id = "org.eclipse.cdt.core.templateProcessTypes"; //$NON-NLS-1$
+
+ public IExtensionPoint getExtensionPoint() {
+ return Platform.getExtensionRegistry().getExtensionPoint(id);
+ }
+
+}

Back to the top