Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlexander Fedorov2020-06-14 11:45:15 +0000
committerAlexander Fedorov2020-06-14 16:47:51 +0000
commitdb577a85ca6da8f3206770e4f22cf08057ea7de4 (patch)
treea6a913976af9bd879ad0dde4ff5658e5a8784ed4 /core
parentc7895abec001cff37eed3591b3b13d61a5da5fb4 (diff)
downloadorg.eclipse.cdt-db577a85ca6da8f3206770e4f22cf08057ea7de4.tar.gz
org.eclipse.cdt-db577a85ca6da8f3206770e4f22cf08057ea7de4.tar.xz
org.eclipse.cdt-db577a85ca6da8f3206770e4f22cf08057ea7de4.zip
Bug 564276 - Extract CDT Core templateengine to a separate bundle
Remove dependency to org.eclipse.cdt.core.CCorePlugin during IStatus creation. Change-Id: Ic9cf5e55866ab6f0727ea91378b7366c6090b7f1 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/TemplateCore.java4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineUtil.java5
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java3
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java3
4 files changed, 5 insertions, 10 deletions
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java
index ba26faba483..002853bda88 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateCore.java
@@ -23,7 +23,6 @@ import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
import org.eclipse.cdt.core.templateengine.process.TemplateProcessHandler;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -219,8 +218,7 @@ public class TemplateCore {
result[0] = getProcessHandler().processAll(monitor);
} catch (ProcessFailureException e) {
TemplateEngineUtil.log(e);
- result[0] = new IStatus[] {
- new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.ERROR, e.getMessage(), e) };
+ result[0] = new IStatus[] { new Status(IStatus.ERROR, getClass(), IStatus.ERROR, e.getMessage(), e) };
}
return result[0];
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineUtil.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineUtil.java
index 171d018bcc9..a886beaddd5 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineUtil.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineUtil.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
@@ -16,7 +16,6 @@ package org.eclipse.cdt.core.templateengine;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
-import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -45,7 +44,7 @@ public class TemplateEngineUtil {
t = t.getCause();
} while (t != null && t instanceof ProcessFailureException);
} else {
- ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.OK,
+ ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, TemplateEngineUtil.class, IStatus.OK,
t.getMessage() == null ? t.toString() : t.getMessage(), t));
}
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
index 6a529f307df..d064330a15c 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.templateengine.TemplateCore;
import org.eclipse.cdt.core.templateengine.TemplateDescriptor;
import org.eclipse.cdt.core.templateengine.TemplateEngine;
@@ -216,7 +215,7 @@ public class ConditionalProcessGroup {
}
if (!isConditionValueTrue()) {
List<IStatus> statuses = new ArrayList<>(1);
- statuses.add(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.INFO,
+ statuses.add(new Status(IStatus.ERROR, getClass(), IStatus.INFO,
Messages.getString("ConditionalProcessGroup.notExecuting") + id, null)); //$NON-NLS-1$
return statuses;
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
index b1b30eb832b..72dd9d8c458 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
@@ -19,7 +19,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.templateengine.TemplateCore;
import org.eclipse.cdt.core.templateengine.TemplateEngine;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -165,7 +164,7 @@ public class Process {
}
resolve();
processRunner.process(template, args, id, monitor);
- return new Status(IStatus.INFO, CCorePlugin.PLUGIN_ID, IStatus.OK,
+ return new Status(IStatus.INFO, getClass(), IStatus.OK,
getProcessMessage(IStatus.OK, Messages.getString("Process.executedSuccessfully") + Arrays.asList(args)), //$NON-NLS-1$
null);
}

Back to the top