DESCRIPTION

tmf: Add percentage on Statistics view

Change-Id: I70a565611e230330bc147bb92575d6606aa89311
Signed-off-by: Itzel Singleton xxx@xxx.xxx
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2014-05-23 20:09:52.000000000

Patch Set 19: Code-Review+1

lgtm

-------------------------------------
author: Braxton Mccarthy
date: 2014-05-23 20:10:06.000000000

Patch Set 19:

Rebased it on master, because Hudson would fail to build it otherwise.

-------------------------------------
author: Luciana Barry
date: 2014-05-23 20:10:45.000000000

Patch Set 19: Code-Review+1

-------------------------------------
author: Braxton Mccarthy
date: 2014-05-23 21:26:53.000000000

Patch Set 19: Code-Review-1

(10 comments)

Here comes the party breaker. Sorry :P

But we all agree the design aspect now, these issues should be straightforward.

Line:78, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> These could be an enum instead.

Line:174, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> should be wrapped, somehow

Line:247, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> You could make HIDDEN_FOLDER_LEVELS public instead, and avoid this method.

This ONLY applies to static final, non-mutable objects though. For normal fields you want a private field and a getter method.

Line:251, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfBaseColumnDataProvider.java -> only keep 1 empty line

Line:29, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsFormatter.java -> static final

Line:48, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsFormatter.java -> By moving to an enum, this becomes a switch/case.

This has the advantages of giving you warnings if you ever add cases to the enum. Right now, if we add a new column but forget to update the code here, we'll hit the IAE below.

Line:68, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsFormatter.java -> 1000.0 and "percentage" are both doubles, why convert it to a long? You lose some precision by doing so.

spacing too

Line:412, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java -> instead of big if's that last until the end of the method, you can make the opposite check and return; in the clause. Then the rest of the method's code saves one indentation level.

Line:414, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/TmfStatisticsViewer.java -> should be wrapped at ? and :

Line:54, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/statistics/model/TmfStatisticsTreeNode.java -> private final

-------------------------------------
author: Brenden Conley
date: 2014-05-23 23:18:43.000000000

Patch Set 19:

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

-------------------------------------
author: Brenden Conley
date: 2014-05-24 00:03:13.000000000

Patch Set 19: Verified+1

Build Successful 

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

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