control: support creating of experiments when importing a trace session
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.remote.ui / src / org / eclipse / tracecompass / internal / tmf / remote / ui / wizards / fetch / model / RemoteImportTracesOperation.java
index 1790030b55e5ac7333fe1e2e4145b03afd93adbd..a02c0019ac227eb7cecb3da82b82184632dbdcf3 100644 (file)
@@ -92,6 +92,7 @@ public class RemoteImportTracesOperation extends TmfWorkspaceModifyOperation {
     private final TmfTraceFolder fDestination;
     private final Object[] fTraceElements;
     private final ImportConflictHandler fConflictHandler;
+    private final List<IResource> fImportedResources = new ArrayList<>();
 
     // ------------------------------------------------------------------------
     // Constructor(s)
@@ -249,6 +250,7 @@ public class RemoteImportTracesOperation extends TmfWorkspaceModifyOperation {
 
                     if (traceTypeHelper != null) {
                         TmfTraceTypeUIUtils.setTraceType(traceRes, traceTypeHelper);
+                        fImportedResources.add(traceRes);
                     }
 
                     // Set source location
@@ -433,4 +435,18 @@ public class RemoteImportTracesOperation extends TmfWorkspaceModifyOperation {
     public IStatus getStatus() {
         return fStatus;
     }
+
+    /**
+     * Get the list of resources that were imported by this operation. An
+     * example use case would be to use this to open traces that were imported
+     * by this operation.
+     *
+     * Note this includes only valid traces and doesn'tinclude unrecognized
+     * files.
+     *
+     * @return the trace resources that were imported
+     */
+    public List<IResource> getImportedResources() {
+        return fImportedResources;
+    }
 }
This page took 0.025346 seconds and 5 git commands to generate.