DESCRIPTION

tmf: Tweak ITmfStateSystemAnalysisModule

- Decouple it from TmfStateSystemAnalysisModule, rename it to
  ITmfAnalysisModuleWithStateSystems. An analysis module could
  expose state systems independently of using the abstract class
  or not.

- Change the Map return to separate methods. I'm not very happy
  about getStateSystemId(), but the State System Explorer currently
  needs it. Ideally, the ID could be stored in the state system itself,
  so that this method would not be needed.

Change-Id: I1fcf20384c00b47578309451691f59fd0f438053
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-01-06 21:44:00.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-01-06 23:37:48.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-07 00:28:44.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Annalise Jimenez
date: 2014-01-07 19:24:51.000000000

Patch Set 2:

(2 comments)

Code looks ok.
Just a little question on the state system explorer: what happens when a state system is null at first and becomes available later, is the view updated accordingly?

Line:196, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statesystem/TmfStateSystemExplorer.java -> One case to verify: Here only the state systems that are not null will be shown. In the previous version, all state systems were listed, but null ones had nothing under their name.

When the state system becomes available in this case, does the view add it?

Line:50, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/ITmfAnalysisModuleWithStateSystems.java -> I really don't like it either, especially the way it is implemented in the TmfStateSystemAnalysisModule...

But I'll let it pass if it is fixed soon!

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-07 19:58:21.000000000

Patch Set 2:

(2 comments)

> what happens when a state system is null at first and
> becomes available later, is the view updated accordingly?

This patch should not affect the behavior compared to right now (other than not listing a state system at all if it is null). But it's hard to really know, "right now" the view doesn't show anything because it looks for analysis-built-state-systems and there are none yet.

Line:196, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statesystem/TmfStateSystemExplorer.java -> I don't know :) It's hard to test, since there are no analysis-built-state-systems yet. Right now, does the view update what is shown under a state system that was null at first?

The updateTable() below goes through all the state systems again, so I assume it will update correctly.

Line:50, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/ITmfAnalysisModuleWithStateSystems.java -> It was actually not simple to pass the ID to build the StateSystem, because right now it goes through the TmfStateSystemFactory and then HistoryBuilder, but with the coming refactoring this will make it a bit more simple to fix. (the analysis module will have the ID, so it will just be a matter of adding it to StateSystem's constructor).

-------------------------------------
author: Annalise Jimenez
date: 2014-01-07 20:39:19.000000000

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

(2 comments)

Ok, it will be fine for now. But Meredith Scott's patches are not the end of it ;-)

It's just the start of a merry patch series!

Line:190, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statesystem/TmfStateSystemExplorer.java -> This line here will make sure that the state system analysis modules we have are never null for now. But there is a fixme right above it.

Line:320, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/statesystem/TmfStateSystemExplorer.java -> Otherwise I sense an NPE around this line when fixme is fixed.

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-07 21:25:57.000000000

Patch Set 2: Code-Review+2

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