Archive for the ‘Coldfusion Builder’ Category

Setting print margins using Eclipse to maintain line character length

Friday, May 14th, 2010

Sometimes you may have standard line lengths with which to work when writing code. If this is the case and your using Coldfusion and Eclipse with the cfEclipse plugin you can maintain the character length consistency by setting up the print margins to n character length.

Point being that when running the cfeclipse plugin you need to choose CFEclipse > Editor in the preferences left navigation. In the options you will check ‘Show print margin’, set the ‘Print margin column’ text field to the desired character length, and if you choose the ‘Print margin’ option in the ‘Appearance color options’ select box. Then choose the color you wish the margin to be. This will set a line length that will show in the code editor pane. Of course it will not wrap the line. It is still your duty as a developer to wrap appropriately. Nonetheless it does give you a guide for where the line should wrap at least.

If you’re writing Java then you would select General > Editor > Text Editors in the preferences pane.  Although the display is slightly different, generally follow the same steps as above for showing the print margin.

If you’re using Coldfusion Builder you will follow the same exact directions as listed just above for showing the print margins writing Java.

Lastly, if you’re using Flex Builder 3 you will again follow the same directions as above for showing print margins writing Java.

Getting the full file path of a Coldfusion Component in dot-notation

Sunday, April 11th, 2010

When you are creating an instance of a cfc using the <cfobject> tag or createObject() method you need to specify the path to the desired component via a dot-notation file path.  All-in-all this is little more than a file path where the back-slashes are replaced with periods.  However, these paths are not full local paths like when using an absolute path for an image for example.  So the file path will not begin with ‘/Applications’ (if on a mac) or ‘C:/’ (if on windows).  Instead the path begins in the server root, which for Coldfusion is the ‘wwwroot’ directory.

If you are running a package of cfcs or are creating instances from different parts of your application I would recommend creating a mapping to the package or directory containing the cfc(s).  This will save you some work in the future if, say, the application directory structure changes.  You can get the full dot-notation path by introspecting the cfc you are creating an instance of.  I’ve created a short video showing a few ways of getting this file path pretty quickly.  Watch the video.

Refreshing the Services Browser in Coldfusion Builder

Sunday, February 14th, 2010

Quick post on refreshing the Services Browser in the new Coldfusion Builder. I found it to be a little frustrating that the Services Browser does not contain a refresh button. The problem only occurs when you have Coldfusion Builder open, create a cfc method, and then try to access it through the Services Browser. If you would like more info on using the services browser I’ve posted on it here with a video.

Anyways, if you create a cfc method you’ll notice that it obviously doesn’t immediately show up in the Services Browser pane.  To refresh the browser you need to scroll all the way to the top and find the top level called whatever the name of the server you’re working off of is named.  Whatever it’s named, rest assured that it is the top level of the Services Browser.  To refresh, find this top level, right-click and choose to refresh.

So, it’s not the most intuitive thing I’ve encountered, but once you know it it’s pretty simple to refresh.

Using the Services Browser in Coldfusion Builder

Saturday, January 9th, 2010

I’ve been using Coldfusion Builder now since the first beta and have to admit that I’ve been converted. I come out of the Dreamweaver world, which still has some features that I’m still very fond of that I don’t find in the Eclipse build. Before Coldfusion Builder was released I did download Eclipse and install the Coldfusion extensions, played with it little bit, and then went back to Dreamweaver to never return. That is until Coldfusion Builder was released. An IDE just for me I thought, how special.

Anyways, I’ve been using Coldfusion Builder ever since.  So while using the Services Browser may sound repetitive for the seasoned Eclipse user, I wanted to post about it anyways to make life easier for those like me.  So when you open Coldfusion Builder you get a set of panels with tabs on the bottom.  One of these tabs is called ‘Services Browser’.  If you don’t see it you can go to the Windows > Show View > Services Browser.

Once you have the panel open you should see a list of all the cfc packages on your server that is configured for Coldfusion Builder.  You can further expand each package to show the individual cfcs in each package, and then each function in an individual cfc, and on to each argument required by each function.  You can right click these options to insert cfobject tags or script or cfinvoke tags.  This is a huge timesaver as it writes everything except for the value of the arguments to be passed to the given function.

I’ve included a short video to help better demonstrate this feature. Click here to watch.