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.views/src/org/eclipse/amp/axf/view/SWTAsyncModelListener.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.views/src/org/eclipse/amp/axf/view/SWTAsyncModelListener.java
index a39e805..cddd405 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.views/src/org/eclipse/amp/axf/view/SWTAsyncModelListener.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.views/src/org/eclipse/amp/axf/view/SWTAsyncModelListener.java
@@ -95,15 +95,15 @@
     public void stateChange(Object key, Object observed) {

         IModel model = (IModel) observed;

         if (!model.getEngine().isPaused()

-            && (System.currentTimeMillis() > lastUpdate + minTimeBetweenUpdates || model.getPeriod()

-                % ((TimeGranularity) model.getEngine().getUpdateGranularity()).getUpdateFrequency() == 0)) {

+                && (System.currentTimeMillis() > lastUpdate + minTimeBetweenUpdates || model.getPeriod()

+                        % ((TimeGranularity) model.getEngine().getUpdateGranularity()).getUpdateFrequency() == 0)) {

             updating = true;

             ReportingRunner runnable = new ReportingRunner((LifeCycleState) key, model);

             if (AXFViewPlugin.getDefault() != null) {

                 Display display = AXFViewPlugin.getDefault().getWorkbench().getDisplay();

                 if (!display.isDisposed()) {

                     display.asyncExec(runnable);

-                    while ((updating || painting && isWaitForPaint()) && (widget == null || !widget.isDisposed())) {

+                    while ((updating || painting) && isWaitForUpdate() && (widget == null || !widget.isDisposed())) {

                         try {

                             // Assume best case of 60fps + allow compute

                             Thread.sleep(5);

@@ -163,7 +163,7 @@
      * 

      * @param waitForPaint the new wait for paint

      */

-    public void setWaitForPaint(boolean waitForPaint) {

+    public void setWaitForUpdate(boolean waitForPaint) {

         this.waitForPaint = waitForPaint;

     }

 

@@ -172,7 +172,7 @@
      * 

      * @return true, if is wait for paint

      */

-    public boolean isWaitForPaint() {

+    public boolean isWaitForUpdate() {

         return waitForPaint;

     }

 }