Class TmfOpenTraceHelper

java.lang.Object
org.eclipse.tracecompass.tmf.ui.project.model.TmfOpenTraceHelper

public class TmfOpenTraceHelper extends Object
Open trace helper Helper class for opening trace resources and loading them to a tracing project.
Author:
Matthew Khouzam
  • Method Details

    • openTraceFromPath

      public static org.eclipse.core.runtime.IStatus openTraceFromPath(TmfTraceFolder destinationFolder, String path, org.eclipse.swt.widgets.Shell shell) throws org.eclipse.core.runtime.CoreException
      Opens a trace from a path while importing it to the destination folder. The trace is linked as a resource.
      Parameters:
      destinationFolder - The destination trace folder
      path - the file to import
      shell - the shell to use for dialogs
      Returns:
      IStatus OK if successful. In addition to the OK status, a code OK means the trace will be opened correctly, otherwise, a code of IStatus.INFO means the operation completely successfully, but the path won't be opened as a trace.
      Throws:
      org.eclipse.core.runtime.CoreException - core exceptions if something is not well set up in the back end
    • openTraceFromPath

      public static org.eclipse.core.runtime.IStatus openTraceFromPath(TmfTraceFolder destinationFolder, String path, org.eclipse.swt.widgets.Shell shell, String tracetypeHint) throws org.eclipse.core.runtime.CoreException
      Opens a trace from a path while importing it to the destination folder. The trace is linked as a resource.
      Parameters:
      destinationFolder - The destination trace folder
      path - the file to import
      shell - the shell to use for dialogs
      tracetypeHint - The trace type id, can be null
      Returns:
      IStatus OK if successful. In addition to the OK status, a code OK means the trace will be opened correctly, otherwise, a code of IStatus.INFO means the operation completely successfully, but the path won't be opened as a trace.
      Throws:
      org.eclipse.core.runtime.CoreException - core exceptions if something is not well set up in the back end
    • openFromElement

      public static org.eclipse.core.runtime.IStatus openFromElement(TmfCommonProjectElement traceElement)
      Open a trace (or experiment) from a project element. If the trace is already opened, its editor is activated and brought to top.
      Parameters:
      traceElement - the TmfTraceElement to open
      Returns:
      The status of the opening. If the status is IStatus.OK, then the element will be opened. In addition to the OK status, a code OK means that a trace trace will be opened correctly, otherwise, a code of IStatus.INFO means the operation completely successfully, but the path won't be opened as a trace.
      Since:
      5.2
    • reopenTraceFromElement

      public static void reopenTraceFromElement(TmfCommonProjectElement traceElement, org.eclipse.ui.IReusableEditor editor)
      Reopen a trace or experiment from a project element in the provided editor
      Parameters:
      traceElement - the TmfTraceElement to open
      editor - the reusable editor