Refcard #143

ColdFusion Builder 2

Faster Coding, Less Errors

Check out the improvements Adobe made to its popular Builder 1. This DZone Refcard will take you through installation and starting a new project, to server connections, views, and search.

Free .PDF for easy Reference

Written by

Terrence Ryan Evangelist, Adobe
Refcard #143

ColdFusion Builder 2

Faster Coding, Less Errors

Check out the improvements Adobe made to its popular Builder 1. This DZone Refcard will take you through installation and starting a new project, to server connections, views, and search.

Free .PDF for easy Reference

Written by

Terrence Ryan Evangelist, Adobe
Table of Contents

About ColdFusion Builder 2


Starting a New Project

Connecting to Servers



Working With Code


Section 1

About ColdFusion Builder 2

ColdFusion Builder 2 is the next version of Adobe’s Eclipse- based IDE for ColdFusion. Version 2 comes with both new features and enhancements to the original. Most of the new features focus on productivity and customizability.

New Features and Enhancements

New features in ColdFusion Builder 2 include:

  • Code formatting
  • Navigation keyboard shortcuts
  • Task editing
  • ColdFusion search interface
  • Quick fix

Enhanced features include:

  • Code folding
  • Code assist
  • Customizability
  • Extensions
  • Basic performance
Section 2


ColdFusion Builder 2 is an Eclipse plugin. Like the previous version of Eclipse, it can be installed in one of two methods: standalone and plugin. Which one you chose will depend on if you are already using Eclipse and if it makes sense for you to include ColdFusion Builder 2 in your workflow.


Standalone creates a packaged version of ColdFusion Builder 2, which includes Eclipse. It will be labeled ColdFusion Builder 2 and has icons and splash screens that reflect this. However, most of these differences are cosmetic only. It’s still Eclipse, and this version of it is fully capable, so you can use other Eclipse plugins in this install.


The plugin version requires you to have Eclipse 3.6 or higher already set up on your machine and prefer to use it. This version installs itself as a plugin into that copy. All of your screens will still say Eclipse, and ColdFusion will merely be another perspective. ColdFusion Builder 2 can work with any version of Eclipse you have pulled down from eclipse.org or a packaged Eclipse install like Flash Builder.

Section 3

Starting a New Project

The basic collection of code in ColdFusion Builder 2 is a project. Many developers set up one ColdFusion Builder 2 project per ColdFusion application. However, a one-to-one match is not required. Some people make the root of their project the root of their web server and have all of the applications under one giant project. This Refcard will show how to do a one app to one project match.

New Project

Opening up a new installed version of ColdFusion Builder 2 should show you something similar to what is shown above.

To create a new project:

  1. Create a folder in your ColdFusion’s webroot named “SampleProject”.
  2. Go to the File Menu > New > ColdFusion Project.
  3. Give your project a name: SampleProject.
  4. Uncheck the Use Default Location Checkbox.
  5. Hit the Browse button and navigate to your ColdFusion webroot.
  6. Create a new folder named “SampleProject”.
  7. Make sure it is selected and click Choose.
  8. Click Finish.

To start experimenting with ColdFusion Builder 2, we will need a ColdFusion file, called a template.

To create a new ColdFusion template:

  1. 1. Go to the File Menu > New > ColdFusion Page.
  2. If Location is blank, click the Browse button.
  3. Select “Sample Project”.
  4. Click Ok.
  5. Set Name to “index.cfm”.

We could also use a ColdFusion Component to show some things off.

To create a new ColdFusion Component:

  1. Go to the File Menu > New > ColdFusion Component.
  2. If Location is blank, click Browse.
  3. Select “Sample Project”.
  4. Click Ok.
  5. Set the Component Name to “utility”.
  6. Check the box labeled Generate Script Style Code.
  7. Click Finish.
  8. Add the function listed below to utility.cfc between the two curly brackets:

public string function getToday(){ 
return dateformat(now());

You now have files to test. To get the full use out of ColdFusion Builder 2 we need to configure it to communicate directly with our ColdFusion server.

Section 4

Connecting to Servers

To get the most out of ColdFusion Builder 2, the IDE needs to be in communication with your ColdFusion Servers. This allows the IDE to get at information in your environment that it can then use to create Code Insight, which are coding hints that can save you keystrokes. The IDE looks at information like your datasources, mapped CFCs, and existing variables to use in Code Insight.

Connecting to your server gives you another advantage - you can control them right in the IDE. With this linkage, you can start/stop/restart your development server right through ColdFusion Builder 2. You can also administer and read log files.

It’s recommended that you do your development against a locally installed version of ColdFusion on the same workstation as ColdFusion Builder 2. We’re going to assume you have a default install of ColdFusion running the ColdFusion Web Server. If you are using your own web server like Apache or IIS, your settings may vary.

To configure a local server:

  1. Find the Servers tab in the bottom of the IDE window.
  2. In the top of that click the New Server icon (a server tower with a plus sign over it).
  3. Set the following values:
    • Name: localhost
    • Host Name: localhost
    • Select Is Local from the radio box.
    • WebServer Port: 8500
    • Skip down to Other Setting.
    • Put in your RDS username and password.
  4. Click the Next button to move on and set the next set of values:
    • Server Home:
      • On OSX : /Applications/ColdFusion9
      • On Windows: C:\ColdFusion9
    • Document Root:
      • On OSX : /Applications/ColdFusion9/wwroot
      • On Windows: C:\ColdFusion9\wwwroot
  5. Click the Finish Button.

ColdFusion Builder 2 now knows about your server. We just need to tell “SampleProject” to use that server.

To configure your project to use the server:

  1. In the left hand Navigator window Right Click SampleProject.
  2. Choose Properties.
  3. Select ColdFusion Server Settings.
  4. Select “Localhost” from the list.

To see if this is working we need to preview index.cfm

Preview webpage:

  1. Open index.cfm.
  2. Type <cfoutput>Hello World #Now()#<cfoutput> in the editor window.
  3. Choose File > Save.
  4. Locate the tab at the bottom of the editor that says Source. Next to this, you should see tabs labeled Safari, IE, Firefox (depending on what you have installed). Choose the browser. “Hello World” should appear in bold.
Section 5


Like other Eclipse, extensions the work areas in ColdFusion Builder 2 work are divided into regions called views. Each view has a specific area of concern or purpose. All of these views make up a perspective, which is a collection of views with a singular broader purpose.


The navigator is a basic view that comes with Eclipse. It allows you to see and organize your projects and files.


The File view allows you to navigate the file system of your workstation independent of any projects you may have set up. This is useful if you need to quickly open a file from a project before you started using ColdFusion Builder 2 and projects.

The file view can also is connect to FTP/SFTP servers. This means that you can review remote files and edit code on them.


We used the server view previously to add a server. However, it can do more. Through this interface you can do the following:

  • See current status
  • Start/Stop/Restart Server
  • Launch the Administrator
  • Launch the Server Monitor



When you start your ColdFusion server via the Servers view, the console output for the server is printed here. This can be very useful for seeing errors occur in real time. Also content that is written to the main application log for your server will show up here. This means you can use CFLog to make content appear in the console. CFDump and ORM operations can also post content here.

Tail View

Tail View allows you to see the contents of a file updated in real time. This is very useful for targeting the error log of your ColdFusion server. However, it’s important to note that you are not limited to ColdFusion logs. Any text file on your system can be see this way, like your webserver logs, or mail logs.


This view allows you to install, review information about, refresh, and delete ColdFusion Builder 2 Extensions. These will be talked about separately.


Outline presents organized version of your highlighting major structures in your code. You can use the outline to click through to those structures in your code. It is configurable, sortable and filterable, so you can choose what shows up in the outline.

A great use of this is when you inherit a project where the functions in CFCs aren’t alphabetized. You can easily go to the Outline view, filter for functions, and then sort alphabetically.

RDS Views

RDS stands for Remote Development Services in the ColdFusion world. It allows developers to access key pieces of information about a remote server. It has be set up as part of your ColdFusion server install. Be aware that it is perfectly reasonable to have installed on your local install of ColdFusion, but it is discouraged on public facing or shared hosting machines due to the large amount of information it makes available.

RDS Dataview

RDS Dataview allows you to see and interact with datasources that you’ve setup on your ColdFusion server. It allows you to see tables, views, columns, and column definitions. Using context menus from this view you can activate the RDS Query Viewer.

RDS Dataview

RDS Query Viewer

This view is a interactive query window that allows you to test SQL SELECT statements against your datasources. Note that it only allows SELECT, you can not use it to alter data in the datasource.

RDS Fileview

This allows you to browse the file system on your ColdFusion server. This is obviously much more useful for remote servers than for your local system.


Snippets allow you to create brief bits of reusable code, organize them, and pull them. You can even create shortcuts that you can use to pull snippets into your source code using shortcut keys.

To Create a Snippet:

  1. Go to the Snippet View.
  2. Click the Plus icon.
  3. Set the following values:
    • Name: Quick Date
    • Trigger Text: qd
    • Start Block: <cfoutput>#DateFormat(Now())#</cfoutput>
  4. Click Ok.

You should now have a snippet named Quick Date in your Snippet View.


To use a Snippet

  1. Open index.cfm.
  2. Double Click “Quick Date” in the Snippets View. Date code should appear.

However we can do that even faster. Delete that quick date in index.cfm.

To use Trigger text:

  1. In index.cfm type “qd”.
  2. Now hit CTRL/CMD + J. The date code should appear.


The tasks view collects all of your tasks that you’ve marked in comments like “TODO:” and allows you to quickly see, prioritize, and navigate to the code they refer to.

Extension Specific Views

ColdFusion Builder Extensions are added pieces of functionality written in ColdFusion code and XML instead of Java as are most Eclipse extensions. These extensions have the ability to create their own views.

Section 6


One of the most significant updates to ColdFusion Builder 2 is the new search interface. Previously, the search interface defaulted to the default Eclipse search tool. Targeted to Java developers, the Eclipse search did not fit ColdFusion developers well.

For version 2, ColdFusion Builder has a customized search tool that allows for searches against common ColdFusion code concepts. These include Individual projects, open files, FTP locations, etc.


Section 7

Working With Code

The editor was a major focus of attention this go around with ColdFusion Builder 2. There was an eye towards making developers do more with less typing and removing the need to lookup language references.

Code Assist

Code Assist in ColdFusion Builder 2 refers to features that provide intelligence around the language and syntax of CFML and CFScript as implemented by ColdFusion.

Required Attributes

ColdFusion Builder 2 can prompt you when you are using a CFML tag with all of the attributes. Additionally, it separates attributes into two groups: required and optional. Finally, when you are chose an attribute, ColdFusion Builder 2 will write out all of the required attributes for you.

To see Required Attribute Code Assist in action:

  1. Open and delete any code in index.cfm.
  2. Type "<cfmail".
  3. Hit Space and wait. A drop-down list of attributes will appear. A list will appear divided between required and optional as shown in the following figure.
  4. Hit Enter. All required fields will be dropped into code as shown in the following figure.



Data Type Specific Assist

Another way code Assist can help you save time is presenting a constrained list of options based on the data type that is expected by code you are calling.

To see Data Type Specific Assistin action:

  1. Open and delete any code in index.cfm.
  2. Create a struct.
  3. Create an array.
  4. Create a query.
  5. Type "<cfloop query=". You will only be prompted with query for option as shown below.


Function Specific Assist

ColdFusion has a very large set of built-in functions. Remembering function, attribute, and attribute order for every function is daunting. Function specific assist can help.

To see Function Specific Assist Code Assist in action:

  1. Open and delete any code in index.cfm.
  2. Type "<cfset test = date".
  3. Hit CTRL/CMD, Shift and Space.
  4. From list of options, choose dateAdd. The dateAdd function should be added to code as shown below.


You’ll notice that Quick Fix didn’t just make the function for you, it added your arguments as well. Quick fix also works on CFCs , and functions in those CFCs. Quick fix will work in either CFML or CFScript.

Keyboard Shortcuts

Keeping with the theme of developer productivity, ColdFusion Builder 2 has added a few keyboard shortcuts that can speed up navigating around your code by reducing the amount of mouse work you have to do.

All of these keyboard shortcuts are customizable. In addition to those provided, ColdFusion Builder 2 allows for the creation of your own keyboard shortcuts.

Jump to Next/Previous Attribute

This shortcut will navigate to the next or previous attribute in a given CFML tag.

Go to Next/Previous Member

This will go to the next member of a related group of code constructs. You can navigate between functions in a CFC or cases within a switch, try/catch statements, and if/elses. This works in CFML or CFScript.

Jump to Matching Tag

This will navigate to the open or close of a statement. This works in either CFML or CFScript.

Select Tag Block

This will highlight the unit of code your cursor is in. Pressing multiple times will climb the hierarchy of your page. For example, if you are in a switch/case statement with multiple lines, pressing once will select the line you are own. Pressing again will select the entire case you are in. Again will select the entire switch block.

Code Formatting

ColdFusion Builder 2 includes a Code Formatting tool that allows you to take messy, inconsistent CFML and CFScript code and render it perfectly formatted.

To see Code Formatting in Action:

  1. Find some poorly formatted code in your editor
  2. Highlight the code. Right-click and select Format. You can configure options for formatting including whitespace, capitalization, line length, and tabbing settings as shown below.

If you are not satisfied with the code as is formatted, you can configure options for formatting. You have the ability to configure whitespace, capitalization, line length and tabbing settings among others as seen below.

Code Formatting

Section 8


ColdFusion Extensions allow you to extend ColdFusion Builder 2 features and functionality with ColdFusion. Using some XML to wire ColdFusion Builder 2 views to backend ColdFusion code, you can make the IDE do anything ColdFusion can do.

Installing Extensions

Extensions are packaged as zip files. You manage the install of them through the Extensions view.

To Install an Extension:

  1. Click the tab on the Extensions View to see all currently installed extensions.
  2. You may have some already installed. If you currently have one named Apptacular installed. If you do, highlight it and click the red X icon in the Extensions toolbar to delete. Choose Completely uninstall.
  3. Click the Plus Icon to add an extension.
  4. Navigate to where you installed ColdFusion Builder.
    /Applications/Adobe ColdFusion Builder 2 on OSX
    C:\Program Files\ Adobe\Adobe ColdFusion Builder 2 on Windows
  5. Drill into the subfolder “extensions”.
  6. Click apptacular.zip and click Open. The Extension wizard will open.
  7. Click Next.
  8. In Select Server choose localhost. Click Finish.
  9. When you are notified of success, click Ok.

Using Extensions

ColdFusion Builder extensions can be used in a variety of ways. They can generate code. They can analyze code. There’s even one that will translate content in your editor window from one written language to another, using the Google Translation API. In short they can do anything ColdFusion can do.

Apptacular is a scaffolding code generator.

To use Apptacular:

  1. Create an empty project named “cfartgallery”.
  2. Right-click project in project view. Choose Apptacular > Create Application. Apptacular will open up it its own view.
  3. Pick cfartgallery from the drop down list of datasources.
  4. Click Generate Application. The application should give a “Success” message.
  5. Refresh the cfartgallery project.

All of these files are a scaffolded admin application for the CFArtgallery. It’s put together with ORM CFC’s, custom tags, and a lightweight application framework.

Finding Extensions

The largest concentration of extensions current resides at RIAForge.com. By April 2011, there were over 50 Extensions for ColdFusion Builder 1 and 2. It’s expected that many of the major frameworks will release extensions to go along with their tools.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}