More fixes of static analysis warnings for UML2SD
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / core / SyncMessage.java
index ff4c6b76f67fe1d40ee3b28754ef1e9c4d25368a..0092bbfc4984c797cb01cced2300c4acfbb9557c 100755 (executable)
@@ -19,6 +19,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.ISDPreferences;
+import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SortSyncMessageComparator;
 
 /**
@@ -252,12 +253,16 @@ public class SyncMessage extends BaseMessage implements ITimeRange {
      */
     @Override
     public void draw(IGC context) {
-        if (!isVisible())
+        if (!isVisible()) {
             return;
+        }
+
+        ISDPreferences pref = SDViewPref.getInstance();
+
         // Draw it selected?
         if (!isSelected()) {
-            context.setBackground(Frame.getUserPref().getBackGroundColor(fPrefId));
-            context.setForeground(Frame.getUserPref().getForeGroundColor(fPrefId));
+            context.setBackground(pref.getBackGroundColor(fPrefId));
+            context.setForeground(pref.getForeGroundColor(fPrefId));
         }
         super.draw(context);
     }
This page took 0.028964 seconds and 5 git commands to generate.