Setting up the Eclipse development environment for Inforama Community Edition
Check the code from the SVN repository
Check out the project suite from the SourceForge.net subversion repository. The address of the
server is “https://inforama/svn.sourceforge.net” and respository path is “svnroot/inforama/trunk”. This
can be done with the following instruction of the Subversion command line client: “svn co
https://inforama.svn.sourceforge.net/svnroot/inforama/trunk inforama”.
If you're using an SVN client such as SmartSVN (http://www.syntevo.com/smartsvn/index.html) the dialog to create the will look similar to that shown in figure 1.

Figure 1: Configuring the connection to the SVN repository using SmartSVN
Enter your SourceForge user id and password along with the SVN paths.
Click the Project – Check out... menu item, select the Inforama repository you created and click the Next button. If you are only interested in checking out a particular version of Inforama you can use the next screen to select this as shown in figure 2.

Figure 2: Select the version of Inforama
The different branches in SVN relate to the Inforama versions. Select the branch you are interested in and click the Next button to view the screen shown in figure 3.

Figure 3: Specify the location for the checked out code
On this screen select the location on your filesystem to which the checked out code will be copied. Click the Next button and the screen shown in figure 4 will be displayed.

Figure 4: Specify a project name
The default action here is to check the source code out and manage it as a project. To do this enter the name you wish to give the project. Click the Next button and on the next page click the Finish button to complete the wizard.
You can update your local copy of the code from the repository by right-clicking the project in the SmartSVN explorer and clicking the Update popup menu item. When you first update from the repository five directories will be downloaded to your local project location. These are...
Directory | Descripiton |
DataSourceManager | This project manages dataconnections via JDBC and to spreadsheets and can be extended to connect to custom datasources. |
DocumentAutomator | This project manages the actions which are carried out on projects such as emailing, printing and returning. |
DocumentEditor | This is the studio and contains code for creating the UI, managing projects, etc. |
DocumentEngine | This project controls the generation of documents from templates, merging data from datasets into PDFs and other formats |
lib | This directory contains all of the jar files which are required by the various projects. |
Install OpenOffice
These instructions assume that version 2.4 of OpenOffice is being used. If you wish to configure Inforama to use version 3.x of OpenOffice please refer to the specific instructions on the Inforama Wiki at http://www.in4ama.org/web/guest/community/wiki/-/wiki/Main/Building+Inforama+with+Open+Office+3.x+in+Eclipse+IDE
Setting up the Eclipse environment
These instructions are based on Eclipse version 3.2.2. Download Eclipse from http://www.eclipse.org/downloads/ and start it up. Create a workspace in the root directory which you specified as your Inforama project location in figure 3 earlier. Click the File – Import... menu item in Eclipse and in the resulting dialog shown in figure 5 select the Existing Projects into Workspace item.

Figure 5: Import project dialog
Click the Next button and in the next screen locate the DataSourceManager project. Click the Finish button and the project will appear in the workspace frame. Right click the project in the workspace frame and click the Properties menu item. Select the Java Build Path node from the tree on the left and select the Libraries tab. Click the Add Variable... button and in the New Variable Classpath Entry dialog click the Configure Variables... button. In the Preferences dialog click the New... button to display the dialog shown in figure 6.

Figure 6: Specifying the variable folder path
Now build the project by clicking the Project – Clean... menu item in Eclipse. Select the DataSourceManager and it should build without errors. You can now build the project using the build.xml file in the DataSourceManager folder. Before doing this make sure that the build.properties file exists in the directory above this.
In Eclipse, right-click the build.xml file and select the Run As – Ant Build... menu option. In the build dialog select the clean, compile and jar targets and make sure they are configured to build in that order. Click the Run button to run the Ant build. The resulting DataSourceManager.jar file will be created in the dist folder.
Now you can import the DocumentAutomator project into Eclipse. Once imported rebuild it and it should build without errors.
Next import the DocumentEngine project and once import right-click it and select Properties from the menu. Select the Java Build Path node from the tree on the leftm select the Projects tab and make sure that the DataSourceManager and DocumentAutomator projects are included as shown in figure 7.

Figure 7: Project dependancies for the DocumentEngine
Now switch to the Libraries tab and click the Add Variable... button. Next click the Configure Variables... button and then the New... button. In the dialog enter the value openoffice_lib in the Name field and the path to the classes folder for OpenOffice in the Path field. In OpenOffice 2.4 the classes folder can be found in the program folder which in turn is in the default root installation directory for OpenOffice. Click the OK button to save the variable.

Figure 8: Adding the openoffice_lib path variable
You should now be able to build the DocumentEngine project without errors.
Running Inforama Studio
The final project you need to import is the DocumentEditor project. Once imported the project should build without errors. Next select the DocumentEditor project and click the Run – Open Run Dialog... menu item to display the run dialog shown in figure 9.

Figure 9: The Inforama Studio run configuration
Select the Java Application node in the tree on the left of the dialog and click the New launch configuration button as indicated by the red circle in figure 9. Enter a name for the configuration and make sure that the DocumentEditor project is selected as the project. Enter the value org.in4ama.editor.xui.Launcher as the main class.
Now select the Arguments tab as shown in figure 10.

Figure 10: Specifying arguments for the launch configuration
In the Program arguments field enter the path to the OpenOffice installation directory followed by the value '2' indicating that version OpenOffice 2.x is to be used.
Click the Run button to run the Studio for the first time.