DESCRIPTION

tmf: Add subfield and compare with field support for filter view

Change-Id: Idcb1429a73d4fe981aa644126cc95f886e6a736e
Signed-off-by: Itzel Singleton xxx@xxx.xxx


COMMENTS

author: Itzel Singleton
date: 2014-06-27 22:45:29.000000000

Uploaded patch set 1.

-------------------------------------
author: Itzel Singleton
date: 2014-06-27 22:58:36.000000000

Patch Set 1:

This patch adds the possibility to filter by subfields. For instance, you can get a subfield by writing:
field1/subfield2/subsubfield1
Also, to make Windows users happy, this will also work:
field1\subfield2\subsubfield1

This patch also adds the feature to compare a field to another field (in the EQUALS filter) instead of a value. This is useful for cases where you want two fields to be equals. Such cases include finding loopback in Pcap Trace (IPV4/SourceAddress == IPV4/DestinationAddress).This is mostly useful for Pcap, as it essentially gives us as many filtering possibility as Wireshark.
The usefulness of adding such a feature to CONTAINS and COMPARE filters is still TBD.

-------------------------------------
author: Brenden Conley
date: 2014-06-28 00:40:13.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-06-28 00:48:14.000000000

Patch Set 1: Verified-1

Build Failed 

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

-------------------------------------
author: Brenden Conley
date: 2014-07-01 16:47:36.000000000

Patch Set 1: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2014-07-01 17:00:16.000000000

Patch Set 1: Verified-1

Build Failed 

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

-------------------------------------
author: Luciana Barry
date: 2014-07-07 20:51:39.000000000

Patch Set 1: Code-Review-1

(7 comments)

General comments:

There is no indication to the user that filters on subfields is even possible. Should we add tool tips?

I could see this being very useful for all CTF traces, for which the Content is made of subfields. We should implement an easy way to access the CTF subfields with filters. I expected ":content:/subfield" to work.

Line:251, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/Messages.java -> compareWithField

Line:757, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java -> fCompareWithFieldButton

Line:803, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java -> If the initial state is 'compare with value' the combo is initialized with the field list.

Line:814, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java -> I would prefer to keep it as a Text (with the value hint when empty) when it is the normal case. Can you experiment with creating both controls, but hiding the unused one with setVisible(false)? It might require calling layout() on the parent composite when toggling the visibility.

Line:830, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterViewer.java -> When the initial state is 'compare with field', the layout does not have enough room for 'value' after you change the button state. It requires calling layout() or somehow allocating enough space for the worst case.

Line:148, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/filter/model/TmfFilterTreeNode.java -> Some extension could use / or \ in field names, and then filters will not work. Also, for performance perhaps the replace and split should be avoided in the normal case. Idea: only process for subfields when prefixed with /, e.g. "/field/subfield".

Line:101, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterTreeLabelProvider.java -> When comparing with field, the field name should not be quoted.

-------------------------------------
author: Erick Ross
date: 2015-03-06 21:01:03.000000000

Abandoned

Lttng module is separate project now. Consider submitting your patch to
https://projects.eclipse.org/projects/tools.tracecompass .

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