Fix line delimiters.
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/.classpath b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/.classpath
index 45f024e..304e861 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/.classpath
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<classpath>

-	<classpathentry kind="src" path="src"/>

-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>

-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

-	<classpathentry kind="output" path="bin"/>

-</classpath>

+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/about.html b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/about.html
index 65d4bc2..36d90ec 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/about.html
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

-<html xmlns="http://www.w3.org/1999/xhtml">

-<head>

-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>

-<title>About</title>

-</head>

-<body lang="EN-US">

-<h2>About This Content</h2>

- 

-<p>October 5, 2009</p>	

-<h3>License</h3>

-

-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

-indicated below, the Content is provided to you under the terms and conditions of the

-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 

-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.

-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>

-

-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

-apply to your use of any object code in the Content.  Check the Redistributor's license that was 

-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

-indicated below, the terms and conditions of the EPL still apply to any source code in the Content

-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>

-

-</body>

+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>October 5, 2009</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
 </html>
\ No newline at end of file
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.properties b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.properties
index af64af3..65bbcf8 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.properties
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.properties
@@ -1,32 +1,32 @@
-# /**

-#  * <copyright>

-#  *

-#  * Copyright (c) 2009 Metascape, LLC.

-#  * 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: 

-#  *   Metascape - Initial API and Implementation

-#  *

-#  * </copyright>

-#  *

-#  * $Id: plugin.properties

-#  */

-

-

-# ====================================================================

-# To code developer:

-#   Do NOT change the properties between this line and the

-#   "%%% END OF TRANSLATED PROPERTIES %%%" line.

-#   Make a new property name, append to the end of the file and change

-#   the code to use the new property.

-# ====================================================================

-

-# ====================================================================

-# %%% END OF TRANSLATED PROPERTIES %%%

-# ====================================================================

-

-pluginName = Agent eXecution Framework IDE Integration (Incubation)

-providerName = Eclipse Agent Modeling Platform

+# /**
+#  * <copyright>
+#  *
+#  * Copyright (c) 2009 Metascape, LLC.
+#  * 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: 
+#  *   Metascape - Initial API and Implementation
+#  *
+#  * </copyright>
+#  *
+#  * $Id: plugin.properties
+#  */
+
+
+# ====================================================================
+# To code developer:
+#   Do NOT change the properties between this line and the
+#   "%%% END OF TRANSLATED PROPERTIES %%%" line.
+#   Make a new property name, append to the end of the file and change
+#   the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = Agent eXecution Framework IDE Integration (Incubation)
+providerName = Eclipse Agent Modeling Platform
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.xml b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.xml
index ecd1284..66ee737 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.xml
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/plugin.xml
@@ -5,107 +5,107 @@
  <copyright>
  </copyright>
 
- $Id: plugin.xml,v 1.11 2010/04/19 04:47:20 mparker Exp $
+ $Id: plugin.xml,v 1.12 2010/08/04 01:54:43 mparker Exp $
 -->
 
 <plugin>
-    <extension

-          point="org.eclipse.ui.commands">

-       <category

-             description="Running and Exploring Models"

-             id="org.eclipse.amp.axf.ui"

-             name="Model Execution Engine">

-       </category>

-       <command

-             categoryId="org.eclipse.amp.axf.ui"

-             id="org.eclipse.amp.axf.ui.start"

-             name="Start">

-       </command>

-       <command

-             categoryId="org.eclipse.amp.axf.ui"

-             id="org.eclipse.amp.axf.ui.pause"

-             name="Pause">

-       </command>

-       <command

-             categoryId="org.eclipse.amp.axf.ui"

-             id="org.eclipse.amp.axf.ui.step"

-             name="Step">

+    <extension
+          point="org.eclipse.ui.commands">
+       <category
+             description="Running and Exploring Models"
+             id="org.eclipse.amp.axf.ui"
+             name="Model Execution Engine">
+       </category>
+       <command
+             categoryId="org.eclipse.amp.axf.ui"
+             id="org.eclipse.amp.axf.ui.start"
+             name="Start">
+       </command>
+       <command
+             categoryId="org.eclipse.amp.axf.ui"
+             id="org.eclipse.amp.axf.ui.pause"
+             name="Pause">
+       </command>
+       <command
+             categoryId="org.eclipse.amp.axf.ui"
+             id="org.eclipse.amp.axf.ui.step"
+             name="Step">
        </command>
        <command
              categoryId="org.eclipse.amp.axf.ui"
              id="org.eclipse.amp.axf.ui.resume"
              name="Resume">
-       </command>

-       <command

-             categoryId="org.eclipse.amp.axf.ui"

-             id="org.eclipse.amp.axf.ui.stop"

-             name="Stop">

-       </command>

-       <command

-             categoryId="org.eclipse.amp.axf.ui"

-             id="org.eclipse.amp.axf.ui.restart"

-             name="Restart">

-       </command>

-       <command

-             categoryId="org.eclipse.amp.axf.ui"

-             id="org.eclipse.amp.axf.ui.close"

-             name="Close">

-       </command>

-    </extension>

-    <extension

-          point="org.eclipse.ui.menus">

-       <menuContribution

-             locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">

-                <toolbar

+       </command>
+       <command
+             categoryId="org.eclipse.amp.axf.ui"
+             id="org.eclipse.amp.axf.ui.stop"
+             name="Stop">
+       </command>
+       <command
+             categoryId="org.eclipse.amp.axf.ui"
+             id="org.eclipse.amp.axf.ui.restart"
+             name="Restart">
+       </command>
+       <command
+             categoryId="org.eclipse.amp.axf.ui"
+             id="org.eclipse.amp.axf.ui.close"
+             name="Close">
+       </command>
+    </extension>
+    <extension
+          point="org.eclipse.ui.menus">
+       <menuContribution
+             locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
+                <toolbar
                       id="org.eclipse.amp.axf.ui.execute">
 
-                </toolbar>

-       </menuContribution>

-       <menuContribution

-             locationURI="menu:org.eclipse.ui.main.menu?after=additions">

-             <menu

-                   id="org.eclipse.amp.axf.ui.menu"

-                   label="Control">

+                </toolbar>
+       </menuContribution>
+       <menuContribution
+             locationURI="menu:org.eclipse.ui.main.menu?after=additions">
+             <menu
+                   id="org.eclipse.amp.axf.ui.menu"
+                   label="Control">
              <command
                    commandId="org.eclipse.amp.axf.ui.start"
                    disabledIcon="icons/dtool16/run_exc.gif"
                    icon="icons/etool16/run_exc.gif"
                    label="Start"
                    style="push"
-                   tooltip="Begin executing the model from time 0.">

-                <visibleWhen

-                      checkEnabled="false">

-                   <reference

-                         definitionId="org.eclipse.amp.axf.ui.active">

-                   </reference>

-                </visibleWhen>

-             </command>

+                   tooltip="Begin executing the model from time 0.">
+                <visibleWhen
+                      checkEnabled="false">
+                   <reference
+                         definitionId="org.eclipse.amp.axf.ui.active">
+                   </reference>
+                </visibleWhen>
+             </command>
              <command
                    commandId="org.eclipse.amp.axf.ui.restart"
                    icon="icons/etool16/run_restart.gif"
                    label="Restart"
                    style="push"
-                   tooltip="Stop the current run and begin a new one.">

-                <visibleWhen

-                      checkEnabled="false">

-                   <reference

-                         definitionId="org.eclipse.amp.axf.ui.active">

-                   </reference>

-                </visibleWhen>

-             </command>

+                   tooltip="Stop the current run and begin a new one.">
+                <visibleWhen
+                      checkEnabled="false">
+                   <reference
+                         definitionId="org.eclipse.amp.axf.ui.active">
+                   </reference>
+                </visibleWhen>
+             </command>
              <command
                    commandId="org.eclipse.amp.axf.ui.pause"
                    disabledIcon="icons/dtool16/run_pause.gif"
                    icon="icons/etool16/run_pause.gif"
                    label="Pause"
                    style="push"
-                   tooltip="Temporarily suspend model execution.">

-                <visibleWhen

-                      checkEnabled="false">

-                   <reference

-                         definitionId="org.eclipse.amp.axf.ui.active">

-                   </reference>

-                </visibleWhen>

+                   tooltip="Temporarily suspend model execution.">
+                <visibleWhen
+                      checkEnabled="false">
+                   <reference
+                         definitionId="org.eclipse.amp.axf.ui.active">
+                   </reference>
+                </visibleWhen>
              </command>
              <command
                    commandId="org.eclipse.amp.axf.ui.step"
@@ -120,50 +120,50 @@
                          definitionId="org.eclipse.amp.axf.ui.active">
                    </reference>
                 </visibleWhen>
-             </command>

+             </command>
              <command
                    commandId="org.eclipse.amp.axf.ui.resume"
                    disabledIcon="icons/dtool16/run_resume.gif"
                    icon="icons/etool16/run_resume.gif"
                    label="Resume"
                    style="push"
-                   tooltip="Resume the active model.">

-                <visibleWhen

-                      checkEnabled="false">

-                   <reference

-                         definitionId="org.eclipse.amp.axf.ui.active">

-                   </reference>

-                </visibleWhen>

-             </command>

+                   tooltip="Resume the active model.">
+                <visibleWhen
+                      checkEnabled="false">
+                   <reference
+                         definitionId="org.eclipse.amp.axf.ui.active">
+                   </reference>
+                </visibleWhen>
+             </command>
              <command
                    commandId="org.eclipse.amp.axf.ui.stop"
                    disabledIcon="icons/dtool16/run_stop.gif"
                    icon="icons/etool16/run_stop.gif"
                    label="Stop"
                    style="push"
-                   tooltip="Stop executing the current model. You will not be able to continue executing the same model.">

-                <visibleWhen

-                      checkEnabled="false">

-                   <reference

-                         definitionId="org.eclipse.amp.axf.ui.active">

-                   </reference>

-                </visibleWhen>

-             </command>

+                   tooltip="Stop executing the current model. You will not be able to continue executing the same model.">
+                <visibleWhen
+                      checkEnabled="false">
+                   <reference
+                         definitionId="org.eclipse.amp.axf.ui.active">
+                   </reference>
+                </visibleWhen>
+             </command>
              <command
                    commandId="org.eclipse.amp.axf.ui.close"
                    disabledIcon="icons/dtool16/run_close.gif"
                    icon="icons/etool16/run_close.gif"
                    label="Close"
                    style="push"
-                   tooltip="Close the model. If no models remain excuting, the model exection session will end.">

-                <visibleWhen

-                      checkEnabled="false">

-                   <reference

-                         definitionId="org.eclipse.amp.axf.ui.active">

-                   </reference>

-                </visibleWhen>

-             </command>

-             </menu>

+                   tooltip="Close the model. If no models remain excuting, the model exection session will end.">
+                <visibleWhen
+                      checkEnabled="false">
+                   <reference
+                         definitionId="org.eclipse.amp.axf.ui.active">
+                   </reference>
+                </visibleWhen>
+             </command>
+             </menu>
        </menuContribution>
        <menuContribution
              locationURI="toolbar:org.eclipse.amp.axf.ui.execute">
@@ -267,47 +267,47 @@
                       </reference>
                    </visibleWhen>
                 </control>
-                       </menuContribution>

-    </extension>

- <extension point="org.eclipse.core.expressions.definitions">

-      <definition

-            id="org.eclipse.amp.axf.ui.active">

-         <with

-               variable="activeContexts">

-            <iterate

-                  operator="or">

-               <equals

-                     value="org.eclipse.amp.axf.executionContext">

-               </equals>

-            </iterate>

-         </with>

-      </definition>

-   </extension> 

-  <extension

+                       </menuContribution>
+    </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+      <definition
+            id="org.eclipse.amp.axf.ui.active">
+         <with
+               variable="activeContexts">
+            <iterate
+                  operator="or">
+               <equals
+                     value="org.eclipse.amp.axf.executionContext">
+               </equals>
+            </iterate>
+         </with>
+      </definition>
+   </extension> 
+  <extension
          point="org.eclipse.ui.bindings">
       <key
             commandId="org.eclipse.amp.axf.ui.start"
             contextId="org.eclipse.amp.axf.activeEditorContext"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
             sequence="M2+M3+.">
-      </key>

-      <key

-            commandId="org.eclipse.amp.axf.ui.restart"

-            contextId="org.eclipse.amp.axf.activeEditorContext"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M2+M3+,">

+      </key>
+      <key
+            commandId="org.eclipse.amp.axf.ui.restart"
+            contextId="org.eclipse.amp.axf.activeEditorContext"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M2+M3+,">
       </key>
       <key
             commandId="org.eclipse.amp.axf.ui.pause"
             contextId="org.eclipse.amp.axf.activeEditorContext"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
             sequence="M2+M3+K">
-      </key>

-      <key

-            commandId="org.eclipse.amp.axf.ui.resume"

-            contextId="org.eclipse.amp.axf.activeEditorContext"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M2+M3+L">

+      </key>
+      <key
+            commandId="org.eclipse.amp.axf.ui.resume"
+            contextId="org.eclipse.amp.axf.activeEditorContext"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M2+M3+L">
       </key>
       <key
             commandId="org.eclipse.amp.axf.ui.step"
@@ -315,19 +315,19 @@
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
             sequence="M2+M3+SPACE">
       </key>
-    </extension>

-  <extension

-        point="org.eclipse.ui.contexts">

-     <context

-           description="Executing model within Eclipse"

-           id="org.eclipse.amp.axf.executionContext"

-           name="Model Executing"

-           parentId="org.eclipse.ui.contexts.window">

-     </context>

-     <context

-           id="org.eclipse.amp.axf.activeEditorContext"

-           name="Model View">

-     </context>

+    </extension>
+  <extension
+        point="org.eclipse.ui.contexts">
+     <context
+           description="Executing model within Eclipse"
+           id="org.eclipse.amp.axf.executionContext"
+           name="Model Executing"
+           parentId="org.eclipse.ui.contexts.window">
+     </context>
+     <context
+           id="org.eclipse.amp.axf.activeEditorContext"
+           name="Model View">
+     </context>
   </extension>
 
   <extension
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/AbstractModelWorkbenchListener.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/AbstractModelWorkbenchListener.java
index 1018d42..c28864f 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/AbstractModelWorkbenchListener.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/AbstractModelWorkbenchListener.java
@@ -1,71 +1,71 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-

-package org.eclipse.amp.axf.ide;

-

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

-import org.eclipse.ui.IWorkbenchPart;

-

-/**

- * 

- * @author mparker

- *

- */

-public class AbstractModelWorkbenchListener implements IModelWorkbenchListener {

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelActivated(IModel)

-     */

-    public void modelActivated(IModel model) {

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelAdded(IModel)

-     */

-    public void modelAdded(IModel model) {

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelRemoved(IModel)

-     */

-    public void modelRemoved(IModel model) {

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewActivated(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void viewActivated(IWorkbenchPart part) {

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewAdded(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void viewAdded(IWorkbenchPart part) {

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewRemoved(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void viewRemoved(IWorkbenchPart part) {

-    }

-

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.axf.ide;
+
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * 
+ * @author mparker
+ *
+ */
+public class AbstractModelWorkbenchListener implements IModelWorkbenchListener {
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelActivated(IModel)
+     */
+    public void modelActivated(IModel model) {
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelAdded(IModel)
+     */
+    public void modelAdded(IModel model) {
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelRemoved(IModel)
+     */
+    public void modelRemoved(IModel model) {
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewActivated(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void viewActivated(IWorkbenchPart part) {
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewAdded(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void viewAdded(IWorkbenchPart part) {
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewRemoved(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void viewRemoved(IWorkbenchPart part) {
+    }
+
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ExecutionPerspectiveFactory.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ExecutionPerspectiveFactory.java
index c13ad77..3fe9a92 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ExecutionPerspectiveFactory.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ExecutionPerspectiveFactory.java
@@ -1,35 +1,35 @@
-/**

- * 

- */

-package org.eclipse.amp.axf.ide;

-

-import org.eclipse.ui.IPageLayout;

-import org.eclipse.ui.IPerspectiveFactory;

-

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class ExecutionPerspectiveFactory.

- * 

- * @author Miles Parker

- */

-public class ExecutionPerspectiveFactory implements IPerspectiveFactory {

-

-    /*

-     * (non-Javadoc)

-     * @see

-     * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui

-     * .IPageLayout)

-     */

-    /**

-     * @param layout

-     * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)

-     */

-    public void createInitialLayout(IPageLayout layout) {

-        layout.setEditorAreaVisible(false);

-//        layout.addPlaceholder("org.eclipse.amp.escape.view.GraphicsView:S0", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");

-//        layout.addPlaceholder("org.eclipse.amp.view.GEFView:S0", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");

-//        layout.addPlaceholder("org.eclipse.amp.view.GEFView:S1", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");

-//        layout.addPlaceholder("org.eclipse.amp.view.GEFView:S2", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");

-    }

-}

+/**
+ * 
+ */
+package org.eclipse.amp.axf.ide;
+
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ExecutionPerspectiveFactory.
+ * 
+ * @author Miles Parker
+ */
+public class ExecutionPerspectiveFactory implements IPerspectiveFactory {
+
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui
+     * .IPageLayout)
+     */
+    /**
+     * @param layout
+     * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+     */
+    public void createInitialLayout(IPageLayout layout) {
+        layout.setEditorAreaVisible(false);
+//        layout.addPlaceholder("org.eclipse.amp.escape.view.GraphicsView:S0", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");
+//        layout.addPlaceholder("org.eclipse.amp.view.GEFView:S0", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");
+//        layout.addPlaceholder("org.eclipse.amp.view.GEFView:S1", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");
+//        layout.addPlaceholder("org.eclipse.amp.view.GEFView:S2", IPageLayout.RIGHT, .5f, "org.eclipse.jdt.ui.PackageExplorer");
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/HandlerManager.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/HandlerManager.java
index ae17d0f..ae85b95 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/HandlerManager.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/HandlerManager.java
@@ -1,73 +1,73 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-

-package org.eclipse.amp.axf.ide;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.amp.axf.ide.handlers.ModelRunHandler;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.ui.handlers.IHandlerActivation;

-import org.eclipse.ui.handlers.IHandlerService;

-

-/**

- * 

- * @author mparker

- *

- */

-public class HandlerManager {

-

-    private IHandlerService handlerService;

-

-    private List<IHandlerActivation> handlerActivations;

-

-    private List<ModelRunHandler> handlers;

-

-    public synchronized void activate() {

-        handlerService = (IHandlerService) AXFWorkbenchPlugin.getDefault().getWorkbench()

-        .getService(IHandlerService.class);

-        handlerActivations = new ArrayList<IHandlerActivation>();

-        handlers = new ArrayList<ModelRunHandler>();

-    }

-

-    public synchronized void deactivate() {

-        if (handlerService != null) {

-            handlerService.deactivateHandlers(handlerActivations);

-        }

-    }

-

-    /**

-     * Adds the handler.

-     * 

-     * @param id the id

-     * @param handler the handler

-     */

-    protected synchronized void addHandler(String id, final ModelRunHandler handler) {

-        handlers.add(handler);

-        handlerActivations.add(handlerService.activateHandler(id, handler));

-    }

-

-    public synchronized void notifyHandlers() {

-        Display.getDefault().asyncExec(new Runnable() {

-            public void run() {

-                for (ModelRunHandler handler : handlers) {

-                    handler.notifyChange();

-                }

-            }

-        });

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.axf.ide;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.amp.axf.ide.handlers.ModelRunHandler;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.handlers.IHandlerActivation;
+import org.eclipse.ui.handlers.IHandlerService;
+
+/**
+ * 
+ * @author mparker
+ *
+ */
+public class HandlerManager {
+
+    private IHandlerService handlerService;
+
+    private List<IHandlerActivation> handlerActivations;
+
+    private List<ModelRunHandler> handlers;
+
+    public synchronized void activate() {
+        handlerService = (IHandlerService) AXFWorkbenchPlugin.getDefault().getWorkbench()
+        .getService(IHandlerService.class);
+        handlerActivations = new ArrayList<IHandlerActivation>();
+        handlers = new ArrayList<ModelRunHandler>();
+    }
+
+    public synchronized void deactivate() {
+        if (handlerService != null) {
+            handlerService.deactivateHandlers(handlerActivations);
+        }
+    }
+
+    /**
+     * Adds the handler.
+     * 
+     * @param id the id
+     * @param handler the handler
+     */
+    protected synchronized void addHandler(String id, final ModelRunHandler handler) {
+        handlers.add(handler);
+        handlerActivations.add(handlerService.activateHandler(id, handler));
+    }
+
+    public synchronized void notifyHandlers() {
+        Display.getDefault().asyncExec(new Runnable() {
+            public void run() {
+                for (ModelRunHandler handler : handlers) {
+                    handler.notifyChange();
+                }
+            }
+        });
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/LifeCycleListeners.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/LifeCycleListeners.java
index b1e02ec..893be6d 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/LifeCycleListeners.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/LifeCycleListeners.java
@@ -1,65 +1,65 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-

-package org.eclipse.amp.axf.ide;

-

-import java.util.ArrayList;

-import java.util.List;

-

-import org.eclipse.amp.axf.core.ILifeCycleListener;

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

-

-/**

- * 

- * @author mparker

- *

- */

-public class LifeCycleListeners {

-

-    List<ILifeCycleListener> workbenchListeners = new ArrayList<ILifeCycleListener>();

-

-    public void replaceModel(IModel oldModel, IModel newModel) {

-        if (oldModel != null) {

-            for (final ILifeCycleListener listener : workbenchListeners) {

-                oldModel.removeModelListener(listener);

-            }

-        }

-        if (newModel != null) {

-            for (final ILifeCycleListener listener : workbenchListeners) {

-                newModel.addModelListener(listener);

-                // listener.modelAdded(newModel);

-            }

-        }

-    }

-

-    /**

-     * Adds the workbench listener.

-     * 

-     * @param listener the listener

-     */

-    public synchronized void addListener(ILifeCycleListener listener) {

-        workbenchListeners.add(listener);

-    }

-

-    /**

-     * Removes the workbench listener.

-     * 

-     * @param listener the listener

-     */

-    public synchronized void removeListener(ILifeCycleListener listener) {

-        workbenchListeners.remove(listener);

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.axf.ide;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.amp.axf.core.ILifeCycleListener;
+import org.eclipse.amp.axf.core.IModel;
+
+/**
+ * 
+ * @author mparker
+ *
+ */
+public class LifeCycleListeners {
+
+    List<ILifeCycleListener> workbenchListeners = new ArrayList<ILifeCycleListener>();
+
+    public void replaceModel(IModel oldModel, IModel newModel) {
+        if (oldModel != null) {
+            for (final ILifeCycleListener listener : workbenchListeners) {
+                oldModel.removeModelListener(listener);
+            }
+        }
+        if (newModel != null) {
+            for (final ILifeCycleListener listener : workbenchListeners) {
+                newModel.addModelListener(listener);
+                // listener.modelAdded(newModel);
+            }
+        }
+    }
+
+    /**
+     * Adds the workbench listener.
+     * 
+     * @param listener the listener
+     */
+    public synchronized void addListener(ILifeCycleListener listener) {
+        workbenchListeners.add(listener);
+    }
+
+    /**
+     * Removes the workbench listener.
+     * 
+     * @param listener the listener
+     */
+    public synchronized void removeListener(ILifeCycleListener listener) {
+        workbenchListeners.remove(listener);
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelManagerListeners.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelManagerListeners.java
index f9f884b..30ae5a0 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelManagerListeners.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/ModelManagerListeners.java
@@ -1,106 +1,106 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-

-package org.eclipse.amp.axf.ide;

-

-import java.util.ArrayList;

-import java.util.List;

-

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

-import org.eclipse.ui.IViewPart;

-

-public class ModelManagerListeners {

-

-    List<IModelWorkbenchListener> manangerListeners = new ArrayList<IModelWorkbenchListener>();

-    /**

-     * @param modelViewManager

-     */

-    ModelManagerListeners() {

-    }

-

-    /**

-     * Adds the model manager listener.

-     * 

-     * @param listener the listener

-     */

-    public synchronized void addModelManagerListener(IModelWorkbenchListener listener) {

-        manangerListeners.add(listener);

-    }

-

-    /**

-     * Removes the model manager listener.

-     * 

-     * @param listener the listener

-     */

-    public synchronized void removeModelManagerListener(IModelWorkbenchListener listener) {

-        manangerListeners.remove(listener);

-    }

-

-    /**

-     * Notify view added.

-     * 

-     * @param showViewPart the show view part

-     */

-    protected synchronized void notifyViewAdded(final IViewPart showViewPart) {

-        for (IModelWorkbenchListener viewListener : manangerListeners) {

-            viewListener.viewAdded(showViewPart);

-        }

-    };

-

-    /**

-     * Notify view removed.

-     * 

-     * @param showViewPart the show view part

-     */

-    protected synchronized void notifyViewRemoved(final IViewPart showViewPart) {

-        for (IModelWorkbenchListener viewListener : manangerListeners) {

-            viewListener.viewRemoved(showViewPart);

-        }

-    };

-

-    /**

-     * Notify view removed.

-     * 

-     * @param showViewPart the show view part

-     */

-    protected synchronized void notifyModelActivated(final IModel model) {

-        for (IModelWorkbenchListener viewListener : manangerListeners) {

-            viewListener.modelActivated(model);

-        }

-    };

-

-    /**

-     * Notify view removed.

-     * 

-     * @param showViewPart the show view part

-     */

-    protected synchronized void notifyModelAdded(final IModel model) {

-        for (IModelWorkbenchListener viewListener : manangerListeners) {

-            viewListener.modelAdded(model);

-        }

-    };

-

-    /**

-     * Notify view removed.

-     * 

-     * @param showViewPart the show view part

-     */

-    protected synchronized void notifyModelRemoved(final IModel model) {

-        for (IModelWorkbenchListener viewListener : manangerListeners) {

-            viewListener.modelRemoved(model);

-        }

-    };

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.axf.ide;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.ui.IViewPart;
+
+public class ModelManagerListeners {
+
+    List<IModelWorkbenchListener> manangerListeners = new ArrayList<IModelWorkbenchListener>();
+    /**
+     * @param modelViewManager
+     */
+    ModelManagerListeners() {
+    }
+
+    /**
+     * Adds the model manager listener.
+     * 
+     * @param listener the listener
+     */
+    public synchronized void addModelManagerListener(IModelWorkbenchListener listener) {
+        manangerListeners.add(listener);
+    }
+
+    /**
+     * Removes the model manager listener.
+     * 
+     * @param listener the listener
+     */
+    public synchronized void removeModelManagerListener(IModelWorkbenchListener listener) {
+        manangerListeners.remove(listener);
+    }
+
+    /**
+     * Notify view added.
+     * 
+     * @param showViewPart the show view part
+     */
+    protected synchronized void notifyViewAdded(final IViewPart showViewPart) {
+        for (IModelWorkbenchListener viewListener : manangerListeners) {
+            viewListener.viewAdded(showViewPart);
+        }
+    };
+
+    /**
+     * Notify view removed.
+     * 
+     * @param showViewPart the show view part
+     */
+    protected synchronized void notifyViewRemoved(final IViewPart showViewPart) {
+        for (IModelWorkbenchListener viewListener : manangerListeners) {
+            viewListener.viewRemoved(showViewPart);
+        }
+    };
+
+    /**
+     * Notify view removed.
+     * 
+     * @param showViewPart the show view part
+     */
+    protected synchronized void notifyModelActivated(final IModel model) {
+        for (IModelWorkbenchListener viewListener : manangerListeners) {
+            viewListener.modelActivated(model);
+        }
+    };
+
+    /**
+     * Notify view removed.
+     * 
+     * @param showViewPart the show view part
+     */
+    protected synchronized void notifyModelAdded(final IModel model) {
+        for (IModelWorkbenchListener viewListener : manangerListeners) {
+            viewListener.modelAdded(model);
+        }
+    };
+
+    /**
+     * Notify view removed.
+     * 
+     * @param showViewPart the show view part
+     */
+    protected synchronized void notifyModelRemoved(final IModel model) {
+        for (IModelWorkbenchListener viewListener : manangerListeners) {
+            viewListener.modelRemoved(model);
+        }
+    };
 }
\ No newline at end of file
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/CloseHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/CloseHandler.java
index 224a9d6..6127b41 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/CloseHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/CloseHandler.java
@@ -1,41 +1,41 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class CloseHandler.

- */

-public class CloseHandler extends ModelRunHandler {

-

-    /**

-     * Instantiates a new close handler.

-     */

-    public CloseHandler() {

-        super(EngineControl.CLOSE);

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()

-     */

-    public boolean isEnabled() {

-        return super.isEnabled() || getRunner() != null && getRunner().getModelThread() != null

-            && getRunner().getModelThread().isAlive();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CloseHandler.
+ */
+public class CloseHandler extends ModelRunHandler {
+
+    /**
+     * Instantiates a new close handler.
+     */
+    public CloseHandler() {
+        super(EngineControl.CLOSE);
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()
+     */
+    public boolean isEnabled() {
+        return super.isEnabled() || getRunner() != null && getRunner().getModelThread() != null
+            && getRunner().getModelThread().isAlive();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ModelRunHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ModelRunHandler.java
index b0e9cc3..44c01e1 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ModelRunHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ModelRunHandler.java
@@ -1,165 +1,165 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-import org.eclipse.amp.axf.core.IEngine;

-import org.eclipse.amp.axf.core.ILifeCycleListener;

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

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

-import org.eclipse.amp.axf.core.IStateListener;

-import org.eclipse.amp.axf.core.LifecycleObservationAdapter;

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

-import org.eclipse.amp.axf.ide.IModelWorkbenchListener;

-import org.eclipse.amp.axf.ide.ModelViewManager;

-import org.eclipse.core.commands.AbstractHandler;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.commands.ExecutionException;

-import org.eclipse.core.commands.HandlerEvent;

-import org.eclipse.ui.IWorkbench;

-import org.eclipse.ui.IWorkbenchPart;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class ModelRunHandler.

- */

-public abstract class ModelRunHandler extends AbstractHandler implements ILifeCycleListener, IModelWorkbenchListener {

-

-

-    private IModel model;

-

-    private EngineControl control;

-

-    private IStateListener delegate;

-

-    /**

-     * Instantiates a new model run handler.

-     * 

-     * @param control the control

-     */

-    public ModelRunHandler(EngineControl control) {

-        this.control = control;

-        delegate = new LifecycleObservationAdapter(this);

-    }

-

-    /**

-     * @param event

-     * @return

-     * @throws ExecutionException

-     * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)

-     */

-    public Object execute(ExecutionEvent event) throws ExecutionException {

-        getRunner().control(control);

-        final ModelViewManager manager = AXFWorkbenchPlugin.getDefault().getManager();

-        manager.getHandlers().notifyHandlers();

-        // new Thread() {

-        // public void run() {

-        // if (manager.getManagerViewPart() != null) {

-        // manager.getManagerViewPart().refreshViewer();

-        // }

-        // };

-        // }.start();

-        return null;

-    }

-

-    /**

-     * Gets the runner.

-     * 

-     * @return the runner

-     */

-    public IEngine getRunner() {

-        return model != null ? model.getEngine() : null;

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.core.commands.AbstractHandler#isEnabled()

-     */

-    public boolean isEnabled() {

-        return getRunner() != null && !getRunner().isCloseRequested();

-    }

-

-    /**

-     * Notify change.

-     */

-    public void notifyChange() {

-        // its possible we've already left workbench

-        if (AXFWorkbenchPlugin.getDefault() != null) {

-            IWorkbench workbench = AXFWorkbenchPlugin.getDefault().getWorkbench();

-            if (model != null && workbench.getDisplay() != null && !workbench.getDisplay().isDisposed()) {

-                workbench.getDisplay().asyncExec(new Runnable() {

-                    public void run() {

-                        fireHandlerChanged(new HandlerEvent(ModelRunHandler.this, true, false));

-                    }

-                });

-            }

-        }

-    }

-

-    public synchronized void observing(IObservationProvider model) {

-        this.model = (IModel) model;

-    }

-

-    public synchronized void observationEnd(IObservationProvider model) {

-        // we may have a lagging model notification from another model

-        if (model == this.model) {

-            this.model = null;

-        }

-    }

-

-    public void stateChange(Object key, Object updated) {

-        delegate.stateChange(key, updated);

-        notifyChange();

-    }

-

-    public synchronized void modelActivated(IModel model) {

-        this.model = model;

-        notifyChange();

-    }

-

-    public void modelAdded(IModel model) {

-    }

-

-    public void modelRemoved(IModel model) {

-    }

-

-    public void viewActivated(IWorkbenchPart part) {

-    }

-

-    public void viewAdded(IWorkbenchPart part) {

-    }

-

-    public void viewRemoved(IWorkbenchPart part) {

-    }

-

-    public void observationEnding(IObservationProvider observed) {

-    }

-

-    public void observeCreate(IObservationProvider observed) {

-    }

-

-    public void observeInitialize(IObservationProvider observed) {

-    }

-

-    public void observeStart(IObservationProvider observed) {

-    }

-

-    public void observeStop(IObservationProvider observed) {

-    }

-

-    public void observeUpdate(IObservationProvider observed) {

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+import org.eclipse.amp.axf.core.IEngine;
+import org.eclipse.amp.axf.core.ILifeCycleListener;
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.amp.axf.core.IObservationProvider;
+import org.eclipse.amp.axf.core.IStateListener;
+import org.eclipse.amp.axf.core.LifecycleObservationAdapter;
+import org.eclipse.amp.axf.ide.AXFWorkbenchPlugin;
+import org.eclipse.amp.axf.ide.IModelWorkbenchListener;
+import org.eclipse.amp.axf.ide.ModelViewManager;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.HandlerEvent;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPart;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ModelRunHandler.
+ */
+public abstract class ModelRunHandler extends AbstractHandler implements ILifeCycleListener, IModelWorkbenchListener {
+
+
+    private IModel model;
+
+    private EngineControl control;
+
+    private IStateListener delegate;
+
+    /**
+     * Instantiates a new model run handler.
+     * 
+     * @param control the control
+     */
+    public ModelRunHandler(EngineControl control) {
+        this.control = control;
+        delegate = new LifecycleObservationAdapter(this);
+    }
+
+    /**
+     * @param event
+     * @return
+     * @throws ExecutionException
+     * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+     */
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        getRunner().control(control);
+        final ModelViewManager manager = AXFWorkbenchPlugin.getDefault().getManager();
+        manager.getHandlers().notifyHandlers();
+        // new Thread() {
+        // public void run() {
+        // if (manager.getManagerViewPart() != null) {
+        // manager.getManagerViewPart().refreshViewer();
+        // }
+        // };
+        // }.start();
+        return null;
+    }
+
+    /**
+     * Gets the runner.
+     * 
+     * @return the runner
+     */
+    public IEngine getRunner() {
+        return model != null ? model.getEngine() : null;
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+     */
+    public boolean isEnabled() {
+        return getRunner() != null && !getRunner().isCloseRequested();
+    }
+
+    /**
+     * Notify change.
+     */
+    public void notifyChange() {
+        // its possible we've already left workbench
+        if (AXFWorkbenchPlugin.getDefault() != null) {
+            IWorkbench workbench = AXFWorkbenchPlugin.getDefault().getWorkbench();
+            if (model != null && workbench.getDisplay() != null && !workbench.getDisplay().isDisposed()) {
+                workbench.getDisplay().asyncExec(new Runnable() {
+                    public void run() {
+                        fireHandlerChanged(new HandlerEvent(ModelRunHandler.this, true, false));
+                    }
+                });
+            }
+        }
+    }
+
+    public synchronized void observing(IObservationProvider model) {
+        this.model = (IModel) model;
+    }
+
+    public synchronized void observationEnd(IObservationProvider model) {
+        // we may have a lagging model notification from another model
+        if (model == this.model) {
+            this.model = null;
+        }
+    }
+
+    public void stateChange(Object key, Object updated) {
+        delegate.stateChange(key, updated);
+        notifyChange();
+    }
+
+    public synchronized void modelActivated(IModel model) {
+        this.model = model;
+        notifyChange();
+    }
+
+    public void modelAdded(IModel model) {
+    }
+
+    public void modelRemoved(IModel model) {
+    }
+
+    public void viewActivated(IWorkbenchPart part) {
+    }
+
+    public void viewAdded(IWorkbenchPart part) {
+    }
+
+    public void viewRemoved(IWorkbenchPart part) {
+    }
+
+    public void observationEnding(IObservationProvider observed) {
+    }
+
+    public void observeCreate(IObservationProvider observed) {
+    }
+
+    public void observeInitialize(IObservationProvider observed) {
+    }
+
+    public void observeStart(IObservationProvider observed) {
+    }
+
+    public void observeStop(IObservationProvider observed) {
+    }
+
+    public void observeUpdate(IObservationProvider observed) {
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/PauseHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/PauseHandler.java
index 96b24f5..25549ef 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/PauseHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/PauseHandler.java
@@ -1,41 +1,41 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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: 

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

-*/

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class PauseHandler.

- */

-public class PauseHandler extends ModelRunHandler {

-

-    /**

-     * Instantiates a new pause handler.

-     */

-    public PauseHandler() {

-        super(EngineControl.PAUSE);

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()

-     */

-    @Override

-    public boolean isEnabled() {

-        return super.isEnabled() && !getRunner().isPaused();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class PauseHandler.
+ */
+public class PauseHandler extends ModelRunHandler {
+
+    /**
+     * Instantiates a new pause handler.
+     */
+    public PauseHandler() {
+        super(EngineControl.PAUSE);
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()
+     */
+    @Override
+    public boolean isEnabled() {
+        return super.isEnabled() && !getRunner().isPaused();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/RestartHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/RestartHandler.java
index 750b98f..a5658a5 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/RestartHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/RestartHandler.java
@@ -1,41 +1,41 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class RestartHandler.

- */

-public class RestartHandler extends ModelRunHandler {

-

-    /**

-     * Instantiates a new restart handler.

-     */

-    public RestartHandler() {

-        super(EngineControl.RESTART);

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()

-     */

-    public boolean isEnabled() {

-        // TODO Auto-generated method stub

-        return super.isEnabled() && getRunner().isRunning();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RestartHandler.
+ */
+public class RestartHandler extends ModelRunHandler {
+
+    /**
+     * Instantiates a new restart handler.
+     */
+    public RestartHandler() {
+        super(EngineControl.RESTART);
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()
+     */
+    public boolean isEnabled() {
+        // TODO Auto-generated method stub
+        return super.isEnabled() && getRunner().isRunning();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ResumeHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ResumeHandler.java
index 7f3e3d6..5834cdf 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ResumeHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/ResumeHandler.java
@@ -1,42 +1,42 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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: 

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

-*/

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class ResumeHandler.

- */

-public class ResumeHandler extends ModelRunHandler {

-

-    /**

-     * Instantiates a new resume handler.

-     */

-    public ResumeHandler() {

-        super(EngineControl.RESUME);

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()

-     */

-    @Override

-    public boolean isEnabled() {

-        // TODO Auto-generated method stub

-        return super.isEnabled() && getRunner().isPaused();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ResumeHandler.
+ */
+public class ResumeHandler extends ModelRunHandler {
+
+    /**
+     * Instantiates a new resume handler.
+     */
+    public ResumeHandler() {
+        super(EngineControl.RESUME);
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()
+     */
+    @Override
+    public boolean isEnabled() {
+        // TODO Auto-generated method stub
+        return super.isEnabled() && getRunner().isPaused();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StartHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StartHandler.java
index a473cfa..4f179b8 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StartHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StartHandler.java
@@ -1,40 +1,40 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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: 

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

-*/

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class StartHandler.

- */

-public class StartHandler extends ModelRunHandler {

-

-    /**

-     * Instantiates a new start handler.

-     */

-    public StartHandler() {

-        super(EngineControl.START);

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()

-     */

-    public boolean isEnabled() {

-        return super.isEnabled() && !getRunner().isRunning();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class StartHandler.
+ */
+public class StartHandler extends ModelRunHandler {
+
+    /**
+     * Instantiates a new start handler.
+     */
+    public StartHandler() {
+        super(EngineControl.START);
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()
+     */
+    public boolean isEnabled() {
+        return super.isEnabled() && !getRunner().isRunning();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StepHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StepHandler.java
index c9b3698..57f60cb 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StepHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StepHandler.java
@@ -1,40 +1,40 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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: 

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

-*/

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class StepHandler.

- */

-public class StepHandler extends ModelRunHandler {

-

-    /**

-     * Instantiates a new step handler.

-     */

-    public StepHandler() {

-        super(EngineControl.STEP);

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()

-     */

-    public boolean isEnabled() {

-        return super.isEnabled() && getRunner().isRunning() && getRunner().isPaused();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class StepHandler.
+ */
+public class StepHandler extends ModelRunHandler {
+
+    /**
+     * Instantiates a new step handler.
+     */
+    public StepHandler() {
+        super(EngineControl.STEP);
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()
+     */
+    public boolean isEnabled() {
+        return super.isEnabled() && getRunner().isRunning() && getRunner().isPaused();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StopHandler.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StopHandler.java
index 925d8ed..7c2ea53 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StopHandler.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/handlers/StopHandler.java
@@ -1,40 +1,40 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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: 

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

-*/

-package org.eclipse.amp.axf.ide.handlers;

-

-import org.eclipse.amp.axf.core.EngineControl;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class StopHandler.

- */

-public class StopHandler extends ModelRunHandler {

-

-    /**

-     * Instantiates a new stop handler.

-     */

-    public StopHandler() {

-        super(EngineControl.STOP);

-    }

-

-    /**

-     * @return

-     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()

-     */

-    public boolean isEnabled() {

-        return super.isEnabled() && getRunner().isRunning();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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: 
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+*/
+package org.eclipse.amp.axf.ide.handlers;
+
+import org.eclipse.amp.axf.core.EngineControl;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class StopHandler.
+ */
+public class StopHandler extends ModelRunHandler {
+
+    /**
+     * Instantiates a new stop handler.
+     */
+    public StopHandler() {
+        super(EngineControl.STOP);
+    }
+
+    /**
+     * @return
+     * @see org.eclipse.amp.axf.ide.handlers.ModelRunHandler#isEnabled()
+     */
+    public boolean isEnabled() {
+        return super.isEnabled() && getRunner().isRunning();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ActiveModelViewPart.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ActiveModelViewPart.java
index d4c50f1..b7c67b9 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ActiveModelViewPart.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ActiveModelViewPart.java
@@ -1,76 +1,76 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-

-package org.eclipse.amp.axf.ide.view;

-

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

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

-import org.eclipse.amp.axf.ide.AbstractModelWorkbenchListener;

-import org.eclipse.amp.axf.ide.ModelViewManager;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.ui.part.ViewPart;

-

-/**

- * 

- * @author mparker

- *

- */

-public abstract class ActiveModelViewPart extends ViewPart {

-

-    /**

-     * @param parent

-     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)

-     */

-    public void createPartControl(Composite parent) {

-        new Thread() {

-            public void run() {

-                AXFWorkbenchPlugin default1 = AXFWorkbenchPlugin.getDefault();

-                while (default1 == null) {

-                    try {

-                        Thread.sleep(20);

-                    } catch (InterruptedException e) {

-                        throw new RuntimeException(e);

-                    }

-                    default1 = AXFWorkbenchPlugin.getDefault();

-                }

-                ModelViewManager manager = default1.getManager();

-                if (manager.getActiveModel() != null) {

-                    modelChanged((IModel) manager.getActiveModel());

-                }

-                manager.getManagerListeners().addModelManagerListener(new AbstractModelWorkbenchListener() {

-

-                    public void modelActivated(IModel model) {

-                        modelChanged(model);

-                    }

-

-                });

-            };

-        }.start();

-    }

-

-    /**

-     * @param activeModel

-     */

-    protected abstract void modelChanged(IModel activeModel);

-

-    /**

-     * 

-     * @see org.eclipse.ui.part.WorkbenchPart#setFocus()

-     */

-    public void setFocus() {

-    }

-

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.axf.ide.view;
+
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.amp.axf.ide.AXFWorkbenchPlugin;
+import org.eclipse.amp.axf.ide.AbstractModelWorkbenchListener;
+import org.eclipse.amp.axf.ide.ModelViewManager;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.ViewPart;
+
+/**
+ * 
+ * @author mparker
+ *
+ */
+public abstract class ActiveModelViewPart extends ViewPart {
+
+    /**
+     * @param parent
+     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createPartControl(Composite parent) {
+        new Thread() {
+            public void run() {
+                AXFWorkbenchPlugin default1 = AXFWorkbenchPlugin.getDefault();
+                while (default1 == null) {
+                    try {
+                        Thread.sleep(20);
+                    } catch (InterruptedException e) {
+                        throw new RuntimeException(e);
+                    }
+                    default1 = AXFWorkbenchPlugin.getDefault();
+                }
+                ModelViewManager manager = default1.getManager();
+                if (manager.getActiveModel() != null) {
+                    modelChanged((IModel) manager.getActiveModel());
+                }
+                manager.getManagerListeners().addModelManagerListener(new AbstractModelWorkbenchListener() {
+
+                    public void modelActivated(IModel model) {
+                        modelChanged(model);
+                    }
+
+                });
+            };
+        }.start();
+    }
+
+    /**
+     * @param activeModel
+     */
+    protected abstract void modelChanged(IModel activeModel);
+
+    /**
+     * 
+     * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+     */
+    public void setFocus() {
+    }
+
 }
\ No newline at end of file
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/DelayView.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/DelayView.java
index b5b17b6..d465f5a 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/DelayView.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/DelayView.java
@@ -1,44 +1,44 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-

-package org.eclipse.amp.axf.ide.view;

-

-import org.eclipse.amp.axf.core.AbstractLifecycleListener;

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

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

-import org.eclipse.amp.axf.time.TimeGranularity;

-

-/**

- * 

- * @author mparker

- *

- */

-public class DelayView extends AbstractLifecycleListener {

-

-    /**

-     * @param observed

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeUpdate(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    public void observeUpdate(IObservationProvider observed) {

-        long delayPeriod = ((TimeGranularity) ((IModel) observed).getEngine().getUpdateGranularity()).getUpdateDelay();

-        if (delayPeriod > 0) {

-            try {

-                Thread.sleep(delayPeriod);

-            } catch (InterruptedException e) {

-            }

-        }

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.axf.ide.view;
+
+import org.eclipse.amp.axf.core.AbstractLifecycleListener;
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.amp.axf.core.IObservationProvider;
+import org.eclipse.amp.axf.time.TimeGranularity;
+
+/**
+ * 
+ * @author mparker
+ *
+ */
+public class DelayView extends AbstractLifecycleListener {
+
+    /**
+     * @param observed
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeUpdate(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    public void observeUpdate(IObservationProvider observed) {
+        long delayPeriod = ((TimeGranularity) ((IModel) observed).getEngine().getUpdateGranularity()).getUpdateDelay();
+        if (delayPeriod > 0) {
+            try {
+                Thread.sleep(delayPeriod);
+            } catch (InterruptedException e) {
+            }
+        }
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/MonitorView.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/MonitorView.java
index 8ffa34b..99b82ff 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/MonitorView.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/MonitorView.java
@@ -1,54 +1,54 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-package org.eclipse.amp.axf.ide.view;

-

-import org.eclipse.amp.axf.core.AbstractLifecycleListener;

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

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

-import org.eclipse.core.runtime.IProgressMonitor;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class MonitorView.

- */

-public abstract class MonitorView extends AbstractLifecycleListener {

-

-    protected final IProgressMonitor monitor;

-

-    protected String modelDesc;

-

-    /**

-     * Instantiates a new monitor view.

-     * 

-     * @param monitor the monitor

-     * @param name the name

-     */

-    public MonitorView(IProgressMonitor monitor, String name) {

-        super(name);

-        this.monitor = monitor;

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observing(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    @Override

-    public void observing(IObservationProvider model) {

-        super.observing(model);

-        // TODO change to label provider

-        modelDesc = ((IModel) model).getName();

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.amp.axf.ide.view;
+
+import org.eclipse.amp.axf.core.AbstractLifecycleListener;
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.amp.axf.core.IObservationProvider;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MonitorView.
+ */
+public abstract class MonitorView extends AbstractLifecycleListener {
+
+    protected final IProgressMonitor monitor;
+
+    protected String modelDesc;
+
+    /**
+     * Instantiates a new monitor view.
+     * 
+     * @param monitor the monitor
+     * @param name the name
+     */
+    public MonitorView(IProgressMonitor monitor, String name) {
+        super(name);
+        this.monitor = monitor;
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observing(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    @Override
+    public void observing(IObservationProvider model) {
+        super.observing(model);
+        // TODO change to label provider
+        modelDesc = ((IModel) model).getName();
+    }
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/RunMonitorView.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/RunMonitorView.java
index 4fcd06c..905d0fd 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/RunMonitorView.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/RunMonitorView.java
@@ -1,112 +1,112 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-package org.eclipse.amp.axf.ide.view;

-

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

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

-import org.eclipse.core.runtime.IProgressMonitor;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class RunMonitorView.

- */

-public class RunMonitorView extends MonitorView {

-

-    public final static int TIME_BETWEEN_UPDATES = 500;

-

-    long lastUpdateTime = 0;

-

-    long lastUpdatePeriod = 0;

-

-    /**

-     * Instantiates a new run monitor view.

-     * 

-     * @param monitor the monitor

-     */

-    public RunMonitorView(IProgressMonitor monitor) {

-        super(monitor, "Run Monitor View");

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.ide.view.MonitorView#observing(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    @Override

-    public void observing(IObservationProvider model) {

-        super.observing(model);

-        String mainDesc = "Running " + modelDesc;

-        monitor.setTaskName(mainDesc);

-    }

-

-    /**

-     * @param key

-     * @param model

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#stateChange(java.lang.Object, java.lang.Object)

-     */

-    @Override

-    public void stateChange(Object key, Object model) {

-        super.stateChange(key, model);

-        if (monitor.isCanceled() && ((IModel) model).getEngine().isRunning()) {

-            ((IModel) model).getEngine().stop();

-        }

-    }

-

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeUpdate(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    @Override

-    public void observeUpdate(IObservationProvider observed) {

-        if (System.currentTimeMillis() - lastUpdateTime > TIME_BETWEEN_UPDATES) {

-            lastUpdateTime = System.currentTimeMillis();

-            IModel model = (IModel) observed;

-            monitor.subTask("Period " + model.getPeriod()

-                            + (model.getStopPeriod() > 0 ? " of " + model.getStopPeriod() : ""));

-            if (model.getStopPeriod() != Integer.MAX_VALUE) {

-                monitor.worked((int) (model.getPeriod() - lastUpdatePeriod));

-                lastUpdatePeriod = model.getPeriod();

-            } else {

-                monitor.worked(1);

-            }

-        }

-    }

-

-    /**

-     * @param observed

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStart(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    @Override

-    public void observeStart(IObservationProvider observed) {

-        IModel model = (IModel) observed;

-        monitor.beginTask("Run " + model.getName(), model.getStopPeriod() > 0

-                          && model.getStopPeriod() != Integer.MAX_VALUE ? model.getStopPeriod()

-                              : IProgressMonitor.UNKNOWN);

-        monitor.subTask("Started");

-        // monitor.worked();

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStop(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    @Override

-    public void observeStop(IObservationProvider model) {

-        monitor.subTask("Stopped");

-        monitor.done();

-    }

-

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.amp.axf.ide.view;
+
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.amp.axf.core.IObservationProvider;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RunMonitorView.
+ */
+public class RunMonitorView extends MonitorView {
+
+    public final static int TIME_BETWEEN_UPDATES = 500;
+
+    long lastUpdateTime = 0;
+
+    long lastUpdatePeriod = 0;
+
+    /**
+     * Instantiates a new run monitor view.
+     * 
+     * @param monitor the monitor
+     */
+    public RunMonitorView(IProgressMonitor monitor) {
+        super(monitor, "Run Monitor View");
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.ide.view.MonitorView#observing(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    @Override
+    public void observing(IObservationProvider model) {
+        super.observing(model);
+        String mainDesc = "Running " + modelDesc;
+        monitor.setTaskName(mainDesc);
+    }
+
+    /**
+     * @param key
+     * @param model
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#stateChange(java.lang.Object, java.lang.Object)
+     */
+    @Override
+    public void stateChange(Object key, Object model) {
+        super.stateChange(key, model);
+        if (monitor.isCanceled() && ((IModel) model).getEngine().isRunning()) {
+            ((IModel) model).getEngine().stop();
+        }
+    }
+
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeUpdate(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    @Override
+    public void observeUpdate(IObservationProvider observed) {
+        if (System.currentTimeMillis() - lastUpdateTime > TIME_BETWEEN_UPDATES) {
+            lastUpdateTime = System.currentTimeMillis();
+            IModel model = (IModel) observed;
+            monitor.subTask("Period " + model.getPeriod()
+                            + (model.getStopPeriod() > 0 ? " of " + model.getStopPeriod() : ""));
+            if (model.getStopPeriod() != Integer.MAX_VALUE) {
+                monitor.worked((int) (model.getPeriod() - lastUpdatePeriod));
+                lastUpdatePeriod = model.getPeriod();
+            } else {
+                monitor.worked(1);
+            }
+        }
+    }
+
+    /**
+     * @param observed
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStart(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    @Override
+    public void observeStart(IObservationProvider observed) {
+        IModel model = (IModel) observed;
+        monitor.beginTask("Run " + model.getName(), model.getStopPeriod() > 0
+                          && model.getStopPeriod() != Integer.MAX_VALUE ? model.getStopPeriod()
+                              : IProgressMonitor.UNKNOWN);
+        monitor.subTask("Started");
+        // monitor.worked();
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStop(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    @Override
+    public void observeStop(IObservationProvider model) {
+        monitor.subTask("Stopped");
+        monitor.done();
+    }
+
+}
diff --git a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ScaleGranularityControl.java b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ScaleGranularityControl.java
index e469951..35ac384 100644
--- a/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ScaleGranularityControl.java
+++ b/org.eclipse.amp.axf/plugins/org.eclipse.amp.axf.ide/src/org/eclipse/amp/axf/ide/view/ScaleGranularityControl.java
@@ -1,183 +1,183 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-

-package org.eclipse.amp.axf.ide.view;

-

-import org.eclipse.amp.axf.core.IEngine;

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

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

-import org.eclipse.amp.axf.ide.IModelWorkbenchListener;

-import org.eclipse.amp.axf.time.TimeGranularity;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.events.SelectionListener;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Display;

-import org.eclipse.swt.widgets.Scale;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.menus.WorkbenchWindowControlContribution;

-

-/**

- * 

- * @author mparker

- * 

- */

-public class ScaleGranularityControl extends WorkbenchWindowControlContribution implements IModelWorkbenchListener {

-

-    IEngine engine;

-

-    Scale scale;

-

-    private static int SCALE_MID = 50;

-

-    private static int SCALE_MAX = 110;

-

-    // Around the center area we want to have scale snap to middle.

-    private static int CENTER_RANGE = 5;

-

-    /**

-     * @param parent

-     * @return

-     * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)

-     */

-    protected Control createControl(Composite parent) {

-        scale = new Scale(parent, SWT.HORIZONTAL);

-        scale.setMaximum(SCALE_MAX);

-        scale.setSelection(SCALE_MID);

-        scale.addSelectionListener(new SelectionListener() {

-            public void widgetSelected(SelectionEvent e) {

-                scaleToEngineGranularity();

-            }

-

-            public void widgetDefaultSelected(SelectionEvent e) {

-            }

-        });

-        new Thread() {

-            public void run() {

-                AXFWorkbenchPlugin.getDefault().getManager().getManagerListeners()

-                .addModelManagerListener(ScaleGranularityControl.this);

-            };

-        }.start();

-        return scale;

-    }

-

-    private void scaleToEngineGranularity() {

-        if (Math.abs(scale.getSelection() - SCALE_MID) > CENTER_RANGE) {

-            if (scale.getSelection() == scale.getMaximum()) {

-                engine.setUpdateGranularity(TimeGranularity.createFrequencyGranularity(Integer.MAX_VALUE));

-            } else if (scale.getSelection() > SCALE_MID) {

-                engine.setUpdateGranularity(TimeGranularity.createFrequencyGranularity((scale.getSelection()

-                        - SCALE_MID - CENTER_RANGE) * 2));

-            } else {

-                if (scale.getSelection() > 0) {

-                    engine.setUpdateGranularity(TimeGranularity.createDelayGranularity((SCALE_MID - scale

-                            .getSelection()) * 50));

-                }

-            }

-        } else {

-            if (scale.getSelection() != SCALE_MID) {

-                // recursive call w/o blocking

-                setScaleSelection(SCALE_MID);

-            } else {

-                engine.setUpdateGranularity(TimeGranularity.DEFAULT_GRANULARITY);

-            }

-        }

-    }

-

-    /**

-     * 

-     */

-    private void engineGranularityToScale() {

-        if (engine.getUpdateGranularity() instanceof TimeGranularity) {

-            TimeGranularity granularity = (TimeGranularity) engine.getUpdateGranularity();

-            if (granularity.getUpdateDelay() > 0) {

-                setScaleSelection((int) (granularity.getUpdateDelay() / 50));

-            } else if (granularity.getUpdateFrequency() > 1) {

-                setScaleSelection((granularity.getUpdateFrequency() / 2 + SCALE_MID));

-            } else {

-                setScaleSelection(SCALE_MID);

-            }

-        }

-    }

-

-    protected void setScaleSelection(final int value) {

-        Display.getDefault().asyncExec(new Runnable() {

-            public void run() {

-                scale.setSelection(value);

-            }

-        });

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelActivated(IModel)

-     */

-    public void modelActivated(IModel model) {

-        if (model != null) {

-            Display.getDefault().asyncExec(new Runnable() {

-                public void run() {

-                    scale.setEnabled(true);

-                }

-            });

-            engine = model.getEngine();

-            engineGranularityToScale();

-        } else {

-            engine = null;

-            Display.getDefault().asyncExec(new Runnable() {

-                public void run() {

-                    scale.setEnabled(false);

-                }

-            });

-        }

-

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelAdded(IModel)

-     */

-    public void modelAdded(IModel model) {

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelRemoved(IModel)

-     */

-    public void modelRemoved(IModel model) {

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewActivated(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void viewActivated(IWorkbenchPart part) {

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewAdded(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void viewAdded(IWorkbenchPart part) {

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewRemoved(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void viewRemoved(IWorkbenchPart part) {

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.amp.axf.ide.view;
+
+import org.eclipse.amp.axf.core.IEngine;
+import org.eclipse.amp.axf.core.IModel;
+import org.eclipse.amp.axf.ide.AXFWorkbenchPlugin;
+import org.eclipse.amp.axf.ide.IModelWorkbenchListener;
+import org.eclipse.amp.axf.time.TimeGranularity;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Scale;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
+
+/**
+ * 
+ * @author mparker
+ * 
+ */
+public class ScaleGranularityControl extends WorkbenchWindowControlContribution implements IModelWorkbenchListener {
+
+    IEngine engine;
+
+    Scale scale;
+
+    private static int SCALE_MID = 50;
+
+    private static int SCALE_MAX = 110;
+
+    // Around the center area we want to have scale snap to middle.
+    private static int CENTER_RANGE = 5;
+
+    /**
+     * @param parent
+     * @return
+     * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    protected Control createControl(Composite parent) {
+        scale = new Scale(parent, SWT.HORIZONTAL);
+        scale.setMaximum(SCALE_MAX);
+        scale.setSelection(SCALE_MID);
+        scale.addSelectionListener(new SelectionListener() {
+            public void widgetSelected(SelectionEvent e) {
+                scaleToEngineGranularity();
+            }
+
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        new Thread() {
+            public void run() {
+                AXFWorkbenchPlugin.getDefault().getManager().getManagerListeners()
+                .addModelManagerListener(ScaleGranularityControl.this);
+            };
+        }.start();
+        return scale;
+    }
+
+    private void scaleToEngineGranularity() {
+        if (Math.abs(scale.getSelection() - SCALE_MID) > CENTER_RANGE) {
+            if (scale.getSelection() == scale.getMaximum()) {
+                engine.setUpdateGranularity(TimeGranularity.createFrequencyGranularity(Integer.MAX_VALUE));
+            } else if (scale.getSelection() > SCALE_MID) {
+                engine.setUpdateGranularity(TimeGranularity.createFrequencyGranularity((scale.getSelection()
+                        - SCALE_MID - CENTER_RANGE) * 2));
+            } else {
+                if (scale.getSelection() > 0) {
+                    engine.setUpdateGranularity(TimeGranularity.createDelayGranularity((SCALE_MID - scale
+                            .getSelection()) * 50));
+                }
+            }
+        } else {
+            if (scale.getSelection() != SCALE_MID) {
+                // recursive call w/o blocking
+                setScaleSelection(SCALE_MID);
+            } else {
+                engine.setUpdateGranularity(TimeGranularity.DEFAULT_GRANULARITY);
+            }
+        }
+    }
+
+    /**
+     * 
+     */
+    private void engineGranularityToScale() {
+        if (engine.getUpdateGranularity() instanceof TimeGranularity) {
+            TimeGranularity granularity = (TimeGranularity) engine.getUpdateGranularity();
+            if (granularity.getUpdateDelay() > 0) {
+                setScaleSelection((int) (granularity.getUpdateDelay() / 50));
+            } else if (granularity.getUpdateFrequency() > 1) {
+                setScaleSelection((granularity.getUpdateFrequency() / 2 + SCALE_MID));
+            } else {
+                setScaleSelection(SCALE_MID);
+            }
+        }
+    }
+
+    protected void setScaleSelection(final int value) {
+        Display.getDefault().asyncExec(new Runnable() {
+            public void run() {
+                scale.setSelection(value);
+            }
+        });
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelActivated(IModel)
+     */
+    public void modelActivated(IModel model) {
+        if (model != null) {
+            Display.getDefault().asyncExec(new Runnable() {
+                public void run() {
+                    scale.setEnabled(true);
+                }
+            });
+            engine = model.getEngine();
+            engineGranularityToScale();
+        } else {
+            engine = null;
+            Display.getDefault().asyncExec(new Runnable() {
+                public void run() {
+                    scale.setEnabled(false);
+                }
+            });
+        }
+
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelAdded(IModel)
+     */
+    public void modelAdded(IModel model) {
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#modelRemoved(IModel)
+     */
+    public void modelRemoved(IModel model) {
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewActivated(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void viewActivated(IWorkbenchPart part) {
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewAdded(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void viewAdded(IWorkbenchPart part) {
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.amp.axf.ide.IModelWorkbenchListener#viewRemoved(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void viewRemoved(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 b3b16d3..17e4c25 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
@@ -1,166 +1,166 @@
-/**

- * <copyright>

- *

- * Copyright (c) 2009 Metascape, LLC.

- * 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:

- *   Metascape - Initial API and Implementation

- *

- * </copyright>

- *

- */

-package org.eclipse.amp.axf.ide.view;

-

-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.time.ITimeGranularity;

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

-import org.eclipse.ui.IActionBars;

-import org.eclipse.ui.IPartListener;

-import org.eclipse.ui.IViewPart;

-import org.eclipse.ui.IViewSite;

-import org.eclipse.ui.IWorkbenchPart;

-

-// TODO: Auto-generated Javadoc

-/**

- * The Class StatusLineView.

- */

-public class StatusLineView extends SWTAsyncModelListener implements IPartListener {

-

-    IViewPart part;

-

-    // There should only be one status line view at a time..

-    private static StatusLineView view;

-

-    /**

-     * Instantiates a new status line view.

-     */

-    private StatusLineView() {

-        super(null, "Status Line View", 2500);

-        setWaitForUpdate(false);

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStart(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    public void observeStart(IObservationProvider model) {

-        updateMessage("Started");

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStop(org.eclipse.amp.axf.core.IObservationProvider)

-     */

-    public void observeStop(IObservationProvider model) {

-        updateMessage("Stopped");

-    }

-

-    /**

-     * @param model

-     * @see org.eclipse.amp.axf.view.SWTThreadModelListener#update(org.eclipse.amp.axf.core.IModel)

-     */

-    public void update(IModel model) {

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

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

-            String msg = model.getName();

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

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

-                msg += " [PAUSED]";

-            } else {

-                ITimeGranularity updateGranularity = model.getEngine().getUpdateGranularity();

-                if (!updateGranularity.toString().equals("1")) {

-                    msg += " [" + updateGranularity + "]";

-                }

-            }

-            updateMessage(msg);

-        }

-    }

-

-    private void updateMessage(final String msg) {

-        if (part != null) {

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

-            IActionBars actionBars = site.getActionBars();

-            actionBars.getStatusLineManager().setMessage(msg);

-            actionBars.updateActionBars();

-        }

-    }

-

-    /**

-     * Sets the part.

-     * 

-     * @param part the new part

-     */

-    public void setPart(IViewPart part) {

-        this.part = part;

-    }

-

-    /**

-     * Gets the part.

-     * 

-     * @return the part

-     */

-    public IViewPart getPart() {

-        return part;

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.ui.IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void partActivated(IWorkbenchPart part) {

-        assignPart(part);

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void partBroughtToTop(IWorkbenchPart part) {

-        assignPart(part);

-    }

-

-    private void assignPart(IWorkbenchPart part) {

-        if (part instanceof IViewPart) {

-            this.part = (IViewPart) part;

-        } else {

-            this.part = null;

-        }

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void partClosed(IWorkbenchPart part) {

-        if (part == this.part) {

-            this.part = null;

-        }

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.ui.IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void partDeactivated(IWorkbenchPart part) {

-    }

-

-    /**

-     * @param part

-     * @see org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)

-     */

-    public void partOpened(IWorkbenchPart part) {

-    }

-

-    public static StatusLineView getDefault() {

-        if (view == null) {

-            view = new StatusLineView();

-        }

-        return view;

-    }

-}

+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 Metascape, LLC.
+ * 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:
+ *   Metascape - Initial API and Implementation
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.amp.axf.ide.view;
+
+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.time.ITimeGranularity;
+import org.eclipse.amp.axf.view.SWTAsyncModelListener;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchPart;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class StatusLineView.
+ */
+public class StatusLineView extends SWTAsyncModelListener implements IPartListener {
+
+    IViewPart part;
+
+    // There should only be one status line view at a time..
+    private static StatusLineView view;
+
+    /**
+     * Instantiates a new status line view.
+     */
+    private StatusLineView() {
+        super(null, "Status Line View", 2500);
+        setWaitForUpdate(false);
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStart(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    public void observeStart(IObservationProvider model) {
+        updateMessage("Started");
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.core.AbstractLifecycleListener#observeStop(org.eclipse.amp.axf.core.IObservationProvider)
+     */
+    public void observeStop(IObservationProvider model) {
+        updateMessage("Stopped");
+    }
+
+    /**
+     * @param model
+     * @see org.eclipse.amp.axf.view.SWTThreadModelListener#update(org.eclipse.amp.axf.core.IModel)
+     */
+    public void update(IModel model) {
+        // IViewPart viewPart = (IViewPart) part.getAdapter(IViewPart.class);
+        if (model == AXFWorkbenchPlugin.getDefault().getManager().getActiveModel()) {
+            String msg = model.getName();
+            msg += " " + model.getTimeDescription();
+            if (model.getEngine().isPaused()) {
+                msg += " [PAUSED]";
+            } else {
+                ITimeGranularity updateGranularity = model.getEngine().getUpdateGranularity();
+                if (!updateGranularity.toString().equals("1")) {
+                    msg += " [" + updateGranularity + "]";
+                }
+            }
+            updateMessage(msg);
+        }
+    }
+
+    private void updateMessage(final String msg) {
+        if (part != null) {
+            IViewSite site = (IViewSite) part.getSite();
+            IActionBars actionBars = site.getActionBars();
+            actionBars.getStatusLineManager().setMessage(msg);
+            actionBars.updateActionBars();
+        }
+    }
+
+    /**
+     * Sets the part.
+     * 
+     * @param part the new part
+     */
+    public void setPart(IViewPart part) {
+        this.part = part;
+    }
+
+    /**
+     * Gets the part.
+     * 
+     * @return the part
+     */
+    public IViewPart getPart() {
+        return part;
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.ui.IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void partActivated(IWorkbenchPart part) {
+        assignPart(part);
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void partBroughtToTop(IWorkbenchPart part) {
+        assignPart(part);
+    }
+
+    private void assignPart(IWorkbenchPart part) {
+        if (part instanceof IViewPart) {
+            this.part = (IViewPart) part;
+        } else {
+            this.part = null;
+        }
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void partClosed(IWorkbenchPart part) {
+        if (part == this.part) {
+            this.part = null;
+        }
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.ui.IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void partDeactivated(IWorkbenchPart part) {
+    }
+
+    /**
+     * @param part
+     * @see org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void partOpened(IWorkbenchPart part) {
+    }
+
+    public static StatusLineView getDefault() {
+        if (view == null) {
+            view = new StatusLineView();
+        }
+        return view;
+    }
+}