1 /*******************************************************************************
2 * Copyright (c) 2013, 2015 Ericsson, EfficiOS Inc. and others
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.ctf
.core
.tests
.shared
;
12 import java
.io
.IOException
;
14 import org
.eclipse
.core
.runtime
.FileLocator
;
15 import org
.eclipse
.tracecompass
.ctf
.core
.CTFException
;
16 import org
.eclipse
.tracecompass
.ctf
.core
.trace
.CTFTrace
;
17 import org
.eclipse
.tracecompass
.testtraces
.ctf
.CtfTestTrace
;
20 * Wrapper for the CTF test traces, instantiating {@link CTFTrace} objects from
23 * @author Alexandre Montplaisir
25 public final class CtfTestTraceUtils
{
27 private CtfTestTraceUtils() {}
30 * Get a CTFTrace instance of a test trace.
33 * The test trace to use
34 * @return The CTFTrace object
35 * @throws CTFException
36 * If there is an error initializing the trace
38 public static synchronized CTFTrace
getTrace(CtfTestTrace trace
) throws CTFException
{
41 tracePath
= FileLocator
.toFileURL(trace
.getTraceURL()).getPath();
42 } catch (IOException e
) {
43 throw new IllegalStateException();
46 return new CTFTrace(tracePath
);
This page took 0.049809 seconds and 5 git commands to generate.