DESCRIPTION

tmf: Import and export multiple traces in a package

Change-Id: I935a1fcf76518bcad02940f8cc687389dae89673
Signed-off-by: Alivia Ritter xxx@xxx.xxx


COMMENTS

author: Kaeden Tapia
date: 2013-11-19 20:39:47.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-11-19 23:45:08.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4040/

-------------------------------------
author: Brenden Conley
date: 2013-11-20 00:42:07.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4040/ : SUCCESS

-------------------------------------
author: Ricky Reeves
date: 2013-11-26 15:12:23.000000000

Patch Set 2: Verified+1 IP-Clean+1

(2 comments)

Minor comments which could be done as sub-sequent patch(es)

Line:113, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ExportTracePackageWizardPage.java -> Maybe it would be good to disable the Export menu item when selecting traces from multiple projects. What do you think?

Line:128, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ExportTracePackageSelectTraceWizardPage.java -> - It could be useful for select/deselect all traces buttons. 
- Also the Next button shouldn't be enabled if no trace is selected

-------------------------------------
author: Luciana Barry
date: 2013-11-26 21:58:44.000000000

Patch Set 2: Verified-1 Code-Review-1

(2 comments)

I get the following exception when at the end of exporting two traces. The trace package is correctly built and can be imported, though.

Error exporting Testing Drag&Drop 1/.traceExport/Traces/kernel/channel0_0: duplicate entry: Traces/kernel/channel0_0
java.util.zip.ZipException: duplicate entry: Traces/kernel/channel0_0
	at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
	at org.eclipse.ui.internal.wizards.datatransfer.ZipFileExporter.write(ZipFileExporter.java:94)
	at org.eclipse.ui.internal.wizards.datatransfer.ZipFileExporter.write(ZipFileExporter.java:126)
	at org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation.exportResource(ArchiveFileExportOperation.java:198)
	at org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation.exportResource(ArchiveFileExportOperation.java:227)
	at org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation.exportResource(ArchiveFileExportOperation.java:227)
	at org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation.exportResource(ArchiveFileExportOperation.java:163)
	at org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation.exportSpecifiedResources(ArchiveFileExportOperation.java:242)
	at org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation.run(ArchiveFileExportOperation.java:330)
	at org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg.importexport.TracePackageExportOperation.exportToArchive(TracePackageExportOperation.java:279)
	at org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg.importexport.TracePackageExportOperation.run(TracePackageExportOperation.java:133)
	at org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg.importexport.ExportTracePackageWizardPage$4.run(ExportTracePackageWizardPage.java:435)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Line:301, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/AbstractTracePackageWizardPage.java -> This should be called once at creation. When getting here the long way (from File > Export...), the traces selected in the previous page will be fully selected yet the Finish button is initially disabled.

Line:113, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ExportTracePackageWizardPage.java -> Also, it might be useful to allow launching the export trace package wizard from an Experiment element or from a TraceFolder element.

-------------------------------------
author: Luciana Barry
date: 2013-11-26 22:07:35.000000000

Patch Set 2:

(1 comment)

Further info on the exception: it happens for every file (trace files and supplementary files) of both traces, and the exception does not happen when exporting only one trace.

Line:367, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ImportTracePackageWizardPage.java -> It's a bit strange, if there are multiple overwrites, you could say YES to one but if you say NO to the other, the whole operation is cancelled... With this behavior there should be no YES button and the NO should be NO_TO_ALL.

-------------------------------------
author: Kaeden Tapia
date: 2013-11-28 00:06:03.000000000

Patch Set 2:

(5 comments)

Line:367, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ImportTracePackageWizardPage.java -> I added YES TO ALL and I made NO not cancel the whole operation but just not import this one.

Line:301, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/AbstractTracePackageWizardPage.java -> Done. It is now called when the page is made visible.

Line:113, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ExportTracePackageWizardPage.java -> Done. I moved the logic to get the traces from the selection to the handler and I validate there. I also changed the wizard to always show the first page when it's opened "the long way" with File > Export because it was weird to have it skip the page if you happened to have a trace selected.

Line:113, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ExportTracePackageWizardPage.java -> I think from the Trace Folder is good but the Experiment I think would be a bit confusing because one could expect that it exports an Experiment which it doesn't support right now (yet?).

Line:128, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/importexport/ExportTracePackageSelectTraceWizardPage.java -> "It could be useful for select/deselect all traces buttons."

Done.

"Also the Next button shouldn't be enabled if no trace is selected"

Good catch, that bug was introduced when I added the checkboxes, canFlipToNextPage needed to be updated.

-------------------------------------
author: Gerrit Code Review
date: 2013-11-29 23:48:28.000000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

-------------------------------------
author: Gerrit Code Review
date: 2013-12-02 15:24:10.000000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

-------------------------------------
