|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ascape.runtime.Runner
org.ascape.runtime.NonGraphicRunner
org.eclipse.amp.escape.ide.EclipseEscapeRunner
public class EclipseEscapeRunner
Create a new instance of a model (scape) and start it running in the eclipse environment.
| Field Summary | |
|---|---|
protected ProjectLoader |
delegateLoader
|
static long |
KILL_AFTER_NO_RESPONSE_TIME
|
protected org.eclipse.core.runtime.IProgressMonitor |
modelMonitor
|
| Fields inherited from class org.ascape.runtime.Runner |
|---|
environment |
| Constructor Summary | |
|---|---|
EclipseEscapeRunner()
|
|
| Method Summary | |
|---|---|
void |
close()
Close. |
void |
closeFinally()
Closes the application; allowing views to close themseleves gracefully. |
void |
control(EngineControl control)
Control. |
org.eclipse.core.runtime.IStatus |
getFinishStatus()
Gets the finish status. |
int |
getIterationsPerRedraw()
|
IModel |
getModel()
Gets the model. |
org.eclipse.core.runtime.IProgressMonitor |
getMonitor()
Gets the monitor. |
Scape |
getScape()
Gets the scape. |
ITimeGranularity |
getUpdateGranularity()
Returns the update granularity. |
java.lang.Object |
instanceFromName(java.lang.String className)
Create an object instance using loadclass on the current thread's context class loader. |
boolean |
isCloseOnStop()
Should the model exit upon a stop command? |
void |
notify(ScapeEvent event,
ScapeListener listener)
|
void |
observationComplete(ILifeCycleListener observer)
Observation complete. |
void |
open(org.eclipse.core.resources.IResource modelResource,
java.lang.String scapeClassName,
java.lang.String scapeName)
Open a workspace model
with no args. |
void |
open(org.eclipse.core.resources.IResource projectResource,
java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args)
Open a workspace model
with supplied args. |
void |
open(org.eclipse.core.resources.IResource projectResource,
java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args,
boolean block)
Open a workspace model
with supplied args. |
void |
open(java.lang.String scapeClassName,
java.lang.String scapeName)
Open a model with no
args. |
void |
open(java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args)
Open a model with
supplied args. |
void |
open(java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args,
boolean block)
Open a model. |
void |
respondControl(ControlEvent control)
Responds to any control events fired at this scape. |
void |
setCloseOnStop(boolean closeOnStop)
Specifies whether the runner should exit upon a model stop. |
void |
setFinishStatus(org.eclipse.core.runtime.IStatus finishStatus)
Sets the finish status. |
void |
setIterationsPerRedraw(int iterations)
|
void |
setMonitor(org.eclipse.core.runtime.IProgressMonitor modelMonitor)
Sets the monitor. |
void |
setUpdateGranularity(ITimeGranularity granularity)
Sets the update granularity. |
void |
start()
Requests the scape to start. |
| Methods inherited from class org.ascape.runtime.NonGraphicRunner |
|---|
closeAndOpenSavedFinally, main, saveChoose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.amp.axf.core.IEngine |
|---|
getModelThread, isCloseRequested, isPaused, isRunning, stop |
| Field Detail |
|---|
protected ProjectLoader delegateLoader
protected org.eclipse.core.runtime.IProgressMonitor modelMonitor
public static final long KILL_AFTER_NO_RESPONSE_TIME
| Constructor Detail |
|---|
public EclipseEscapeRunner()
| Method Detail |
|---|
public void open(org.eclipse.core.resources.IResource modelResource,
java.lang.String scapeClassName,
java.lang.String scapeName)
Open a workspace model
with no args. Sets up the ProjectLoader class loader that loads
workspace resources. Waits until execution has stopped before returning
(ie: this method blocks).
modelResource - the model resourcescapeClassName - the model class namescapeName - the model name
public void open(org.eclipse.core.resources.IResource projectResource,
java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args)
Open a workspace model
with supplied args. Sets up the ProjectLoader class loader that
loads workspace resources. Waits until execution has stopped before
returning (ie: this method blocks).
projectResource - the project resourcescapeClassName - the scape class namescapeName - the scape nameargs - parameter arguments for the scape
public void open(org.eclipse.core.resources.IResource projectResource,
java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args,
boolean block)
Open a workspace model
with supplied args. Sets up the ProjectLoader class loader that
loads workspace resources.
projectResource - the project resourcescapeClassName - the scape class namescapeName - the scape nameargs - parameter arguments for the scapeblock - true if this method should only return on execution
completion.
public void open(java.lang.String scapeClassName,
java.lang.String scapeName)
Open a model with no
args. Waits until execution has stopped before returning (ie: this method
blocks).
scapeClassName - the scape class namescapeName - the scape name
public void open(java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args)
Open a model with
supplied args. Waits until execution has stopped before returning (ie:
this method blocks).
scapeClassName - the scape class namescapeName - the scape nameargs - parameter arguments for the scape
public void open(java.lang.String scapeClassName,
java.lang.String scapeName,
java.lang.String[] args,
boolean block)
ProjectLoader if
open is used
or otherwise org.eclipse.core.runtime.internal.adaptor.ContextFinder.
If the org.eclipse.core.runtime.internal.adaptor.ContextFinder class
loader is in use then this search logic is used to locate the scape class. For this to work
the bundle containing the scape class ought to have the following in its
MANIFEST.MF:
Eclipse-RegisterBuddy: org.ascape.core Import-Package: org.ascape.runtime
scapeClassName - the class name of the scapescapeName - the name of the scapeargs - parameter arguments for the scapeblock - true if this method should only return on execution
completion.public java.lang.Object instanceFromName(java.lang.String className)
Runner.instanceFromName(String) from org.ascape.core.
It is duplicated here so that the Eclipse-BuddyPolicy of org.eclipse.amp.escape.ide
is used instead of the Eclipse-BuddyPolicy of org.ascape.core.
instanceFromName in class RunnerclassName - class name of object to create
public void start()
Runner
start in class RunnerRunner.start()public void close()
IEngine
close in interface IEngineclose in class RunnerRunner.close()public void closeFinally()
Runnerclose() instead, allowing a running scape to stop
gracefully. Override this method if you want to provide any scape related
pre-quit finalization or clean-up.
closeFinally in interface IEnginecloseFinally in class RunnerRunner.closeFinally()public org.eclipse.core.runtime.IStatus getFinishStatus()
public void setFinishStatus(org.eclipse.core.runtime.IStatus finishStatus)
finishStatus - the new finish statuspublic IModel getModel()
IEngine
getModel in interface IEngineIEngine.getModel()public int getIterationsPerRedraw()
org.eclipse.amp.axf.core.IEngine#getIterationsPerRedraw()public void respondControl(ControlEvent control)
Runner
respondControl in class RunnerRunner.respondControl(org.ascape.model.event.ControlEvent)public void control(EngineControl control)
IEngine
control in interface IEnginecontrol - the model controlIEngine.control(org.eclipse.amp.axf.core.EngineControl)
public void notify(ScapeEvent event,
ScapeListener listener)
notify in class RunnerRunner.notify(org.ascape.model.event.ScapeEvent,
org.ascape.model.event.ScapeListener)public void setIterationsPerRedraw(int iterations)
org.eclipse.amp.axf.core.IEngine#setIterationsPerRedraw(int)public Scape getScape()
public org.eclipse.core.runtime.IProgressMonitor getMonitor()
public void setMonitor(org.eclipse.core.runtime.IProgressMonitor modelMonitor)
modelMonitor - the new monitorpublic void observationComplete(ILifeCycleListener observer)
IEngine
observationComplete in interface IEngineobserver - the observerIEngine.observationComplete(org.eclipse.amp.axf.core.ILifeCycleListener)public ITimeGranularity getUpdateGranularity()
IEngine
getUpdateGranularity in interface IEngineIEngine.getUpdateGranularity()public void setUpdateGranularity(ITimeGranularity granularity)
IEngine
setUpdateGranularity in interface IEnginegranularity - IEngine.setUpdateGranularity(org.eclipse.amp.axf.time.ITimeGranularity)public boolean isCloseOnStop()
setCloseOnStop(boolean)public void setCloseOnStop(boolean closeOnStop)
closeOnStop - whether to complete run on model stop; default is false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||