Skip to content

Commit

Permalink
scripting: Remove TraceScriptingModule deprecation
Browse files Browse the repository at this point in the history
Long deprecated, since commit 2b732bb.

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 <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/193693
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
marco-miller committed May 27, 2022
1 parent 1fdee09 commit 1b45b2c
Showing 1 changed file with 2 additions and 27 deletions.
Expand Up @@ -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 <code>openTrace</code> method from the
* <code>'/TraceCompass/TraceUI'</code> 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
Expand Down Expand Up @@ -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;
Expand All @@ -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<TraceTypeHelper> traceTypes = TmfTraceType.selectTraceType(location, typeID);
if (traceTypes.isEmpty()) {
throw new FileNotFoundException(Messages.noTraceType);
Expand Down

0 comments on commit 1b45b2c

Please sign in to comment.