Difference between revisions of "Getting Started with PlayGo"

From WeizmannWiki
Jump to: navigation, search
(Run PlayGo with the provided workspace)
Line 1: Line 1:
== Install PlayGo ==
+
== Install PlayGo ==
PlayGo is based on Eclipse and is packaged and provided as an Eclipse Product. In addition to the product itself, we provide a workspace with several examples.
+
  
To install PlayGo, create a new directory and extract the downloaded zip file to that newly created directory. Throughout this document we refer to this directory as <PlayGo>.
+
PlayGo is based on Eclipse and is packaged and provided as an Eclipse Product.
  
Once extracted, your <PlayGo> directory should have the following content:
+
To install PlayGo, extract the downloaded zip file. The zip file contains a directory named PlayGo with the following content:
  
 
[[Image:Playgo.install.dir.JPG]]
 
[[Image:Playgo.install.dir.JPG]]
  
== Startup PlayGo==
+
Throughout this section we refer to the newly extracted directory as <PlayGo>.
To start PlayGo, go to your <PlayGo>/playgo/ directory and double-click the PlayGo.exe file. As it is in Eclipse, PlayGo will ask you for the workspace to start with. Create a new workspace, or choose the workspace provided with the installation (i.e., <PlayGo>/workspace/).
+
  
== Create your first LSC project ==
+
== Startup PlayGo  ==
Creating a new LSC project is done from the file menu: choose New --> LSC Project. Note: if you are not using the PlayGo perspective you may not see this option, in which case choose New --> Other --> PlayGo category --> LSC Project. Keep the flags checked, as follows:
+
<br><br>[[Image:New.LSC.project.JPG]]
+
<br><br>
+
Start playing in, by selecting the project and clicking the 'NL Play-in':<br>
+
[[Image:NL.play-in.start.png | 800px]]
+
<br><br>
+
You will be prompted to select a specification file name and location:<br>
+
[[Image:specFile.png]]
+
  
 +
To start PlayGo, go to your &lt;PlayGo&gt; directory and double-click the PlayGo.exe file. As it is in Eclipse, PlayGo will ask you for the [[Eclipse Orientation#workspace|workspace]] to start with. Create a new workspace (e.g., &lt;PlayGo&gt;/workspace/) and select it.<br>
  
Start entering your requirements. For each one, enter the LSC name and the requirement's text, and then click the '+' button on the view toolbar to add the specification to the specification file. <br><br>
+
[[Troubleshoot#Error_when_launching_PlayGo|Troubleshoot...]]
For example, to create a sample "Hello World" specification, enter the following requirement: <br><br>
+
'''when the user clicks the button, the display text changes to "Hello World"'''
+
<br><br>
+
Clicking the '+' button will then result in the following LSC: <br>
+
[[Image:specification.sampleProject.png|800px]]
+
<br><br>
+
Once done, stop the play-in session, by clicking the 'Stop' button on the toolbar. Click the 'Play-Out' button on the toolbar to start playing out:<br>
+
[[Image:toolbar.playout.png]]
+
<br><br>
+
As a result, a default GUI will be launched, from which you can play out (e.g., click the button and see the "Hello World" text in the display text field).
+
  
== Run PlayGo with the provided workspace ==
+
== Create your first LSC project  ==
Startup PlayGo. When prompted to select a workspace, choose the workspace provided with the installation (i.e., <PlayGo>/workspace/).
+
  
The &lt;PlayGo&gt;/workspace/ contains four projects:
+
Creating a new LSC project is done from the 'File' menu: choose New --&gt; LSC Project. Keep the flags checked and unchecked, as follows: <br><br>[[Image:New.LSC.project.JPG]] <br><br> [[Troubleshoot#LSC_perspective|Troubleshoot...]] <br><br> Start playing in, by selecting the project and clicking the 'NL Play-In':<br> [[Image:NL.play-in.start.png|800px]] <br><br> You will be prompted to select a name and location for the specification file, the file where the LSCs you create will be stored:<br> [[Image:SpecFile.png]]
  
*ATM – example for ATM System. The ATM GUI side is based on [http://code.google.com/webtoolkit/ GWT]. ATM behavior was modeled by playing in a set of scenarios. S2A is used for generating aspects, which are used to monitor and run the system ([[Language_%26_Concepts#Play-Out|play-out]]).
+
<br> Start entering your requirements. For each one, enter the LSC name and the requirement's text, and then click the [[Image:NL.plus.jpg]] button on the view toolbar to add the text you entered to the specification file. <br><br> For example, to create a sample "Hello World" scenario, you can enter the following text: <br><br> '''when the user clicks the button, the display text changes to "Hello World"''' <br><br>Type a space at the end of the sentence for it to parse. <br><br> Hover over the words that are marked with a green squiggly line, and select the first alternative from the quickfix box, by clicking it. The word will be interpreted and the corresponding object will be added to the system model view: <br> [[Image:GreenQuickFix.jpg]] <br><br>
*BabyMonitor – Another example system. The GUI side is based on Swing. Its behavior was modeled by playing in a set of scenarios. S2A is used for generating aspects, which are used to monitor and run the system ([[Language_%26_Concepts#Play-Out|play-out]]).
+
*GWTMemoryGame – Another example system. The Memory Game GUI side is based on [http://code.google.com/webtoolkit/ GWT]. Its behavior was modeled by playing in a set of scenarios. S2A is used for generating aspects, which are used to monitor and run the system ([[Language_%26_Concepts#Play-Out|play-out]]).
+
*il.ac.wis.cs.common – a library that contains an example for creating LSC models using Java API.
+
  
We will refer to these projects in the following sections.
+
Clicking the [[Image:NL.plus.jpg]] button will then result in the following LSC: <br><br> [[Image:Specification.sampleProject.png|800px]] <br><br>
  
Once PlayGo is open, note that the PlayGo perspective is selected. It is recommended to use this perspective, as it provides some shortcuts.
+
[[How to Play-In|More about play-in...]] <br><br>
  
[[Image:playgo.perspective.JPG]]
+
Once done, stop the play-in session, by clicking the 'Stop' button on the toolbar. Click the 'Play-Out' button on the toolbar to start playing out:<br> [[Image:Toolbar.playout.png]] <br><br> As a result, a default GUI will be launched, from which you can play out (e.g., click the button and see the "Hello World" text in the display text field).
  
=== Configure the examples ===
+
[[How to Play-Out|More about play-out...]]
Since some of our examples are based on GWT, you should configure the GWT settings before you can run the examples:
+
 
+
1. From Window menu, choose Preferences-&gt;Google-&gt;Web Toolkit. Configure it to point to your &lt;PlayGo&gt;\plugins\com.google.gwt.eclipse.sdkbundle.2.0.0_2.0.0.v200912062003\gwt-2.0.0 directory:
+
 
+
[[Image:Gwt.preferences.jpg]]
+
 
+
<br>
+
 
+
2.From Window menu, choose Preferences-&gt;Google-&gt;App Engine. Configure it to point to your &lt;PlayGo&gt;\plugins\com.google.appengine.eclipse.sdkbundle.1.3.0_1.3.0.v200912141120\appengine-java-sdk-1.3.0 directory:
+
 
+
[[Image:Gwt.preferences2.jpg]]
+
 
+
<br>
+
 
+
[[Play-Out Configuration | '''S2A Configuration''']]
+
 
+
=== Start playing ===
+
 
+
====Run the examples: play-out====
+
The examples provided are configured and ready to be played out. Aspects are
+
already generated and Java-compiled. To play out, select an example project (e.g.,
+
GWTMemoryGame) and click the 'Play-Out' button on the toolbar.
+
As a result, the application will start (if this is a GWT application, the corresponding GWT application will start and its URL will be copied to the Eclipse Internal Web Browser) and the LSC specification will open in the LSC editor.
+
You can now start working with the application. For example: flip up cards in a memory game, and see how the application works, with the cut changing on the LSC diagram.
+
 
+
To stop playing out, click the 'Stop' button on the toolbar, next to the 'Play-Out' and
+
'Play-In' buttons.
+
 
+
If the example fails to run, check out our [[troubleshoot]] section.
+
 
+
For more information about play-out, click [[How_to_Play-Out | here]].
+
 
+
====Enrich the examples with scenarios: play-in====
+
For playing in, select an example project (e.g. BabyMonitor) and click the 'Play-In' button on the toolbar. As a result, the play-in server starts and the application starts (if this is a GWT-based application, i.e., GWTMemoryGame, the corresponding GWT application starts and its URL is copied to the Eclipse Internal Web Browser).
+
 
+
You can now start [[How_to_Play-In | playing in]].
+

Revision as of 11:26, 2 January 2014

Install PlayGo

PlayGo is based on Eclipse and is packaged and provided as an Eclipse Product.

To install PlayGo, extract the downloaded zip file. The zip file contains a directory named PlayGo with the following content:

Playgo.install.dir.JPG

Throughout this section we refer to the newly extracted directory as <PlayGo>.

Startup PlayGo

To start PlayGo, go to your <PlayGo> directory and double-click the PlayGo.exe file. As it is in Eclipse, PlayGo will ask you for the workspace to start with. Create a new workspace (e.g., <PlayGo>/workspace/) and select it.

Troubleshoot...

Create your first LSC project

Creating a new LSC project is done from the 'File' menu: choose New --> LSC Project. Keep the flags checked and unchecked, as follows:

New.LSC.project.JPG

Troubleshoot...

Start playing in, by selecting the project and clicking the 'NL Play-In':
NL.play-in.start.png

You will be prompted to select a name and location for the specification file, the file where the LSCs you create will be stored:
SpecFile.png


Start entering your requirements. For each one, enter the LSC name and the requirement's text, and then click the NL.plus.jpg button on the view toolbar to add the text you entered to the specification file.

For example, to create a sample "Hello World" scenario, you can enter the following text:

when the user clicks the button, the display text changes to "Hello World"

Type a space at the end of the sentence for it to parse.

Hover over the words that are marked with a green squiggly line, and select the first alternative from the quickfix box, by clicking it. The word will be interpreted and the corresponding object will be added to the system model view:
GreenQuickFix.jpg

Clicking the NL.plus.jpg button will then result in the following LSC:

Specification.sampleProject.png

More about play-in...

Once done, stop the play-in session, by clicking the 'Stop' button on the toolbar. Click the 'Play-Out' button on the toolbar to start playing out:
Toolbar.playout.png

As a result, a default GUI will be launched, from which you can play out (e.g., click the button and see the "Hello World" text in the display text field).

More about play-out...