lttng.control.ui: various cleanup fixes.

Fix empty nested blocks
Fix inner assignments
Fix utility constructor
Fix magic numbers
Try to slightly address complexity

Change-Id: I6f16be7d31d559b2b3f8189bdab5c4c44fded327
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/37013
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-by: Markus Schorn <markus.schorn@windriver.com>
tmf.ui clean up CustomXmlTraceDefinition a bit

Change-Id: Ia8c96e588307b892d08f8a5cc8e723f7a723cf53
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/36871
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
rcp: Update Trace Compass RCP branding

Uses the new icons and splash screen.

Happens to fix bug #446385, since we use a splash screen(!)

Change-Id: I3c5cb0f77b00f7c9513ad2161f0185df90a108eb
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36500
Tested-by: Hudson CI
TMF: Call postDrawEvent also for transparent events in time graph control

The color of an event may be transparent, but it may contain data that needs to
be displayed through the postDrawEvent callback, so it should be called before
returning.

Change-Id: Ic672a1aeb781c89b9da2da9670e2b6f4968c3c43
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/36702
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Hudson CI
tmf: Introduce the core concept of event aspects

An "event aspect" is a piece of information that can be extracted,
directly or indirectly, from a trace event. Simple examples could be
timestamp or event fields. But it could also be something indirect,
like a state system request at the timestamp of the given event.

This patch introduces the base ITmfEventAspect interface, some basic
implementations, and simplifies the TmfEventTableColumns to use aspects
instead, since part of it is now redundant.

Fixes bug #451411.

Change-Id: Ib045439d6084a6e6c7c276f1eddccfb13fe01be0
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/36363
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf: Remove the ITmfEventTableColumns extension point

Add a getEventAspects() method in ITmfTrace, which allows trace types
to define which aspects can be relevant for their own events.

This becomes redundant with the ITmfEventTableColumn extension point:
now that we build columns directly from aspects, the TmfEventsEditor
can simply call trace.getEventAspects() instead of reading extension
point data. The trace type is already defined in a core extension point,
so we'll pass the event aspect information through that now.

The combination of careful equals() methods in aspects and the use
of a Set in the TmfEventsEditor will allow "merging" aspects/columns
together, like was already the case.

Change-Id: Ic5b6126a50b1b1fdb4b2d5d23eb6a47a57555594
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf.ctf: Rework the event aspects of CTF traces

- Move the "channel" aspect from LttngKernel to CtfTmfTrace
  (it can apply to any CTF trace).
- Add a CPU aspect for CTF traces.

CTF events know the CPU they were taken on (previously saved in
event.getSource()). Now we can define an aspect to display it
in its own column in the event table.

Change-Id: I603cfd4cc4ca61964ec59ea17293900e7aa1f42a
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf.analysis: Restore the "getCPU" for data-driven analyses

XML data-driven analyses used to use ITmfEvent.getSource() to get
the event's CPU. This was misleading, because trace types were free
to define "source" as something other than CPUs.

Now instead use a CpuAspect to get the CPU of an event. This
should restore support for getting the CPU of CTF traces, as it
did before.

Change-Id: I88437b4a419e81aef36f2aa5298ff54f87242b23
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Make ITmfTrace.getEventAspects() @NonNull

It's easier to deal with empty collections than dealing with
null/non-null references (for Collection.addAll() and such).

Change-Id: I9e8d0091e099027b5da0c15881b73130b4ef2e9d
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Add a "Trace" Event Table column for experiments

Also reworked some internal methods in TmfEventsEditor to not return
a table object directly, but rather just a set of event aspects.
This way we can add this "Trace" column only for experiments.

Change-Id: I21536cd11da28f30b1f822a495cd06a4d922064c
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Split off TmfFilterMatchesNode in two

Add new TmfFitlerMatchesFieldNode and TmfFilterMatchesAspectNode, which
both extend TmfFilterMatchesNode (which is now abstract). This will allow
using filtering on aspects.

The aspect node is not integrated yet in the Filter View, but it could be
eventually.

Change-Id: I7206c0508eed4fbb16cc22fef97900ca31220328
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
tmf: Use TmfFilterMatchesAspectNode's in the event table

This will allow filtering/searching on aspects in the event table,
which is more flexible than fields with field IDs.

With this switch, we can now remove the notion of getFilterId() from
the event aspects.

Change-Id: Iecbc47de06c44ef2d114dc3225cd094c111f1f08
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>