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
old mode 100755 (executable)
new mode 100644 (file)
index 721abdc..9631704
@@ -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;
         }
 
@@ -764,27 +764,30 @@ public class SDView extends ViewPart {
         }
 
         IUml2SDLoader loader = LoadersManager.getInstance().getCurrentLoader(getViewSite().getId(), this);
+        if (loader == null) {
+            return;
+        }
 
-        if ((loader != null) && (loader.getTitleString() != null)) {
+        if (loader.getTitleString() != null) {
             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;
@@ -835,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.025349 seconds and 5 git commands to generate.