DESCRIPTION

[RFC] tmf: Introduce the AbstractTimeGraphView

Provide an abstract class that all potential Time Graph views can
extend to get going. This will hopefully reduce the large amount of
redundant code we have between these views.

This change includes:
- A new AbstractTimeGraphView, which lttng2's ResourcesView can now use.
- A new AbstractTimeGraphEntry type, to consolidate all the needed code
  for time graph entries. This could become unnecessary at one point,
  but it's not clear at the moment.
- Consolidate all EventIterator's in one place. This could be changed
  to an abstract class too in the future if different views need
  different iterators.

This is the first phase of this effort. The selectExperiment() and
getEventList() methods still require a relatively large amount of code.
These could probably be abstracted a bit further.

Another future work item is to do the same thing for TimeGraphCombo views.

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


COMMENTS

author: Brenden Conley
date: 2012-09-13 15:49:02.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2012-09-13 16:02:52.000000000

Patch Set 1: Verified

Build Successful 

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

-------------------------------------
author: Janet Compton
date: 2012-09-18 14:46:10.000000000

Patch Set 1: Verified; Looks good to me, but someone else must approve; IP review completed

Nice work. I think I have a use for this :-)

-------------------------------------
author: Luciana Barry
date: 2012-09-18 17:36:45.000000000

Patch Set 1: (12 inline comments)



Line:103, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphEntry.java -> change specific view name

Line:105, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphEntry.java -> change specific trace name

Line:55, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> the generic E might not be necessary

Line:110, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> This abstract class assumes that the desired model is:
- Each trace as root in the tree
- Traces sorted by their start time (1st) and trace name (2nd)
- Traces have only one level deep of child 'AbstractTimeGraphEntry'
- Child entries are sorted by their name

Perhaps TraceEntry should be defined in the subclass (or in a separate class that the subclass could choose to use).

Line:226, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> The recursive algorithm from ControlFlowView might be more generic.

Line:286, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> not sure if it matters to have specific TmfTimestamp subclass here?

Line:296, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> not sure if it matters to have specific TmfTimestamp subclass here?

Line:342, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> not necessarily the desired behavior

Line:578, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> make it a constructor parameter and store in a variable

Line:580, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> make it a constructor parameter and store in a variable

Line:584, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java -> make it a constructor parameter and store in a variable

Line:22, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/model/ITimeGraphEntry.java -> why does the version increase?

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