tmf: Update copyright headers in tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / SDView.java
index 5c1671268f199742fba52e99b54c835021a139b6..963170488b199942e4ba8c58b95146fc0b706002 100644 (file)
@@ -1,16 +1,15 @@
 /**********************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * Copyright (c) 2011, 2012 Ericsson.
- *
+ * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- * IBM - Initial API and implementation
- * Bernd Hufmann - Updated for TMF
+ *     IBM - Initial API and implementation
+ *     Bernd Hufmann - Updated for TMF
  **********************************************************************/
+
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd;
 
 import java.util.Iterator;
@@ -56,6 +55,7 @@ import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDCollapseP
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDExtendedActionBarProvider;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFilterProvider;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFindProvider;
+import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDGraphNodeSupporter;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPropertiesProvider;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.IUml2SDLoader;
@@ -754,7 +754,7 @@ public class SDView extends ViewPart {
      * @param resetPosition boolean Flag whether to reset the position or not.
      */
     protected void setFrame(Frame frame, boolean resetPosition) {
-        if (fSdWidget == null) {
+        if (getSDWidget() == null) {
             return;
         }
 
@@ -772,22 +772,22 @@ public class SDView extends ViewPart {
             setContentDescription(loader.getTitleString());
         }
 
-        if (getSDWidget() != null) {
-            getSDWidget().setFrame(frame, resetPosition);
-        }
+        getSDWidget().setFrame(frame, resetPosition);
 
         if (fTimeCompressionBar != null) {
             fTimeCompressionBar.setFrame(frame);
         }
         updateCoolBar();
-        if (!frame.hasTimeInfo()) {
-            Composite parent = fTimeCompressionBar.getParent();
-            fTimeCompressionBar.setVisible(false);
-            parent.layout(true);
-        } else {
-            Composite parent = fTimeCompressionBar.getParent();
-            fTimeCompressionBar.setVisible(true);
-            parent.layout(true);
+        if (fTimeCompressionBar != null) {
+            if (!frame.hasTimeInfo()) {
+                Composite parent = fTimeCompressionBar.getParent();
+                fTimeCompressionBar.setVisible(false);
+                parent.layout(true);
+            } else {
+                Composite parent = fTimeCompressionBar.getParent();
+                fTimeCompressionBar.setVisible(true);
+                parent.layout(true);
+            }
         }
         IContributionItem shortKeysMenu = getViewSite().getActionBars().getMenuManager().find("org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers");//$NON-NLS-1$
         MenuManager shortKeys = (MenuManager) shortKeysMenu;
@@ -838,7 +838,8 @@ public class SDView extends ViewPart {
         getSDWidget().getDisplay().syncExec(new Runnable() {
             @Override
             public void run() {
-                if (getSDWidget() == null || getSDWidget().isDisposed()) {
+                if (getSDWidget() == null || getSDWidget().isDisposed() ||
+                        ((fTimeCompressionBar != null) && fTimeCompressionBar.isDisposed())) {
                     return;
                 }
                 setFrame(frame);
This page took 0.024763 seconds and 5 git commands to generate.