Compiler Plugin

The compiler plugin provides the features required for building swfs.

The actual compile and build is performed by MTASC. There are currently no plans for building our own compiler.

The BuildManager (org.asdt.compiler.builder.BuildManager) is used for saving and loading project build files. These are just xml files that are stored in the project directory with the name .asdt_build

A build file (and therefore the build settings for a project) contains a list of build items (org.asdt.compiler.builder.BuildItem) which specifies how a particular swf is to be built.

Here is an example build file :

<?xml version="1.0" encoding="UTF-8"?>
<AS2Build>
  <buildItem class="com.relivethefuture.test.Test" params="" active="true" runnable="false">
    <in>input.swf</in>
    <out>output.swf</out>
    <movie width="640" height="480" fps="31" version="7">
      <trace>Log.addMessage</trace>
    </movie>
    <compiler infer="false" keep="false" wimp="true" mx="false" strict="true" />
  </buildItem>
</AS2Build>

A build is initiated whenever a file in the project changes, so when a source file is saved the project is rebuilt.

Currently we also trigger a compile when a source file is saved so that the code is syntax checked by MTASC. This is needed because we dont yet do our own syntax checking AND the file may not be part of the project build. This will soon change when our parser and model is up and running with syntax checking.

If a build fails (or generates some output) this is parsed (by org.asdt.compiler.mtasc.MTASCOutputParser) and we create markers to highlight the errors / warnings.