Menu

BuildingFromSource

Ernest

Building the plugins from source control

Installing Eclipse

The FlexFormatter source code should be compatible with versions of Eclipse >=3.0.

  • I typically download Eclipse from here: http://eclipse.org/downloads/ and choose the Classic edition, which contains the Plugin Development Environment and the Java Development Toolkit, both of which are necessary for building FlexFormatter. Unzip the downloaded file into a directory and execute the eclipse.exe file as normal. If you are running Eclipse with the FlexBuilder/FlashBuilder plugins added to it, hopefully you already have the necessary environment.

NOTE: FB3 will only run well with Eclipse 3.3.x. You can make it work with 3.4.x, but sometimes there are issues. FB4 will run with any Eclipse version (at least up to 3.5.x).

  • OR if you are running the standalone FlexBuilder/FlashBuilder, or don't have the Java Development Toolkit and Plugin Development Environment, then you can add these to your Eclipse installation via the Help->Software Updates... dialog. The specific steps for selecting an Eclipse update site and choosing the correct plugins to install vary based on the Eclipse version.
    • Eclipse 3.3.x (which is what FB3 standalone installs with)
  • Help->Software Updates->Find and Install
  • Choose the Search for new features radio button and click Next
  • Check the Europa discovery site, and click Next
  • Choose a reasonable mirror site if prompted
  • You should see a dialog with a tree of components that can be installed.
    1. Find the Java Development item and expand it
    2. Select Eclipse Java Development Tools and Eclipse Plug-in Development Environment
  • Click Next and follow the dialogs
  • Restart Eclipse when prompted to complete the install.
  • NOTE: If you are behind a company firewall, you may need to tell Eclipse about your proxy server.
    1. Window->General->Network Connections
    2. Select the Manual proxy configuration radio button
    3. Supply the proxy host and port for the HTTP proxy
    • Eclipse 3.5.x
  • Help->Install New Software...
  • Choose the Eclipse Project item in the combo box. Ex. The Eclipse Project Updates - http://download.eclipse.org/eclipse/updates/3.5
  • Expand the tree Eclipse Platform SDK. Choose the items Eclipse Plugin Development Environment and Eclipse Java Development Tools.
  • Click 'Next' and follow the dialogs and restart Eclipse to complete the install.
  • NOTE: If you are behind a company firewall, you may need to tell Eclipse about your proxy server.
    1. Window->General->Network Connections
    2. Change the Active Provider combo selection to Manual
    3. Check the HTTP box, select the HTTP line, and click the Edit... button to supply the proxy host and port

Downloading the source code

  • File->New Project->Project from CVS
    • Host: flexformatter.cvs.sourceforge.net
    • Repository Path: /cvsroot/flexformatter
    • User: anonymous
    • Password: none
    • Connection type: pserver
  • On the resulting dialog, choose the Use existing project radio button
    • Select ActionScriptInfoCollector
    • Select FlexFormatter
    • Select FlexASDocGenCommand
  • Click Next
  • Leave the selection of Check out into the workspace as projects
  • Click Next
  • Choose your preference for the workspace location
  • Use the Head CVS tag and clock Finish
  • The default setting is for Java projects to build automatically (Project->build automatically)
    • The 3 projects should build without error.

Running/Debugging

  • Run->Debug Configurations...
  • Double-click on Eclipse Application to create a new eclipse application runtime configuration
  • Select the created configuration and change the workspace location on the Main tab if desired. Otherwise, a new workspace will be created.
  • Click the Debug button to invoke the new copy of Eclipse
  • Create projects or do whatever testing is desired.

NOTE: Even if you already have a copy of FlexFormatter installed in your Eclipse/FB, the debug copy of Eclipse will use the code from the projects you have built locally.

Publishing a new version (only necessary for distributing a copy to others)

  • As in a previous step, use File->New Project...->Projects from CVS
  • Choose the following additional projects
    • FlexPrettyPrintCommandFeature
    • FlexPrettyPrintCommandUpdateSite
  • These may take a while to download because they include the jar files for a number of previous releases.
  • In each of the 3 code projects, go to the Manifest.mf file and update the version number
  • In the feature project, you can change the version number by editing the feature.xml file and modifying the version (there is a custom editor for this file that will be invoked by default).
  • In the update site project, you can change the version number by editing the site.xml file.
    • The custom editor will come up, but you should click on the 'raw' tab at the bottom of the editor window.
    • Edit the version number to be the same in both places in the file.
    • Click back on the Site map tab on the editor
    • Click the Build All button to actually build the 3 plugins and update the update site.

Once you've built the update site, you have two options

  1. Copy out the 3 jars from the plugins directory
  2. Publish the entire directory under the update site project out to a shared hard drive or on the web. This is the format that Eclipse looks for when connecting to an update site.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.