Welcome!

You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion, Eclipse

ColdFusion: Article

Making the Switch to CFEclipse to Write ColdFusion Code

When I started writing ColdFusion code, ColdFusion Studio was the editor of choice

I've been using CFEclipse for about four months. When I started writing ColdFusion code, ColdFusion Studio was the editor of choice. Slowly I moved over to Dreamweaver as Homesite's support started to wane.

About a year ago, when I wrote an article on Dreamweaver, I used half of Dreamweaver and half of Homesite. Today, as I write this, half my development is done in CFEclipse and the other half in Dreamweaver. Unfortunately I used Dreamweaver as a really advanced text editor, something it's not that great at. CFEclipse seemed like the obvious alternative so I got it installed and I'm slowly learning its power. The learning curve for CFEclipse has been steep, since, coming from Dreamweaver, its interface is counterintuitive. Assuming that other people are having the same problem, I thought I'd share my thoughts.

Installing CFEclipse
CFEclipse is built on top of Eclipse, the popular Open Source editor used by many Java Programmers. There are plug-ins available for just about anything you could want to do, including Web development, UML modeling, database access, and version control with utilities such as Surround or CVS. CFEclipse is just another plug-in that makes Eclipse operate like ColdFusion Studio/HomeSite+. It has tag insight, color-coding, automatic indentation, and snippets.

Unfortunately, there's no CFEclipse install/setup wizard like you'd find in many other products such as Dreamweaver or ColdFusion. So the first step in setting up CFEclipse is to download Eclipse. First you need to install Eclipse and then you'll have to install the CFEclipse plug-ins. You can download Eclipse from the Eclipse.com web site at www.eclipse.org/downloads/.

Eclipse is unique compared to any other product I've used in having a no-install install. Once you unpack the file you downloaded (I grabbed a Win32 zip, however. tar and gz options also exist), the product is installed. That's all you need to run the program. There are no ini files and no registry installs. You're good to go. I unzipped the zip into a directory called "C:\Eclipse." Click on the eclipse.exe in that directory and this window will pop up similar to Figure 1.

This dialog asks you to select your default workspace. A workspace is how Eclipse manages projects, plug-ins, and other settings. What would you use workspaces for? Perhaps you'll want to set up a workspace for Java development and one for ColdFusion development. Or, perhaps you want a different workspace for each project you're working on. If you like me, you might want a workspace for each client. For purposes of this tutorial, you can use the default settings for your workspace.

The next step is to install the CFEclipse plug-in in your Eclipse workspace. From the "Help" menu, select "Software Updates" then "Find and Install." This will bring up the Install/Update window with two options: Search for updates to current features and Search for new features to install. Select "Search for New Features To Install" and click Next. You should see a screen as shown in Figure 2

Click the New Remote Site button and this window should show up (see Figure 3).

For the name enter CFEclipse. For the URL enter http://www.cfeclipse.org/update. Click OK and CFEclipse should be added to your sites. Make sure to select it and click Finish. CFEclipse will show a new window with all available updates (see Figure 4).

You have two options: either install the latest stable release of CFEclipse or the Bleeding Edge release. The Bleeding Edge release is usually an "in process" version. I prefer to go with the stable releases. Check what you want to install and click Next. Read through the license and click "I accept the terms of the license agreement." Click Next to review your updates. Then click Finish to install. CFEclipse will download. You'll see a feature verification window. (This is your last chance to cancel the install if you're having cold feet). Click Install then Yes to restart the workbench. CFEclipse is installed.

You'll find a much more detailed account of this install process in the ACME Guide located at www.stephencollins.org/acme/. ACME stands for Apache, ColdFusion, MySQL, and Eclipse and talks about setting up all them in a development environment.

Setting up a Project
Now that CFEclipse is installed, the interface doesn't look any different, does it? Nope, the interface doesn't look any different (yet). From the window menu, select Open Perspective and other. CFEclipse should be in the list of perspectives. Select it. A perspective is the default layout for your workspace.

In my Dreamweaver article, I talked about setting up a site. You'll probably want to do the same thing in CFEclipse. In CFEclipse, a project is the equivalent of a Dreamweaver site. This is how you can set it up:

1.  While in the CFEclipse Perspective, select File‡ New ‡ Project. You'll get a list of all available project types as shown in Figure 5. Expand CFEclipse and then select "CFML Project." Click Next (see Figure 5).

2.  This puts you in the new Project Dialog. Give the project a name and specify its directory location. Most likely you're going to be starting a new project so feel free to use the default directory, which points to the workspace directory. Click Finish. Now the project is created.

3.  CFEclipse isn't as full-featured in its project settings as Dreamweaver, but there are a few that you may want to make note of. In the navigator on the left side of the screen, you should see the name of the project and a list of all files/directories that are part of the project. Right-click on the project name and select Properties. Select CFEclipse properties and you should see something like Figure 6.

This will let you specify the project URL and the path to your snippet directory. If you're using different workspaces, but want to share snippets, you can do so here. You can also enter the docroot, which refers to the browser view, an option underneath the code view. If you want a quick browse of the files in your project, this is the way to do it without switching to a different window.

Dealing with Components
It seems that with every passing day I spend more and more time dealing with CFCs, either creating them or editing them. The CFEclipse creators didn't let me down in that regard. They have a few handy tools for creating and using components. This is how to use the wizard for creating a component:

  1. From the file menu, select "New‡ Project." From the project menu (see Figure 5) select CFC. You'll get the New Component wizard in Figure 7.
  2. Enter the path for the component, the component it extends, the hint, and the display name. Click Next.
  3. You can add properties (a k a Instance Variables) to the component in the next window. You can specify various options including the option to generate getter and setter methods, the hint, and the type.
  4. Click Next and you can add Functions to the component in this window. You can also specify each attribute in the component tag, such as access, return type, roles, hint, displayname, name, and output. Click Next.
  5. In this step you can add parameters to each function you have in the component. Click Finish to create the component.
Let's examine a few of the other windows in your workspace. Open up a CFC file. (I opened the address.cfc from my December '04 article for this column). In the right half of the screen you'll see a method view, which should look something like Figure 8.

This is a nice quick outline of all the methods in your CFC. If you double-click on one of the methods, you'll jump right to its place in the component. This can be handy when jumping around long components. The Method view won't work on a regular cfm file even if you have functions inside it, however, the outline view will. The outline view gives you a collapsible hierarchical view of your files.

Miscellaneous Features
There are a bunch of things about CFEclipse that make it a joy to work with. None of these things are so amazing that they'll make you want to switch from another editor, however if you do switch I'm sure you'll find them useful.

  • Snippets: CFEclipse has snippets. They are very similar to HomeSite-style snippets. My favorite feature here (something lacking in Dreamweaver) is that you can insert snippet variables such as the current date and time inside a snippet. You can read more details about it at the CFEclipse web site www.cfeclipse.org/index.cfm?objectid=C1F58502-EA69-0EC7-FF3FD40329552407.
  • Parenthesis Marking: When dealing with nested function calls or complicated SQL queries, you'll often end up with a lot of parenthesis. When your cursor is at one parenthesis, its foil will be highlighted so you can see the order of operations grouping. This is extremely useful.
  • Problems Tab: CFEclipse will point out some syntax errors (such as a missing end tag) and mark them visually and in the problems tab at the bottom of the screen. I hope that future versions will advance this feature, creating a CF pseudo-compiler that will catch syntax errors.
  • Task List: CFEclipse includes a simple task manager right in the IDE. In the middle of one thing you probably don't want to stop to fix another. So just make a quick note to come back to it.
  • Search and Replace: The multiple file search and replace feature is a great way to search through all the files in your project. You can get a flat list of results like with Dreamweaver or a hierarchical list sorted like the file structure. When you open a template that has search results, CFEclipse will visually highlight those features with a bullet next to the scroll bar.
  • Hiding Panels: By clicking the square in the top right corner of a panel, CFEclipse will expand any panel to the full size of the screen. I use this a lot to expand the code view.

Final Thoughts
CFEclipse isn't perfect yet. (Is anything ever perfect?) But it sure stands out as a quick editor that's not a resource hog. I found it does almost everything I need. And hey, it's free. It's really hard to beat free. Check it out at www.cfeclipse.org.

More Stories By Jeffry Houser

Jeffry is a technical entrepreneur with over 10 years of making the web work for you. Lately Jeffry has been cooped up in his cave building the first in a line of easy to use interface components for Flex Developers at www.flextras.com . He has a Computer Science degree from the days before business met the Internet and owns DotComIt, an Adobe Solutions Partner specializing in Rich Internet Applications. Jeffry is an Adobe Community Expert and produces The Flex Show, a podcast that includes expert interviews and screencast tutorials. Jeffry is also co-manager of the Hartford CT Adobe User Group, author of three ColdFusion books and over 30 articles, and has spoken at various events all over the US. In his spare time he is a musician, old school adventure game aficionado, and recording engineer. He also owns a Wii. You can read his blog at www.jeffryhouser.com, check out his podcast at www.theflexshow.com or check out his company at www.dot-com-it.com.

Comments (4) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Carlos Corredor 04/18/06 09:14:35 PM EDT

As a result of reading your article, I downloaded and installed Eclipse. It looks like the CFEclipse HELP does not contain anything. Is this correct? or did I do something wrong? I tried finding this information in eclipse.org, but no luck. If you have time, could you please give me some ideas on this? Thank you, Carlos

Kris 04/14/06 09:25:46 AM EDT

I think figure 6 should point to something else. Houser-fig-6.gif and Houser-fig-4.gif are the same image (just has different title).

SYS-CON India News Desk 04/12/06 06:11:04 PM EDT

About a year ago, when I wrote an article on Dreamweaver (http://coldfusion.sys-con.com/read/48232.htm), I used half of Dreamweaver and half of Homesite. Today, as I write this, half my development is done in CFEclipse and the other half in Dreamweaver. Unfortunately I used Dreamweaver as a really advanced text editor, something it's not that great at. CFEclipse seemed like the obvious alternative so I got it installed and I'm slowly learning its power. The learning curve for CFEclipse has been steep, since, coming from Dreamweaver, its interface is counterintuitive. Assuming that other people are having the same problem, I thought I'd share my thoughts.

SYS-CON Brazil News Desk 04/12/06 04:26:01 PM EDT

About a year ago, when I wrote an article on Dreamweaver (http://coldfusion.sys-con.com/read/48232.htm), I used half of Dreamweaver and half of Homesite. Today, as I write this, half my development is done in CFEclipse and the other half in Dreamweaver. Unfortunately I used Dreamweaver as a really advanced text editor, something it's not that great at. CFEclipse seemed like the obvious alternative so I got it installed and I'm slowly learning its power. The learning curve for CFEclipse has been steep, since, coming from Dreamweaver, its interface is counterintuitive. Assuming that other people are having the same problem, I thought I'd share my thoughts.

@ThingsExpo Stories
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to gre...
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develop...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.