Hire Me! I'm currently looking for my next role in developer relations and advocacy. If you've got
an open role and think I'd be a fit, please reach out. You can also find me
on LinkedIn.
In my last blog entry, I talked about how you can use ColdFusion Builder to perform code refactoring - essentially - supporting the updating of your APIs through the rest of your code base. You change some method from doX to performX, and ColdFusion Builder can help you update any scripts that make use of that code. Today I'm going to talk about the obvious related feature to this - references.
In order to perform any refactoring, ColdFusionBuilder first has to actually find the stuff that needs updating. There are a few ways you can make use of this feature. First - you can right click on a file in your Navigator view. Unfortunately you can only do this for CFM and CFCs, and not JavaScript or CSS files. In my first test, I simply ran a references report on my layout custom tag for BlogCFC:
Is this isemail test?
CFBuilder wasn't fooled by this. Nice! Now the next thing impressed me even more. I changed my template to this:
Is this isemail test?
no test case #ISEMAIL()# dude
Once again, CFBuilder didn't find the call. Can you guess why? No cfoutput! As soon as I wrapped the line in cfoutput tags, CFBuilder found it. On the flip side, when I tried this template:
Is this isemail test?
no test case #ISEMAIL()# dude
<cfset foo = isEmaiL()>
CFBuilder still found it. All in all, pretty impressive. While refactoring makes me nervous (warranted or not), I can see using the references feature quite a bit!