DESCRIPTION

tmf: Add Variant field handling in CtfTmfEventField

* Also add unit test for variant types
* Move the base-formatting of numeric values to parent class

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


COMMENTS

author: Annalise Jimenez
date: 2013-03-13 14:59:46.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2013-03-13 15:08:36.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2013-03-13 15:23:28.000000000

Patch Set 4: Verified

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-03-13 20:22:54.000000000

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

(8 inline comments)

Good approach to move the integer-formatting in the super class. It could be marked as "protected final" to make sure sub-classes don't mess with it, but just use it.

Bunch of nitpicks, but the NON-NLS one is the most important.

Line:11, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> thanks ;)

Line:140, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> there should be a space after the cast:
  (IntegerDeclaration) arrayDecl.etc()

Line:160, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> here too

Line:193, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> This will be user-visible, so it should not be non-nls'ed. Which means it should be defined in a Messages.java/messages.properties files. Or you could just print nothing, or throw an exception if this is a case that should never ever happen.

Line:215, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> The base Java Javadoc doesn't, but we normally use the imperative form for javadoc ("Print a numeric value...")

Line:225, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> do you really have to initialize it here? If it gets handled in every possible case below, it could start as null, it would avoid instantiating an empty string.

Line:232, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> space after s

Line:243, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> you can remove this empty line

-------------------------------------
author: Gerrit Code Review
date: 2013-03-19 03:51:28.000000000

Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

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