As ColdFusion developers, unlike many other languages, the one thing we simply don't have is code insight or object & method resolution for 3rd party Java or ColdFusion products. I understand that this is difficult to achieve for dynamic languages, but, just because it's "hard" is not an excuse, imo.
I'm a big fan of IntelliJ IDEA and it's the best tool for Java and Groovy development I've used - these guys know what an IDE should do and they also support open source projects. IDEA also gives you the ability to create Flex and Air projects. Recently, developer Valeria Nikolaenko, has built a CFML plugin for IDEA and has consistently been releasing updates. The most recent one fits especially nicely with any project that uses ColdFusion and Java together. Specifically, if you use Mark Mandel's JavaLoader you'll find this feature of particular interest. Basically, it allows you to get Java method resolution inside of CFML for classes loaded with JavaLoader. Check it out:
So, what we've done here is create a JavaLoader instance using createObject(...) and then we create a Java class, esapi, in the editor. When you type esapi. then hit Ctrl+Space, Voila!, all the methods and their signatures for the ESAPI class are presented in the editor. You do have to perform a few project set up tasks in order to make this happen in IDEA, assuming you've installed the CFML plugin already:
- Add your 3rd party jars to your project's class path
- Add the ColdFusion facet to your project and tell it where your webroot and subdirectory are located
- In your source code, tell the CFML plugin about your JavaLoader variable and jar locations: <!---@javaloader name="loader" jarPath="/home/webapps/cfesapi/lib/" --->

2 comments:
Billy, in case you hadn't noticed...
http://coldfusion-in-idea.blogspot.com/2009/09/mxunit.html
"I started a research towards including MXUnit support into my plugin. So keep up with blog posts ;)"
You bet, Jamie!
http://blog.mxunit.org/2009/09/intellij-to-include-mxunit-in-cfml-plug.html
Post a Comment