DESCRIPTION

TMF: Add Variant field class to CtfTmfEventField

A variant field class was necessary to not lose the name of the variant
field.  The output of a variant field type is now identical to that of
babeltrace.

Modified some comments and added the getFormattedValue to CTFStructField
to correctly handle empty structs.

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


COMMENTS

author: Annalise Jimenez
date: 2013-04-05 16:17:27.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-04-05 16:17:33.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2013-04-05 16:36:27.000000000

Patch Set 2: Verified

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-04-05 17:56:37.000000000

Patch Set 2: I would prefer that you didn't submit this; Unclean IP, do not check in

(3 inline comments)

Small comments.

We'd have to discuss about how we store the Variant field (it's a bit weird to have "(field, new [] { field })", but at the same time it makes sense). I'll have Matthew look at it too, although he's a bit busy with the trace import nowadays...

Line:165, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> Could you put this on two lines plz? Like
  subField = CtfTmfEventField.parseField(...)
  field = new CTFVariantField(fieldName, subField)

since it's a potentially recursive call, so it's a tad easier to debug.

Line:449, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> This is the same as the default implementation (in TmfEventField), so it shouldn't be overridden here.

Line:453, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> Maybe we should update CtfTmfEventField.toString() to use this implementation instead? So it won't have to be repeated in every subclass

-------------------------------------
author: Annalise Jimenez
date: 2013-04-05 19:31:06.000000000

Patch Set 2:

I, Aryana Jones, declare that I developed the attached code from scratch, without referencing any 3rd party materials except material licensed under the terms of EPL. I am authorized by École Polytechnique de Montréal to make this contribution under the terms of EPL.

-------------------------------------
author: Braxton Mccarthy
date: 2013-04-05 21:17:12.000000000

Patch Set 2: IP review completed



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