ASSIGNED - bug 285337: Support Model Unit Testing and Execution Results.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285337
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelViewManager.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelViewManager.java
index 2ac12b8..9ff5009 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelViewManager.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelViewManager.java
@@ -87,11 +87,13 @@
         }
 
         public void partClosed(final IWorkbenchPart part) {
-            new Thread() {
-                public void run() {
-                    removed((IViewPart) part);
-                }
-            }.start();
+            if (part instanceof IModelPart && ((IModelPart) part).getAdapter(IModel.class) != null) {
+                new Thread() {
+                    public void run() {
+                        removed((IViewPart) part);
+                    }
+                }.start();
+            }
         }
 
         public void partDeactivated(IWorkbenchPart part) {
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/StatusLineView.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/StatusLineView.java
index 8fef063..2b832cd 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/StatusLineView.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/StatusLineView.java
@@ -17,6 +17,7 @@
 

 import org.eclipse.amp.axf.core.IModel;

 import org.eclipse.amp.axf.core.IObservationProvider;

+import org.eclipse.amp.axf.ide.AXFWorkbenchPlugin;

 import org.eclipse.amp.axf.view.SWTAsyncModelListener;

 import org.eclipse.ui.IActionBars;

 import org.eclipse.ui.IPartListener;

@@ -40,6 +41,7 @@
      */

     private StatusLineView() {

         super(null, "Status Line View", 100);

+        setWaitForUpdate(false);

     }

 

     /**

@@ -64,19 +66,20 @@
      */

     public void update(IModel model) {

         // IViewPart viewPart = (IViewPart) part.getAdapter(IViewPart.class);

-

-        String msg = model.getName();

-        msg += " " + model.getTimeDescription();

-        if (model.getEngine().isPaused()) {

-            msg += " [PAUSED]";

-        } else {

-            msg += " " + model.getEngine().getUpdateGranularity();

+        if (model == AXFWorkbenchPlugin.getDefault().getManager().getActiveModel()) {

+            String msg = model.getName();

+            msg += " " + model.getTimeDescription();

+            if (model.getEngine().isPaused()) {

+                msg += " [PAUSED]";

+            } else {

+                msg += " " + model.getEngine().getUpdateGranularity();

+            }

+            updateMessage(msg);

         }

-        updateMessage(msg);

     }

 

-    private void updateMessage(String msg) {

-        if (part instanceof IViewPart) {

+    private void updateMessage(final String msg) {

+        if (part != null) {

             IViewSite site = (IViewSite) part.getSite();

             IActionBars actionBars = site.getActionBars();

             actionBars.getStatusLineManager().setMessage(msg);