Richard North Patterson, Random House, 2005
I just finished it. Patterson happens to be in the upper half of my list of favorite authors, and this one didn’t disappoint me. On the surface, it’s a story about the defense of a man convicted and sentenced to death for his role in a murder. More importantly (at least in my opinion), it’s an eye-opening, thought-provoking work that looks at the risks associated with (and to a lesser extent, the constitutionality of) capital punishment in the US, the workings of the US legal system (even as Patterson admits that he had to significantly simplify aspects of it to make the book accessible to readers), and how easy it is for our justice system to lose sight of the fact the system itself exists to protect individual people (both victims and people accused of crimes). This isn’t the first time that he has taken on a potentially difficult subject (the death penalty), but he does it in a manner that will (should?) have make people stop and think about their own views on the subject.
After attending CFUnited-05 in Washington, DC last week, and particularly in light of Macromedia’s announcement that they were going to be officially involved in supporting the CFEclipse project, I decided I needed to take a look at the use of CFEclipse for CF development. Having gone through a couple of iterations in setting up Eclipse and CFEclipse, I decided that some installation notes might come in handy. Most of these instructions are based on installing and configuring the platform on Windows box, but steps on other platforms should be pretty much identical.
CFEclipse is a plugin for the Eclipse environment, and the easiest way to install CFEclipse is via Eclipse itself, so the first step is to install Eclipse.
- You will need the Java JRE v. 1.4.1 or later installed on your system for the current version of Eclipse to work. Install or update, as (or if) needed.
- Download the Eclipse package from the main Eclipse site. I don’t do any Java development at present, so I just pulled down the Platform Runtime Binary for the Win32 environment, and saved it to my hard drive. Make sure you also get a copy of the user documentation — it is a good overview of how Eclipse works and how to use it.
- Unzip the downloaded archive, and extract all of the files to a location where Eclipse will be installed (e.g., c:\program files\eclipse), making sure that the folder names in the ZIP archive are retained.
- Create a shortcut to the Eclipse executable.
There are good instructions on installing CFEclipse on both the CFEclipse project page, and on Nathan Strutz’s CFEclipse resource page, but I am going to summarize them here as part of this process.
- Start Eclipse (if it is not already running).
- Select “Help |Software Updates | Find and Install…”.
- Select “Search for new features to install” and click “Next >”.
- Click “New Remote Site…”.
- Enter “CFEclipse” in the Name field, and “http://cfeclipse.tigris.org” in the URL field (both without the enclosing quotes). Click “OK”.
- Make sure the CFEclipse node is checked and that Eclipse is unchecked. Click “Finish”.
- On the Search Results dialog, check the CFEclipse node. Click “Next >”.
- Read through and accept the terms of the CFEclipse license agreement. Click “Next >”.
- Click “Finish”.
- If you get prompted about installing an “unsigned feature”, click “Install”.
- When the installation has finished, Eclipse will want to restart itself. Allow it to do so.
There are lots of different plugins that extend Eclipse and work well with CFEclipse. I will touch on those that I find most valuable here. For each of these, exit Eclipse prior to installing the plugin files; when you restart Eclipse, it will find the newly-installed plugin.
- CSS Editor: Download the most recent build for this from Nathan Strutz’s CFEclipse Resource page (you are looking for http://www.dopefly.com/pages/net.sourceforge.csseditor_0.0.3_rc2.zip, as of this writing). Save it to disk. Open the archive and extract the contents to the “plugins” folder within the Eclipse folder, paying particular attention to the embedded folders in the ZIP archive so that the files end up in the right place.
- XMLBuddy: Download the “standard” version (as opposed to their “pro” version) from http://xmlbuddy.com. Save it to disk. Open the archive and extract the contents to the “plugins” folder within the Eclipse folder, paying particular attention to the embedded folders in the ZIP archive so that the files end up in the right place.
- Quantum DB: Download the current version from the Quantum DB project page on SourceForge. Save it to disk. Open the archive and extract the contents to the appropriate directories under Eclipse (everything should end up under plugins/ or features/). Start/re-start Eclipse. To open the Quantum DB perspective, select “Window | Open Perspective | Other…” and then select “Quantum DB”. If you are using Quantum DB to talk to MS SQL Server, you should probably also look at using the jTDS JDBC driver rather than the default JDBC-ODBC bridge. I will post some additional notes on that one in the next couple of days.
- More to come…
Installing Code Snippets
The CFEclipse project has made available a basic set of code snippets that can be edited and supplemented as you need. To install those snippets:
- Download the “snips” archive from the CFEclipse project page; as of this writing, the file can be found at http://cfeclipse.tigris.org/releases/snips_1.1.9.zip.
- Extract the contents of the downloaded archive to a folder of your choice. I use the “plugins” folder under my Eclipse installation (e.g., c:\program files\eclipse\plugins). This will create a folder named “snippets” there.
- To point CFEclipse at these snippets, select “Window | Preferences…” and select “CFEclipse”.
- In the “File Paths” block on the Preferences dialog, specify the appropriate folder for the “Paths to snippets directory”. Select “OK” to save the preferences change and close the Preferences dialog.
- You will need to re-start Eclipse to get it to see the snippets.
- To open the Snip Tree view, select “Window | Show View | Other…”, expand the “CFML” branch, and select “Snip Tree View”.
Setting Common Preferences
At first, the breadth and depth of the user preferences that can be set in Eclipse and all of its plugins can be pretty overwhelming. Here are a few that I typically tweak when I install and configure Eclipse/CFEclipse on new machine.
- General appearance and editor preferences:
- General | Appearance | Colors and Fonts | Basic | Text Font: Bitstream Vera Sans Mono, 8 pt.
- General | Editors | Text Editors | Displayed Tab Width: 2
- General | Editors | Text Editors | Undo History Size: 255
- General | Editors | Text Editors | Check “Show Line Numbers”
- I like the current line to be highlighted in the CFEclipse editor, which it doesn’t seem to be by default. To turn this on, and make it look like the other editors, do the following:
- Select “Window | Preferences…”
- CFEclipse | Editor | Check “Highlight current line”
- CFEclipse | Editor | Appearance color options | Current line highlight: rgb(232, 242, 254)
- Other CFEclipse preferences:
- Editor | Undo Steps: 255
- Editor | Check “Trim trailing spaces before saving”
- Editor | Check “Show line numbers”
- Editor | Line numbers color: rgb(128, 128, 128)
- Editor | Displayed tab width: 2
- Code Folding | Turn off the initial collapse on CFML and HTML comments
- There is something wrong with the handling of preferences for the CSS editor plugin. Whenever I attempt to open it, it generates a warning message “The currently displayed page contains invalid values.” and it won’t let me save or update the preferences under “CSS | Editor”. It seems to be related to the line “FAKE=true” that is getting stuffed into file .metadata/.plugins/org.eclipse.core.runtime/net.sourceforge.csseditor.prefs (in your default workspace folder) whenever the preferences for this plugin get updated. I manually removed that line and added the line “lineNumberRuler=true” to this file to turn on line numbers in the CSS editor.
- If the Browser view is open, the workbench throws an error on exit. The error doesn’t seem to cause any problems, but it is annoying.