DESCRIPTION

XML state system: Add math and comparison operations to the XML.

Change-Id: I14b03fbe44f5906a6e88a99f4d6d0edbd293eec6
Signed-off-by: Makena Hernandez xxx@xxx.xxx


COMMENTS

author: Makena Hernandez
date: 2014-09-22 20:11:26.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-09-22 20:23:29.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-09-22 20:56:12.000000000

Patch Set 2: Verified-1

Build Failed 

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

-------------------------------------
author: Annalise Jimenez
date: 2014-09-23 15:26:38.000000000

Patch Set 2: Code-Review-1

(23 comments)

Nice additions to the XML! Could you add sample XML in the unit tests using those new operators, so 1- they can be unit tested correctly and 2- people have example code using it.

You could base your work on this patch https://git.eclipse.org/r/#/c/33705/ where I moved the valid unit tests to a directory, so instead of having only 1 valid file for all unit tests, we can add many more independent valid sample files in the test_xml_files/test_valid directory.

Line:45, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/IEventDeclaration.java -> why the change? Something may be wrong with your API baseline.

Line:18, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlEntry.java -> Above was a blank line that was meant to be there ;-) Ctrl+shift+o in the file will correct that.

Line:48, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java -> Your full name please ;-)

Line:50, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java -> extra empty line (I know Eclipse does it this way, but we have to manually correct it)

Line:58, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java -> fields start with f. private final?

Line:422, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java -> since it's a list, fMathValues?

Line:463, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java -> technically, finalValue could be a different type than value if it was calculated from a preceding state value of a different type. unboxInt() here may fail, same as other types below. It may be ok for now, but something cleaner, taking into account the type of value and finalValue, will have to be implemented.

Line:522, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java -> Is it me or is that copy pasted from TmfXmlStateValueQuery? If math operations and increment do not go together, then you should make an explicit check of that in the constructor to warn the user, and make this method throw an IllegalStateException.

Line:126, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlPresentationProvider.java -> The changes in this file were probably part of another patch (the labeling)?

Line:5, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/META-INF/MANIFEST.MF -> this has to be changed in the pom.xml too

Line:54, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java -> field names must start with f

Line:55, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java -> extra blank line here

Line:191, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java -> why the suppress null? You should try to not require it. Especially since XML is rather new code and we have control on the API, we should avoid suppressing null warnings and do the right checks and/or make xxx@xxx.xxx

Line:271, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java -> Is this part of this patch or isn't it a method added in the labeling patch? If so, it should not be part of this patch

Line:90, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd -> Look at this file in gerrit, it will show red tabs where there shouldn't be.

Line:111, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd -> Do you use mathSingle anywhere? I do not see it used

Line:121, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd -> multiple -> multiply

Line:128, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd -> Really, you want any attribute after that?

Line:137, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd -> This documentation really goes with this element?

Line:351, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/Utils.java -> that too is part of another patch.

Line:107, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateAttribute.java -> new extra blank line here

Line:287, lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateAttribute.java -> this code looks a lot like a copy paste from the QUERY case. What is special about it? What should be done here? If you really have to execute the same code as for the query, you can add case MATH: just above case QUERY: without break;

Line:12, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java -> Here too, the changes were part of another patch

-------------------------------------
author: Annalise Jimenez
date: 2014-10-31 16:48:28.000000000

Abandoned

Moved to trace compass

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