PlayGo

From WeizmannWiki
Revision as of 10:56, 3 September 2010 by Smadar (Talk | contribs)

Jump to: navigation, search

Getting Started with PlayGo

Install PlayGo

PlayGo is based on Eclipse and is packaged and provided as Eclipse Product. In addition to the product itself we provide a workspace with few examples.

To install PlayGo, create a new directory and extract the PlayGo.zip file to that newly created directory. Throughout this document we will refer to this directory as <PlayGo>.

Once extracted, your <PlayGo> directory should have the following content:

Playgo.install.dir.jpg

JRE Configuration

Open the <PlayGo>/PlayGo.ini file and update the Java VM path to: <PlayGo>\ jre6\bin\ (e.g. D:\PlayGo\jre6\bin\). Alternatively, if you have Java 6 installed on your machine, simple remove the '-vm' parameter from the <PlayGo>\PlayGo.ini file. PlayGo will use your System properties to access your installed Java.

Run PlayGo with the Provided Workspace

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. Choose the workspace provided with the installation (i.e. <PlayGo>/workspace/).

The <PlayGo>/workspace/ contains 4 projects:

  • ATM – example for ATM System. The ATM GUI side is based on 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 (Play-Out).
  • GWTMemoryGame – Another example system. The Memory Game GUI side is based on 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 (Play-Out).
  • il.ac.wis.cs.common – a library which contains few examples for creating LSC models by coding in Java.
  • il.ac.wis.cs.playgo.guitoolkit – a platform library used by the ATM and GWTMemoryGame. This is integral part of PlayGo and in the future will be provided as a jar file only.

We will refer to these projects in the following chapters.

Once PlayGo is open, note that the PlayGo perspective is selected. It is recommended to use this perspective, as it provides some shortcuts.

Playgo.perspective.JPG


Configure the Examples

Before you can compile and run the examples, you need to configure them:

1. From Window menu, choose Preferences->Google->Web Toolkit. Configure it to point to your <PlayGo>\plugins\com.google.gwt.eclipse.sdkbundle.2.0.0_2.0.0.v200912062003\gwt-2.0.0 directory:

Gwt.preferences.jpg


2. From Window menu, choose Preferences->Google->App Engine. Configure it to point to your <PlayGo>\plugins\com.google.appengine.eclipse.sdkbundle.1.3.0_1.3.0.v200912141120\appengine-java-sdk-1.3.0 directory:

Gwt.preferences2.jpg


3. From Window menu, choose Preferences->Java->Build PathClasspath Variables. Edit the PLAYGO_PLUGINS variable to point to your <PlayGo>/plugins/ directory:

Classpath.references.jpg


4. Basically the examples provided are configured with relative paths and should work well in your environment, but this is a good opportunity to introduce some parts of the configuration you can control. Right click the GWTMemoryGame project->Properties->S2A Builder:

Playgo.s2a.properties.jpg

As shown in the screenshot above, there are 3 tabs in which you can configure properties related to S2A:

      A. S2A Compilation

     i.	Here you can add and remove models which you want to compile with S2A.

For those models you add, you may choose which LSCs should be compiled by S2A. In other words, for which Interactions S2A will generate aspects.

    ii.	Target Folder: here you specify the directory in which the generated aspects will be located.
   iii.	Clear Automatically – if on, cleans the aspects directory before generating new aspects.
    iv.	Polymorphism – enable or disable polymorphism.

B. Imports

     i.	Here you may specify packages that will be imported in the generated aspects.
    ii.	Output package name – the package of the generated aspects.

   C. General – currently used only for specifying the log4j configuration location.

5. S2A preferences – Advanced From the Windows menu, select Preferences->PlayGo->S2A Builder

Playgo.s2a.properties.advanced.jpg


Here you can choose the strategy you want to activate. Currently the only strategy implemented is the Naive strategy and this is the one being used.


Create your First LSC Project