tmf.ui: Make TmfEventsTable#PackColumns return a value
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Tue, 29 Mar 2016 17:04:31 +0000 (13:04 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Tue, 29 Mar 2016 21:31:28 +0000 (17:31 -0400)
This allows extending classes to know whether the pack actually happened
or if it was fast returned. The quick return shows that the columns have
already been packed. If the method does pack the columns, we know that it
was done the first time (on a new trace open) or after. This can allow
extending classes to have a hook to a location where the columns have
been initialized as they are not yet in the consutructor or in "init".

Change-Id: Ia4f3ab76e144d937bb5a8eb5e7597c9e99b3114f
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/69469
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/events/TmfEventsTable.java

index 1b4287e27ab9d7b47254a4e985c38c0dc90bdc4e..7ad2b6d01c402fcf67bd5ed66e8d3398fa1a806a 100644 (file)
@@ -2553,10 +2553,16 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS
 
     /**
      * Pack the columns.
+     *
+     * @return
+     *            Whether or not a pack was done in this call. Otherwise, it was already done by a
+     *            previous call
+     *
+     * @since 2.0
      */
-    protected void packColumns() {
+    protected boolean packColumns() {
         if (fPackDone) {
-            return;
+            return false;
         }
         fTable.setRedraw(false);
         try {
@@ -2571,6 +2577,7 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS
             fTable.setRedraw(true);
         }
         fPackDone = true;
+        return true;
     }
 
     private void packMarginColumn() {
This page took 0.0288 seconds and 5 git commands to generate.