DESCRIPTION

tmf: lttngControl: TraceEnablement: mi support + utility function

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


COMMENTS

author: Izaiah Valdez
date: 2014-08-11 18:16:31.000000000

Uploaded patch set 3.

-------------------------------------
author: Ricky Reeves
date: 2014-08-12 18:28:28.000000000

Patch Set 3: Code-Review-1

(3 comments)

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

Line:76, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceEnablement.java -> Shall we return DISABLED here  The same as for the invalid name (see also comment below)?

Line:84, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceEnablement.java -> In EventInfo.setState() I set it to disabled if the conversion is not successful due to invalid name. 
It's always a question of taste, do you want to application to fail right away so that it's going to be fixed right a way or do we allow to continue. I decided to use the second case for that case.

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

Patch Set 3:

(2 comments)

Line:76, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceEnablement.java -> Replaced with InvalidParameterException because if a null object is passed here it is mostly a code error.

Line:84, lttng/org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/TraceEnablement.java -> I agree on an invalid enablement string.

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