mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
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>
This commit is contained in:
parent
c7895abec0
commit
db577a85ca
4 changed files with 5 additions and 10 deletions
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue