Developing Pixy in Eclipse
****************************

The most recent version of Eclipse can be obtained from http://www.eclipse.org.


Importing, adjusting & initial build
-------------------------------------

- create a new Java project with the default settings (name: Pixy)
  (--> the "eclipsed" project will reside inside the Eclipse workspace
  after you've finished the following steps; if you want to have it somewhere
  else, export it, delete it, and import it again; see below)
- disable "build automatically" (from the project menu)
- from the newly created project's context menu (package explorer), select "Import"
  - File System
    - choose the Pixy home folder (i.e. double click it, then press OK)
    - select it on the following screen (to import everything inside)
      ("create selected folders only"), finish
- if a red X appears next to the icon of the Pixy project, you forgot to disable
  "build automatically"
- adjust project properties (from its context menu again):
  - Builders:
    - deselect "Java Builder"
  - Java Build Path:
    - Source Tab:
      - remove existing folder (Pixy)
      - add new folders:
        - Pixy/src/project
        - Pixy/src/java_cup (UPDATE: not necessary any more)
        - Pixy/src/JFlex (UPDATE: not necessary any more)
        - [after the first successful build:]
          Pixy/build/java
      - set default output folder to Pixy/build/class
    - Libraries Tab:
      - Add Class Folder:
        - Pixy/lib
      - Add Jar:
        - Pixy/lib/junit.jar
- context menu of build.xml: Run / 2.Ant Build...
  - name it "Pixy build"
  - main tab:
    - Base directory = Pixy folder
  - refresh tab:
    - select "refresh upon completion", "project containing the selected resource"
  - targets tab:
    - select "build" target instead of preselected default target
  - run! (should be successful)


Running
--------

- Run / Run...
  - Java Application, New
  - Main tab:
    - name = Pixy default
    - Main Class: should find Checker after pressing the Search button, accept it
  - Arguments tab:
    - Program arguments:
      ${project_loc}/test.php
    - VM Arguments:
      -Dpixy.home=${project_loc}
  - run!
  - for JUnit Tests: same VM Argument


Development building
---------------------

- context menu of build.xml: Run / External tools
  - duplicate existing build configuration
  - rename the copy to "Pixy javac"
  - replace target "build" with "javac"
  - run
  
Exporting
----------

- don't forget to clean up first
- as zipfile or to file system
- check if it contains a .project file (that's how it should be, otherwise
  you can't import it back to Eclipse easily)

Importing again
-----------------

- unzip file outside eclipse (if zipped); that location is not just temporary,
  but will be used by eclipse as project home
- don't create a project
- context menu of package explorer: Import... Existing project into workspace,
  select unzipped home folder, finish




