DESCRIPTION

TMF: Add class to manage XML view information

This allows to reuse code between different XML views, for instance time graph
views and xy chart views.

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


COMMENTS

author: Annalise Jimenez
date: 2014-06-26 19:23:35.000000000

Uploaded patch set 1.

-------------------------------------
author: Annalise Jimenez
date: 2014-06-26 19:39:07.000000000

Topic set to XML XY chart

Prepare the support of XML-defined XY charts

-------------------------------------
author: Brenden Conley
date: 2014-06-26 20:25:48.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-06-26 21:20:12.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Braxton Mccarthy
date: 2014-07-03 18:30:29.000000000

Patch Set 1: Code-Review-1

(4 comments)

Line:250, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java -> If you want to use .isEmpty(), you could have getViewAnalysisIds() return a Collection instead. It's a bit more readable than "not .iterator().hasNext()".

Line:259, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java -> Don't add this, the correct fix is to not make all modules Closeable.

Line:41, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/ui/views/XmlViewInfo.java -> put the final fields before the non-final ones

Line:102, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/ui/views/XmlViewInfo.java -> Sorry for back-pedalling back-and-forth on this... but turns out the auto-complete formats it this way:

  xxx@xxx.xxx Element getViewElement(...)

which, tbh, I much prefer over putting it on the line above. It emphasizes the fact that it's the Element that is @Nullable (not the whole method itself, xxx@xxx.xxx does). And it matches what we do for fields already.

What do you think? Obviously we'll only update existing code if we need to touch it, but for new code, should we go with this?

-------------------------------------
author: Annalise Jimenez
date: 2014-07-04 19:13:07.000000000

Patch Set 1:

(2 comments)

Line:259, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/views/timegraph/XmlTimeGraphView.java -> Then when we do implement the modules as non-autocloseable, we'll get a warning that this warning is not useful anymore. In the meantime, it is one less warning in our code.

I don't see much difference from when we do

<pre>
@SuppressWarning("null")
@NonNull Set<something> set = Collections.singleton(a);
</pre>

And unlike some Eclipse bugs we see, I think the non-autocloseable modules won't have a 10 years history of discussions ;-) So these SuppressWarnings are only temporary... right?

but I'll remove it just for you

Line:102, lttng/org.eclipse.linuxtools.tmf.analysis.xml.ui/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/ui/views/XmlViewInfo.java -> Yes and auto-formatting does not line-break after xxx@xxx.xxx anymore, which is good!

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