Sam Farmer head shot

Sam Farmer

Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened.

But I have become a passionate and pretty good web developer.


debugClean Version 2

I added a few new features for version 2 of debugClean based on some of the features added to ColdFusion Builder 2.0:

  • Opens in a view.
  • Click on each issue and have the file open up with the line highlighted.
  • The issues are listed in reverse order. This means that when you click on each item and fix it often by removing the line the next issue will be on the correct line.
  • Works on CF and non-CF files.

Check it out and download from RIAForge.

10 Little Ones: Specify Language Version on Per Project Basis in Builder (#4)

The ColdFusion 10 beta also includes ColdFusion Builder 2.0.1 beta (scroll down page). One nice addition is the option to specify language version on a per project basis rather than per editor.

For developers who work on multiple versions this is a great improvement.

Add a keyboard shortcut to a Builder extension

To set up a keyboard shortcut to a ColdFusion Builder extension:

  1. Use the extension at least once.
  2. Open Preferences > General > Keys
  3. In the 'type filter text' field type part of the extension name
  4. Select the extension
  5. Enter a binding. Click on 'Apply'.

So far I have found this works with extensions that open a view. I find it quite useful for Codey.

I've always liked how flexible Eclipse is with its keyboard shortcuts. Two of my customized favorites are command-shift-Z (control-shift-Z) for a quick view of the navigator and command-shift-A (control-shift-A) for the MXUnit view (good for making reds go green).

debugClean, fixed for most Windows installs

D'oh, I realized that debugClean had an issue with IIS and the different CGI variables it passes back.

Anyhoo, its now fixed and can be downloaded from the project home page.

What it does

Checks a file or folder for any debug code that should probably be stripped before moving to staging or production.

Looks for ColdFusion tags:
- cfdump
- writeDump
- cflog
- writeLog

Looks for JavaScript:
- console.log

The tags and functions it looks for can be configured to your taste in the _config.cfm file.

Codey: A Scribble Pad for ColdFusion Builder

I've written a new ColdFusion Builder extension, called Codey, that opens up as a View. After opening it is a little scribble pad to quickly run a few lines of code. Its inspired partially by how I often use the console log in Chrome -- writing a few lines of JavaScript or jQuery and see what happens.

After installing you can pull it up by either going to Window > Show View > Other > ColdFusion > Codey or Right-Click on a File and select Codey.

Once up enter code in the textarea and click Run. Both tags and script syntax are supported and the latter without defining cfscript first. This allows you to write code like:

a=now();
#a#

and have it work.

Errors are trapped within the code and the error returned.

The extension is on github and details are on RIAForge.

Getting more out of ColdFusion Builder: Task Tracking with Mylyn, SVN, Git Tools

ColdFusion Builder 2 Beta is built on Eclipse 3.6.1 aka Helios which brings a whole bunch of cool stuff. Of most interest are probably the task tracking tool Mylyn and source control plugins for Git, for SVN and CVS plus many others.

Installing is easy.

Go to Help > Install New Software... and from the drop down either:

  • Select 'Helios...'
    or
  • Click 'Add' and enter for Name: 'Helios', Location: 'http://download.eclipse.org/releases/helios'.
You should then see a screen like this one with all your options:


Open up the Collaboration category and you will find the options for Mylyn and source control plugins. The image also shows the other plugins you can add.

10 New ColdFusion Builder Keyboard Shortcuts

Let's start with the big changes: Abort and dump have new keyboard shortcuts. These are triggered by Cmmd+T or Ctrl+T, releasing all keys and then:

  • Abort (a)
  • Dump (d)

Other useful shortcuts for the Cmmd+T shortcut include:

  • Output (o)
  • Comment (m)
  • Set variable (=)
        This adds
  • Add a script block (s)

To see the rest in ColdFusion Builder press Cmmd+T, let go and look in the bottom right for tips on all the other options.

Select a code block (Cmmd-Option-B or Ctrl-Alt-B)
Here's how I like this one: Put the cursor in a code block, do the shortcut and the first outlying tag is all highlighted. Very useful for finding the end of a loop, if block or if you just want to cut the text.

Go to end tag (Cmmd-Opt-M or Ctrl-Alt-M)
Jump to the closing tag. Useful in a different way to select for when you absolutely have to be at the end tag.

Fold Code(Cmmd+Opt+F or Ctrl+Alt+F)
Place cursor on a tag then the commands and the code folds up. Builder will remember what you closed after opening and closing the file.

Loop through code assist (Ctrl+Space)
Press the combination once to see all possibilites, press again and see it filtered by type.

Navigate a file (Cmmd+Shift+Up Arrow Ctrl+Alt+Up Arrow)
In files this will navigate up and down function names, and in a cfc navigate property definitions as well.

Navigate function arguments or tag attributes (Cmmd+Shift+] or Ctrl+Space+])
New to Builder is the auto-insertion of function arguments when inserting. The key combination above allows navigation between the arguments going to the next argument to the right. Use [ instead to go to the left.

Ok, that is 10, and not including abort or dump, but here is one more for kicks:

Format Code (Cmmd+Shift+F or Ctrl+Shift+F)
Formating of code with the combination above for the whole file to be formatted. Select a group of lines to run just within the selection

Using these shortcuts has sped up my coding and kept me more focused on my work. If you find any great keyboard shortcuts let me know in the comments.

ColdFusion Builder 2 Real Quick: 9 new or improved features

I'll be writing more about ColdFusion Builder over the next few weeks but here are 9 new or improved features I really like:

  • Builder and the keyboard fell in love. The two shall remain intertwined forever. It's a beautiful thing really.
  • Code Formatting which is customizable and preferences shareable via an export file.
  • Way more keyboard shortcuts including ones to navigate through a file. (I have a blog entry on this coming up)
  • Better and more code assist — including by type of data.
  • Cool enhancements for extensions including adding views and opening other files.
  • Something called Quickfix that will add functions, cfm's, cfc's for you if you reference them and they don't exist.
  • A new Search with more options including directory and search over ftp.
  • Code Folding.
  • Use the Task View for TODO or FIXME or other configured options

Go ColdFusion Builder 2 Beta and try it out

My Recommendations for Beta:

  1. After installing, start it up in clean mode. Instructions here.
  2. Keep your version of ColdFusion Builder 1 around and use the same workspace. Then if you need to go back you still can.
  3. Its a beta and part of that means you get to voice what you like and what you would like changed. Provide enhancement requests and report bugs in the new bug tracker (its html and ColdFusion).

Eclipse or ColdFusion Builder Giving You Problems? Give It a Clean

Like most things in life, Eclipse (which ColdFusion Builder is built on) can do with a clean every now and then. Generally I find after upgrades, installs or if you are seeing performance issues, the first thing to do is give it a clean. And, while there, make sure you get behind the ears, scrub the feet, etc.

Fortunately it is pretty easy to give Eclipse a good clean — and without getting your computer wet. Just follow these instructions.

Update to debugClean and an interesting use of URL scope

Two updates to debugClean:

1. Bug fixed
For some users the same results would not refresh on subsequent uses of debugClean. This was caused by the underlying browser in Eclipse not refreshing. You may be shocked to hear that the browser causing this problem was Internet Explorer! At first I tried adding another variable to the url that is created when debugClean in fired up (its handlers/index.cfm if you want to see). However, this caused error after error and I eventually deduced that only one URL variable could be passed.

To solve this I created the name of the URL variable with createUUID() like so:

view plain print about
1work.cfm?#createUUID()#=#urlEncodedFormat( theXML.event.ide.projectview.resource.XmlAttributes['path'] )#

and in work.cfm have the following code to read in that variable:
view plain print about
1<cfloop collection="#url#" item="u">
2    <cfset path = url[ u ]>
3</cfloop>

2. Check for application/javascript
This one has caught me out a few times. will work in every browser except one. That missing browser? Internet Explorer! Though, by now, I should know better than to use application/javascript and instead to use text/javascript. Anyhoo the default configuration of debugClean will know check for application/javascript. This was as simple as adding it to the array in _config.cfm:

view plain print about
1request.lookFor = ["cfdump","writeDump","cflog","writeLog","console.log","application/javascript"];

Go to the main project page to download the latest version.

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.7. Contact Blog Owner