TMF: Add some non null annotations to TmfTimeRange
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / views / uml2sd / DrawableToolTip.java
index 0163ba988990958352b00c8ba0066e6cf2f6cba1..da7673250a03b6619e849e04cfd0240898fee49b 100755 (executable)
@@ -23,6 +23,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.tracecompass.tmf.ui.views.uml2sd.util.Messages;
 
 /**
@@ -223,7 +224,15 @@ public class DrawableToolTip implements PaintListener {
      * @param max the scale max
      */
     public void showToolTip(ITmfTimestamp value, ITmfTimestamp min, ITmfTimestamp max) {
-        fMinMaxRange = new TmfTimeRange(min, max);
+        ITmfTimestamp minTime = min;
+        ITmfTimestamp maxTime = max;
+        if (minTime == null) {
+            minTime = TmfTimestamp.BIG_BANG;
+        }
+        if (maxTime == null) {
+            maxTime = TmfTimestamp.BIG_CRUNCH;
+        }
+        fMinMaxRange = new TmfTimeRange(minTime, maxTime);
         fCurrentValue = value;
 
         int w = fToolTipShell.getBounds().width;
This page took 0.025784 seconds and 5 git commands to generate.