private final TmfTraceFolder fDestination;
private final Object[] fTraceElements;
private final ImportConflictHandler fConflictHandler;
+ private final List<IResource> fImportedResources = new ArrayList<>();
// ------------------------------------------------------------------------
// Constructor(s)
if (traceTypeHelper != null) {
TmfTraceTypeUIUtils.setTraceType(traceRes, traceTypeHelper);
+ fImportedResources.add(traceRes);
}
// Set source location
// super fast on the same drive
Files.move(intermediateFile.toPath(), destination.toFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
}
- } catch (CoreException e) {
+ } catch (CoreException | InvocationTargetException | InterruptedException e) {
Activator.getDefault().logError(e.getMessage(), e);
} finally {
if (intermediateFile != null && intermediateFile.exists()) {
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;
+ }
}