DESCRIPTION

tmf: [rfc-api] Proposed API change to unify trace import operations.

First step towards having "open trace" menu buttons.

NOT signed off

Change-Id: Icef795e2a77ffc6a73a4df5fd25b363d661ee3c8


COMMENTS

author: Brenden Conley
date: 2013-05-10 18:06:03.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/2263/ 

-------------------------------------
author: Brenden Conley
date: 2013-05-10 18:34:36.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/2263/ : SUCCESS

-------------------------------------
author: Kaeden Tapia
date: 2013-05-10 21:49:56.000000000

Patch Set 1: I would prefer that you didn't submit this

(17 inline comments)



Line:118, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceType.java -> Extra line

Line:62, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DropAdapterAssistant.java -> There are many unused imports here. Ctrl+shift+o them away.

Line:257, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DropAdapterAssistant.java -> Missing space before true.

Line:405, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DropAdapterAssistant.java -> createLink used to displayException, now it's swallowed. Couldn't the second parameter be an IPath instead of Path?

Line:419, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DropAdapterAssistant.java -> It seems unnecessary to have another helper method, one can reuse the previous one with IPath as the second param.

Line:75, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> As a Utils class, I don't think it will ever make sense to have an instance of it. All the methods can be static and there won't be a need to call getInstance.

Line:87, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> I would inline that, it's not really useful.

Line:96, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> this can be static. It can also be removed since it's only being called from one spot that seems out of place, see BatchImportTraceWizard().

Line:101, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> This could return a folder even for a non Tmf project. Should isValidProject be called here (with a check for the Tmf nature).

Line:110, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> Did you mean adds it to a project? Or adds it as a resource?

Line:118, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> I'm not sure I understand this description. /tracing project/Traces could not be a project. The Eclipse workspace can't nest projects (unfortunately, see the sad Bug 43536).

Line:121, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> It's not the project that's linked, it's the resource that will be created.

Line:126, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> The description for the exception seems incomplete. As a client of the API, I would be unsure what to do with it without reading the whole code.

Line:188, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> This check seems a bit weak. Any project could have a Traces folder even without the Tmf project nature.

Line:230, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/TmfProjectUtils.java -> This seems inconsistent. importTraceLink logs the error but importTraceCopy displays it in a dialog. In batch import, if I rename a trace just before finishing the wizard, I get the two different behaviors (copy vs link).

Line:113, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/BatchImportTraceWizard.java -> This doesn't seem to do anything??

Line:269, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/importtrace/BatchImportTraceWizard.java -> Can't we still log it? If a user expected a trace to be imported but it didn't work, at least more information can be found in the Error log.

-------------------------------------
author: Ivy Mitchell
date: 2013-08-08 21:18:27.000000000

Abandoned

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