Building from Subversion
Required Software Components
You will need the following tools in order to build VEditor.
Eclipse version 3.3 or newer - older versions miss some libraries for compiling.
Subclipse plug-in - This will be used to get the source from sourceforge.net (http://subclipse.tigris.org/)
Java Compiler Compiler (javacc) version 4.0 or newer - This will be used to compile the parsers (https://javacc.dev.java.net/)
JDK - To run the code
Plug-in Development Environment (PDE) Eclipse plugin - Used to do the build and browse the code.
Build Procedure
Getting the Source
After you have installed Subclipse, switch to the SVN Repository Exploring perspective via Window → Open Perspective → Other → SNV Repository Exploring.
If you get a warning about accepting an https certificate, click Accept Permanently. Right click in the white area under the SVN Repository tab and select New->Repository Location
Put the following value in the url field (note the https part): https://veditor.svn.sourceforge.net/svnroot/veditor
Browse to trunk->src (not trunk->src->src)
Right Click on trunk->src and select check out
Type veditor in the Project Name field and click Next
- Click Finish
Doing The Build
Now you have two options: either modify your environment to define the environment variables JAVACC_HOME and ECLIPSE_HOME to point to the JAVACC directory and eclipse home directory respectively or set the javacc_dir and eclipse_plugin_dir in veditor/build.properties to point to your JAVACC directory and eclipse plugins directory (e.g. /home/ali/eclipse/plugins). Remember to restart Eclipse if you chose to use the environment variable option. If the values are set via build.properties then the environment variables will be over-ridden.
Switch to the Plugin Development perspective via: Window->Open Perspective->Other->Plug-in Development.
You will notice that a bunch of classes are undefined and the preprocessor is showing a bunch of errors. That's because javacc hasn't run yet to write the automatically generated classes. Click on Project -> Build Project. On my computer i get 61 warnings (and no errors of course). Unfortunately, I can't do anything about the warnings because they are all in the auto generated files
.
Packaging the JAR file
The if you put the jar file created in this step in your eclipse plugin folder, eclipse will automatically pick it up and install it. Just remember to remove the jar file from the previous version.
- In Eclipse switch to the "plugin development" perspective.
- Open "plugin.xml" from the Package Explorer pane.
- Change to the "Overview" tab in the main window.
- Click on the "Export Wizard" in the Overview view of plugin.xml.
- Place a check next to net.sourceforge.veditor
- Click on the "Directory" option in the Destination tab
- Select a destination directory where you want your JAR file to be written to.
- Click "finish"
- Shutdown Eclipse
- Copy the JAR (net.sourceforge.veditor[version].jar) file from the destination directory into your Eclipse plugins directory. If you are upgrading, remember to remove the old veditor JAR or directory.
- Start Eclipse
The new version of the veditor plugin is now installed. To remove it, simply delete the JAR file from your plugins folder.
