DESCRIPTION

TMF: Do not process data from custom event when empty and timestamp is set

This had the effect to reset the data and timestamp when it was previously
set in the constructor.

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


COMMENTS

author: Brenden Conley
date: 2014-01-29 19:00:47.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-29 19:55:40.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2014-01-30 15:14:05.000000000

Patch Set 1:

(1 comment)

I have a demorgan question for you. 

if( x && !( !y && z ) ) 
or
if( x && ( y || !z ) ) 
which one is easier to read...
Please reply.

Line:131, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java -> if( fData != null && ( !fdata.isEmpty || customEventTimestamp == null) ) seems clearer to me, what do you think?

-------------------------------------
author: Annalise Jimenez
date: 2014-01-30 15:19:57.000000000

Patch Set 1:

(1 comment)

Line:131, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java -> I know it's not quite readable this way.

The more readable would be: Don't do it if timestamp has been set and data is empty. 

But do it either if data is not empty or the timestamp has not been set? Yeah makes more sense I guess. I'll comment the line as well.

-------------------------------------
author: Ivy Mitchell
date: 2014-01-30 15:39:02.000000000

Patch Set 1:

(1 comment)

Line:131, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEvent.java -> That is the perfectest answer. Comments make code much better.
in minterms, we have 
fData!=null && fData.isEmpty && custom==null<br>
fData!=null && !fData.isEmpty && custom==null<br>
fData!=null && !fData.isEmpty && custom!=null<br>
What about 
if((fData!= null && !fData.isEmpty)||(fData != null && custom != null))? the compiler should optimise this properly...

-------------------------------------
author: Ivy Mitchell
date: 2014-02-04 22:29:33.000000000

Patch Set 1: Code-Review-1

-1ing until the patch has comments as suggested, I am also CCing patrick tasse who had ideas about this patch.

-------------------------------------
author: Annalise Jimenez
date: 2014-02-05 14:43:12.000000000

Patch Set 1:

Leave this on hold for now, I may not need this change depending on the strategy we choose to implement for the "editable trace type" (yeah, that's the new name for now ;-)

-------------------------------------
author: Annalise Jimenez
date: 2014-02-05 14:46:35.000000000

Patch Set 1: Code-Review-2

I'll even -2 myself for now!

-------------------------------------
author: Annalise Jimenez
date: 2014-04-09 01:52:59.000000000

Abandoned

Not needed anymore so I won't simply change the behavior of something that works

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