The last ColdFusion Builder Extension you will install

This post is more than 2 years old.

I have to begin by apologizing. ColdFusion Builder is - already - a pretty darn cool tool. While it still has warts (and to be fair, it is still in beta), it has been my day to day programming tool for a few months now. One of the cooler features of CFB is how easy it is to extend it with custom extensions. You can find a bunch on RIAForge now. Unfortunately for them, though, I'm releasing an extension today that makes all of them pointless. (Warning, the size of this SWF is rather large - I recorded it on a large screen.)


Ok, so if you watched the video and returned, sorry to waste your time. I do have one redeeming point to this blog entry. You may have noticed that the file I was editing in the video was refreshed automatically. Extensions can do this, but there is a typo in the documentation. In order to refresh the file that was right clicked on, you can use the following code (taken from the 'fix bugs' extension):

<cfsetting enablecfoutputonly="true" showdebugoutput="false"> <cfparam name="ideeventinfo"> <cfset data = xmlParse(ideeventinfo)> <cfset myFile = data.event.ide.projectview.resource.xmlAttributes.path> <cfset projectName = data.event.ide.projectview.xmlAttributes.projectname>

<cffile action="read" file="#myfile#" variable="code"> <cfset code = "<cftry>#code#<cfcatch></cfcatch></cftry>"> <cffile action="write" file="#myfile#" output="#code#">

<cfsavecontent variable="res"> <cfoutput> <response> <ide> <commands> <command type="refreshfile"> <params> <param key="filename" value="#myfile#" /> <param key="projectname" value="#projectname#" /> </params> </command> </commands> </ide> </response> </cfoutput> </cfsavecontent>

<cfheader name="Content-Type" value="text/xml"><cfoutput>#res#</cfoutput>

Specifically, I believe the docs say to use <command name="refreshfile">, while what you really want is type instead.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Will Swain posted on 1/27/2010 at 7:37 PM

Excellent work Ray.

I do hope you realise that you have just made yourself, and me, and every other cf dev redundant. A trained chimp can now build in cf.


Comment 2 by Jim Leether posted on 1/27/2010 at 7:40 PM

Umm yeah....I'll take that Final Option with bacon and....umm....more bacon please.

Comment 3 by Raymond Camden posted on 1/27/2010 at 7:42 PM

You know what's better than bacon?

More bacon.

Comment 4 by Jushwago posted on 1/27/2010 at 8:10 PM

Bacon wrapped in bacon...

The Final Option should link to a "That was easy" button.

Comment 5 by Steve Good posted on 1/27/2010 at 8:11 PM

How do I send you my $1k? Is this a per install license or per app i'm building license? This is going to solve ALL of my problems... Yes, all of them.

Comment 6 by Raymond Camden posted on 1/27/2010 at 8:13 PM

Steve, I believe I said 8k. But for you, I'll make it 7999. Just for opening day though.

If I sell one license, I may be able to buy a Apple Tablet.

Comment 7 by Guust Nieuwenhuis posted on 1/27/2010 at 8:16 PM

Ray, $8.000 is cheap for an extension that allows you to order pizza via your IDE!

Comment 8 by Steve Good posted on 1/27/2010 at 8:16 PM

Well in that case, make it two licenses. What a deal! By the way, here's an absolutely legitimate and real sneak preview of the Apple Tablet.

Comment 9 by Marko Simic posted on 1/27/2010 at 8:31 PM

Today I haven't heard single joke...and I prefer at least per day. After seeing this, I really don't need any. You made my day :)
Thanks :):)

Comment 10 by Gary Gilbert posted on 1/27/2010 at 8:52 PM

This proves that you are in fact a genious

Comment 11 by Steve posted on 1/27/2010 at 8:55 PM

I'm sold, as long as the "Final Option" option allows me to view the real-time Domino's order status.

Comment 12 by Raymond Camden posted on 1/27/2010 at 9:53 PM

This proves, in fact, that I come up with silly stupid ideas some times. Then again, that can be some of the most fun code to write.

Comment 13 by Jeremy Rottman posted on 1/27/2010 at 10:10 PM

Add a make pretty button option and I am sold. On a side note formatting in cfbuilder is terrible.

Comment 14 by Kris Korsmo posted on 1/27/2010 at 10:16 PM

[in Mr. T voice] You CRAZY, FOO!

Comment 15 by Chris Giminez posted on 1/27/2010 at 10:33 PM

man, I was so excited!
I gotta get on board with Builder though. I fired it up once and jumped back to dreamweaver. Not sure what I'm missing, but something good I am sure.

Comment 16 by Ben Riordan posted on 1/27/2010 at 11:58 PM

Darn it Ray! You've gone and made me order a pizza :)

Comment 17 by Dale Severin posted on 1/28/2010 at 2:29 AM

That made my day. I needed a smile and you gave me that.

Comment 18 by Don Blaire posted on 1/28/2010 at 2:30 AM

This will solve all my cf problems. Wow, thanks for this great solution.

Comment 19 by Kurt Wiersma posted on 1/28/2010 at 5:54 AM

Has any gotten the "openfile" command to work? This is key for the extension I am working but I cannot seem to get to to work. I even used Ray's sample code above and just change the type attribute.

Comment 20 by Raymond Camden posted on 1/30/2010 at 3:41 AM

Kurt, I got it to work. It is important that you ONLY send the filename XML:

<param key="filename" value="#myfile#" />

if you are sending the full path. For refresh, it worked ok with fullpath in filename and the projectname. When I switched to openfile, it didn't work until I commented out the projectname key. It _should_ be ignored (imho).

Comment 21 by Kurt Wiersma posted on 1/30/2010 at 6:51 AM

Wow this is great that did the trick. I found it to also work when I included the full path to the file. We need to file this as a documentation bug because it really through me off. Really they just need to add a few examples of each type and that would probably be enough (at least after they fix the "type" attribute omission).