DESCRIPTION

tmf: lttngControl: TraceLogLvl: add valueOfString utility

Change-Id: Ie0046d483c0bd47115bf0fe05660c13cbcc66ff1
Signed-off-by: Izaiah Valdez xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2014-08-11 21:25:37.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-08-11 21:58:36.000000000

Patch Set 2: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8195/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-08-12 01:01:13.000000000

Patch Set 2: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-08-12 01:39:08.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Ricky Reeves
date: 2014-08-12 18:27:52.000000000

Patch Set 2: Code-Review-1

(3 comments)

Line:96, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceLogLevel.java -> You could format the header (CTRL+SHIFT+F)

Line:98, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceLogLevel.java -> BaseEventInfo.setLogLevel(string) does the same thing. So, we should used you new method instead and remove setLogLevel() from BaseEventInfo (IBaseEventInfo). If we do so we need to make sure that the test case are updated so that the valueOfString() method is tested.

Line:100, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceLogLevel.java -> Shall we return LEVEL_UNKNOWN when the name is null, similar to if name is an invalid name?

-------------------------------------
author: Izaiah Valdez
date: 2014-08-14 20:44:30.000000000

Patch Set 2:

(2 comments)

Line:98, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceLogLevel.java -> good point ! i forgot to change it. Actually it is easier and to simply use the valueOfString into the setLogLevel.

Line:100, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceLogLevel.java -> Well the case were we call this function with a null parameter is not a common one and should not happen thus the throw of exception.In the case of a unknown element or a "" Level_unknown is returned. The passing of a null element look more like a code problem. I changed it to an InvalidParameterException.

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