DESCRIPTION

tmf: display in property view with same format as event view

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


COMMENTS

author: Brenden Conley
date: 2013-03-19 19:25:47.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-03-19 19:38:37.000000000

Patch Set 1: Verified

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-03-19 20:00:24.000000000

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

What is your use case for this? Is there any reason we can't call getValue().toString() (and properly defining this toString()), instead of adding another kinda-redundant method in ITmfEventField?

-------------------------------------
author: Annalise Jimenez
date: 2013-03-19 20:10:23.000000000

Patch Set 1:

The getValue() return type is not some type we have control over, so we cannot properly define the toString() for it.

For instance in the CTFIntegerArrayField class, the value is of type List<Long>.  getValue().toString() would not format it in a given base.

Use case:  in the property view, I have this
Content          somevalue=0xabcd
  somevalue      43981 [want abcd]

-------------------------------------
author: Braxton Mccarthy
date: 2013-03-19 20:47:26.000000000

Patch Set 1: (1 inline comment)

Ah ok I see. You're the one having fun playing with new field types after all ;)

So I guess I went through the same train of thought you did, and figured out it's probably the better option. (We can't control all Object's toString() methods, and field.toString() also prints the field name, but we only want the value.)

One suggestion though, you could cache the resulting string, see inline comment.

Line:363, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> Maybe keep this as a class field, initialized at null, and if it's null set it up. That way you don't re-create the array everytime.

Also, it might be better saving just one string (built with a StringBuilder) instead of the string array if we're only ever gonna use the compound string.

-------------------------------------
author: Annalise Jimenez
date: 2013-03-19 21:00:25.000000000

Patch Set 1: (1 inline comment)



Line:363, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.java -> Would this be really useful?  I mean this won't be called very much more often than the toString function, only to fill the Propriety viewer.

-------------------------------------
author: Gerrit Code Review
date: 2013-03-25 17:25:50.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.

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