From 1b45b2cbe24479ff18a2b7eab02deac92654d007 Mon Sep 17 00:00:00 2001 From: Marco Miller Date: Wed, 25 May 2022 12:40:47 -0400 Subject: [PATCH] scripting: Remove TraceScriptingModule deprecation Long deprecated, since commit 2b732bba6. Slightly reformat, based on Eclipse, while being there. [Removed] o.e.t.i.s.core.trace.TraceScriptingModule#openTrace Change-Id: I686f755473e765ed662f794a3f0c66a2c20e30bb Signed-off-by: Marco Miller Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/193693 Tested-by: Trace Compass Bot Tested-by: Bernd Hufmann Reviewed-by: Bernd Hufmann --- .../core/trace/TraceScriptingModule.java | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/scripting/org.eclipse.tracecompass.incubator.scripting.core/src/org/eclipse/tracecompass/incubator/scripting/core/trace/TraceScriptingModule.java b/scripting/org.eclipse.tracecompass.incubator.scripting.core/src/org/eclipse/tracecompass/incubator/scripting/core/trace/TraceScriptingModule.java index edd249aa..728c12d4 100644 --- a/scripting/org.eclipse.tracecompass.incubator.scripting.core/src/org/eclipse/tracecompass/incubator/scripting/core/trace/TraceScriptingModule.java +++ b/scripting/org.eclipse.tracecompass.incubator.scripting.core/src/org/eclipse/tracecompass/incubator/scripting/core/trace/TraceScriptingModule.java @@ -47,31 +47,6 @@ */ public class TraceScriptingModule extends AbstractScriptModule { - /** - * Fully open a trace in the Trace Compass application, ie it will open as - * if the user had opened it in the UI, running all automatic analyses, etc. - * If the trace is successfully opened, it becomes the currently active - * trace. - * - * @param projectName - * The name of the project - * @param traceName - * the trace to open - * @param isExperiment - * is the trace an experiment - * @return The trace - * @deprecated This method was never supported, to open a trace in Trace - * Compass, use the openTrace method from the - * '/TraceCompass/TraceUI' module - */ - @Deprecated - @WrapToScript - public ITmfTrace openTrace(String projectName, String traceName, @ScriptParameter(defaultValue = "false") boolean isExperiment) { - // TODO may need to be implemented for Theia. - // Can not do anything without the UI - throw new UnsupportedOperationException("Load the /TraceCompass/TraceUI module instead"); //$NON-NLS-1$ - } - /** * The trace will be opened, its events can be queried, but the analyses * will not have been run on it, they will not be available. The trace @@ -117,7 +92,6 @@ public ITmfTrace openTrace(String projectName, String traceName, @ScriptParamete String traceFile = split[split.length - 1]; IFile file = subFolder.getFile(traceFile); - IPath location = file.getLocation(); if (location == null) { return null; @@ -134,7 +108,8 @@ public ITmfTrace openTrace(String projectName, String traceName, @ScriptParamete } } - private static ITmfTrace openAndInitializeTrace(IFile file, String location, String name, String typeID) throws TmfTraceException, InstantiationException, IllegalAccessException, FileNotFoundException, TmfTraceImportException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { + private static ITmfTrace openAndInitializeTrace(IFile file, String location, String name, String typeID) + throws TmfTraceException, InstantiationException, IllegalAccessException, FileNotFoundException, TmfTraceImportException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { List traceTypes = TmfTraceType.selectTraceType(location, typeID); if (traceTypes.isEmpty()) { throw new FileNotFoundException(Messages.noTraceType);