| Programming SQuirreL SQL This document tries to help you with the first steps to change SQuirreL's source code. These steps are only a rough explanation of the most important things. If you aren't used to Eclipse or Java-IDE's at all it'll probably take you some experimenting. As an alternative to this introduction you may have a look at the very detailed description on how to program SQuirreL using the Netbeans IDE. See NetbeansedSQuirreL Note: In case you intend to write a new Plugin we would be grateful if you would release it under an Open Source license. In case you change SQuirreL's core or existing Open Source Plugins you are obliged to make your changes available to the community. The easiest way to do this is to send us patches of your changes. Starting SQuirreL from within a Java IDE You may use any editor or IDE to modify SQuirreL source code. The following steps assume you are using Eclipse (http://www.eclipse.org/downloads/). First you need SQuirreL's sources that you may either download from our homepage or check out from cvs using the command svn co https://squirrel-sql.svn.sourceforge.net/svnroot/squirrel-sql/trunk/sql12 Now create an Eclipse project with the sql12/ directory selected in the “Directory” text field of the second dialog of Eclipse's project wizard. Build the project. Using the Eclipse Navigator open app/src/net/sourceforge/squirrel_sql/client/Main.java in the editor. Right click the editor and choose Debug or Run as Java Application. You set breakpoints by double clicking the left border of the editor. A detailed guide to eclipse setup can be found here Working with Plugins To work with plugins you need to build a distribution of SQuirreL and the plugins. To do so in the Eclipse Navigator right mouse click build/build.xml and choose “Run as” --> “Ant Build...” (note the three dots). In the dialog make sure only the “make_dist” target is checked. Then click the “Run” button. Next you need to build the Plugins you want to work with. The plugins' build files are in plugins/<pluginName>/plugin_build.xml. Right click a plugin_build.xml and choose “Run as” --> “Ant Build...” (note the three dots). In the dialog make sure only the “build” target is checked. Then click the “Run” button. Now you need to tell SQuirreL to load the Plugins. To do so you need to set SQuirreL's home directory to <dirWhereSql12Is>/squirrel-sql-dist/squirrel-sql/core/dist To do so in Eclipse you right mouse click the Main class and choose “Run As ” --> “Run...” (note the three dots) --> On the "Arguments" tab you set the “Program arguments“ to -home <dirWhereSql12Is>/squirrel-sql-dist/squirrel-sql/core/dist Now restart SQuirreL and check SQuirreL's Plugin summary to see if the Plugins you built were loaded. For a more detailed description on how to program Plugins see the paper by Gerd Wagner and Glenn Griffin: English version German version Italian version |