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
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 ...
In his keynote at 19th Cloud Expo, Sheng Liang, co-founder and CEO of Rancher Labs, discussed the technological advances and new business opportunities created by the rapid adoption of containers. With the success of Amazon Web Services (AWS) and various open source technologies used to build private clouds, cloud computing has become an essential component of IT strategy. However, users continue to face challenges in implementing clouds, as older technologies evolve and newer ones like Docker c...
DXWorldEXPO LLC announced today that ICC-USA, a computer systems integrator and server manufacturing company focused on developing products and product appliances, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City. ICC is a computer systems integrator and server manufacturing company focused on developing products and product appliances to meet a wide range of ...
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
Michael Maximilien, better known as max or Dr. Max, is a computer scientist with IBM. At IBM Research Triangle Park, he was a principal engineer for the worldwide industry point-of-sale standard: JavaPOS. At IBM Research, some highlights include pioneering research on semantic Web services, mashups, and cloud computing, and platform-as-a-service. He joined the IBM Cloud Labs in 2014 and works closely with Pivotal Inc., to help make the Cloud Found the best PaaS.
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...
DXWorldEXPO LLC announced today that All in Mobile, a mobile app development company from Poland, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. All In Mobile is a mobile app development company from Poland. Since 2014, they maintain passion for developing mobile applications for enterprises and startups worldwide.
Headquartered in Plainsboro, NJ, Synametrics Technologies has provided IT professionals and computer systems developers since 1997. Based on the success of their initial product offerings (WinSQL and DeltaCopy), the company continues to create and hone innovative products that help its customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business or per...
We are seeing a major migration of enterprises applications to the cloud. As cloud and business use of real time applications accelerate, legacy networks are no longer able to architecturally support cloud adoption and deliver the performance and security required by highly distributed enterprises. These outdated solutions have become more costly and complicated to implement, install, manage, and maintain.SD-WAN offers unlimited capabilities for accessing the benefits of the cloud and Internet. ...
Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
I think DevOps is now a rambunctious teenager - it's starting to get a mind of its own, wanting to get its own things but it still needs some adult supervision," explained Thomas Hooker, VP of marketing at CollabNet, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"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.
Major trends and emerging technologies – from virtual reality and IoT, to Big Data and algorithms – are helping organizations innovate in the digital era. However, to create real business value, IT must think beyond the ‘what’ of digital transformation to the ‘how’ to harness emerging trends, innovation and disruption. Architecture is the key that underpins and ties all these efforts together. In the digital age, it’s important to invest in architecture, extend the enterprise footprint to the cl...
Data is the fuel that drives the machine learning algorithmic engines and ultimately provides the business value. In his session at Cloud Expo, Ed Featherston, a director and senior enterprise architect at Collaborative Consulting, discussed the key considerations around quality, volume, timeliness, and pedigree that must be dealt with in order to properly fuel that engine.
Two weeks ago (November 3-5), I attended the Cloud Expo Silicon Valley as a speaker, where I presented on the security and privacy due diligence requirements for cloud solutions. Cloud security is a topical issue for every CIO, CISO, and technology buyer. Decision-makers are always looking for insights on how to mitigate the security risks of implementing and using cloud solutions. Based on the presentation topics covered at the conference, as well as the general discussions heard between sessio...
IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
No hype cycles or predictions of zillions of things here. IoT is big. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, Associate Partner at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He discussed the evaluation of communication standards and IoT messaging protocols, data analytics considerations, edge-to-cloud tec...