DESCRIPTION

Tmf: Add the possibility to define experiment types

* Added the element experiment to the org.eclipse.linuxtools.tmf.ui.tracetype
  extension point to declare experiment types, using the same handler and
  contribution items.
* Experiment elements are now instantiated with the given trace type.
* Renamed class TmfWithFolderElement to TmfCommonProjectElement since this base
  class does more than just managing folder.
* Consolidation of code for opening traces and experiments in the
  TmfOpenTraceHelper class.
* Changes so that experiment types can have their own event editor, event table
  and statistics viewer.

Change-Id: I8ae7da262e2a1e7eab78cf9e763f1fbc0babf5fb
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-09-19 18:03:49.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-09-19 18:31:24.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Luciana Barry
date: 2013-10-02 21:10:32.000000000

Patch Set 1:

(11 comments)

Partial review, to be continued at a later date, or never if things go horribly bad... ;)

Line:642, lttng/org.eclipse.linuxtools.tmf.ui/plugin.xml -> trailing spaces

Line:21, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/messages.properties -> can be removed?

Line:65, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfCommonProjectElement.java -> Nifty solution, but could it be solved by using NLS binding with a {0} that would be filled with a commonElement.getType() which would be either "trace" or "experiment" dependend on subclass? The messages already looked like they could use a binding for the actual element name. Just a thought..

Line:99, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfExperiment.java -> That will be 3.0 but we have disabled API-check in lttng-luna for now, the tag can be removed and we will fix API errors across the board when the time comes.

Line:93, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/project/model/ProjectModelTestData.java -> I think this can be simplified to experimentFolder.getFolder(experimentName);

Line:330, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEventsEditor.java -> I would hope that no experiment type would have the same id as another trace type, but is it enforceable though...

Line:145, lttng/org.eclipse.linuxtools.tmf.ui/schema/org.eclipse.linuxtools.tmf.ui.tracetype.exsd -> experiment type

Line:179, lttng/org.eclipse.linuxtools.tmf.ui/schema/org.eclipse.linuxtools.tmf.ui.tracetype.exsd -> experiment type

Line:30, lttng/org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/tests/experiment/type/TmfStatisticsViewerStub.java -> only final (constants) should be in all-caps

Line:87, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/SelectElementTypeContributionItem.java -> Since it really should never happen according to the plugin.xml, it could be handle simpler (just return one array or the other, or even better an empty array). But it's certainly not worth to define an NLS message for this...

Line:42, lttng/org.eclipse.linuxtools.tmf.ui.tests/widgetStubs/org/eclipse/linuxtools/tmf/ui/tests/experiment/type/TmfEventsEditorStub.java -> Looking at the test code, not sure this is really needed.

-------------------------------------
author: Luciana Barry
date: 2013-10-21 21:16:33.000000000

Patch Set 1: Code-Review-1

(10 comments)

I made it ;)

Line:82, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceType.java -> 3.0 (or remove and it will be added back later when we enable API check for luna)

Line:117, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceType.java -> should be 'experiment_type'

Line:118, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceType.java -> 3.0 (or remove and it will be added back later when we enable API check for luna)

Line:1343, lttng/org.eclipse.linuxtools.tmf.ui/plugin.xml -> should we externalize it to plugin.properties?

Line:92, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfExperimentElement.java -> 3.0 or remove for now

Line:123, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfCommonProjectElement.java -> since it's a new class xxx@xxx.xxx can be removed

Line:170, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfCommonProjectElement.java -> since it's a new class xxx@xxx.xxx can be removed

Line:180, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfCommonProjectElement.java -> It's really the traceType that we are passing as a parameter, the fact that the caller is using a class's canonical name as the trace type is not relevant to this method.

Line:255, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfCommonProjectElement.java -> since it's a new class xxx@xxx.xxx can be removed

Line:266, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfCommonProjectElement.java -> since it's a new class xxx@xxx.xxx can be removed

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