Trying the CFML Plug-in on IntelliJ

For a long time I’ve been meaning to try out the the IntelliJ CFML plug-in
for two reasons. One of which, I’ve always heard really good things
about the IntelliJ platform for editing Java, Groovy and Flex, and also
because as a Linux based ColdFusion developer, my CFML IDE options are
limited.

So I decided I was going to get some work done on JavaLoader,
to move it into a 1.0 Final, and I was going to do it all in IntelliJ
with the CFML plugin, and use that as a way of seeing how the CFML
plugin was going.

Installation
Installation was the biggest hurdle for me, as I ran into a lot of issues getting the plug-in installed and running.

From
what I could see, IntelliJ makes no mention that you need to set a
JDK_HOME variable in your environment. Except when you first run it and
get an error message. Once that was done however, it fired up with no
problems at all.

For
whatever reason, after running IntelliJ, the CFML plug-in didn’t show
up in the plug-in list.  If it had, I’m sure things may have gone a lot
smoother for me.

I then browsed to the plugin page, to download the plug-in manually.  Two things went wrong at this point.

  1. As far as I could see, IntelliJ does not describe anywhere how to install a plug-in manually. This
    is the only documentation I could find on installing a plug-in, and it
    was via the plug-in manager (see above), so it was not very helpful. It
    is very simple, you just unzip it and put it in the /plugins folder.
  2. I
    downloaded the wrong plug-in for my version on IntelliJ. I downloaded
    9.03 Ultimate edition, or if you look in the build.txt file that comes
    with IntelliJ, that’s Build IU-95.429.  Unbeknownst to me it’s that build number that is used on the plug-in download page (See Since build and Until build )
    that define what a plug-in is compatible with. Honestly I am confused
    as to why they don’t just use the IntelliJ product number, but maybe
    there is a good reason.

(Apparently this has since been fixed, and you can now install from the plug-in manager again)

Appearance
My
first thought when opening IntelliJ was “Wow, this is ugly”. I’m used
to working in Eclipse, and the Linux build of Eclipse takes the Ubuntu
theme that is currently set very nicely. So much so that people at
conferences often ask me how I get my Eclipse to look the way it does.
 In IntelliJ, the text wasn’t even anti-aliased.

I quickly found an Appearance
setting, and switch the theme over to GTK+, which I expect made
IntelliJ use Ubuntu native GTK rendering engine, and suddenly IntelliJ
matched my Ubuntu theme, and was much more pleasant to look at.  Eclipse
still looks more polished, but maybe that’s just because I’m used to
it.

Documentation
This
is where things fall down, unfortunately rather hard.  The only
documentation for the CFML plug-in is a blog that can be found here and a google group .
 This project is in desperate need of a website/wiki/Google
doc/anything that has some sort of structure. Skipping through blog
posts and searching the google group in an attempt to find that one
piece of knowledge you need is frustrating, to say the least.

Creating a Project
I
go to create a project, and… there is no ColdFusion Project. Uh oh.
 Fire off an email to the group and ask “What do I do now?”. (Update, I
just got told to create a Java project. Weird, but it works).

In
the mean time, I switch tacks, and import an existing Eclipse Project.
 IntelliJ asks me for a JDK, but is happy enough when I skip over it,
figuring I wouldn’t need one for a CFML project.  That worked quite
well, and I’m now on my way to editing ColdFusion.

Editing Files
Code
completion for variables and functions inside a CFM and/or CFC is one
of the biggest priorities for me, and in the plug-in, I have to say,
this feature works very well.

That being said, one thing that is missing for variable completion for me, is completion for variables such as arguments , application , server , CGI , etc, for which there are already bugs for.  That and CFC resolution is missing, which Builder does for things like createObject() etc, (somewhat).

Interestingly
enough there is no “New CFM” or “New CFC”, there is only “New File”,
which I didn’t find myself missing, except for when creating CFCs.  The
new CFC dialogue in builder is great, and if you’ve ever worked with
interfaces, having Builder generate the method stubs for you is pretty
cool as well.

Overall,
the responsiveness is very snappy, and code completion comes up almost
instantly, which is very nice. I prefer the function hinting in IntelliJ
to Builder, as it give you the hint per parameter as you are inside the
method, where as Builder only tends to give you the tooltip when you
first write the method.

While I didn’t get to play with it, there is also support for code completion of Java objects , including when being used with JavaLoader , which is not something ColdFusion Builder can do.

Live Templates
This
is more of a IntelliJ thing, but Live Templates blow CF Builder/Eclipse
Snippets out of the water. Wow.  I love being able to define a $FOO$
variable in my snippet and declaring that $FOO$ variable to complete().
IntelliJ then intelligently provides all the code completion that would
normally show up if I hit ctrl+space at that point. I think I’m only
just scratching the surface of what is possible with Live Templates, but
this feature is fantastic.

Learning Curve
IntelliJ
does some things differently to Eclipse, which takes a little while to
get used to.  That being said, you can switch the keyboard commands to
Eclipse style with a menu change (I did some extra tweaking above and
beyond that), so that is nice.

Price

The
CFML plug-in only works on the commercial version of Intellij. Licences
for personal use carries a price tag that is fairly similar to
ColdFusion Builder. Corporate licences cost a fair amount more.  For the
functionality provided by the CFML plug-in at this stage ,
I would recommend that if you are on Mac/Win, stick with Builder. You
will get more bang for your buck.  If you are on Linux, and refuse to
move OS’s (like I am), IntelliJ is well worth an evaluation, as the
price tag is very reasonable, and if you are looking to do Groovy, Flex
or Java work, IntelliJ already has that functionality bundled in.

Overall
I
have to say, once I got over the initial hurdles of installation, and
documentation, and became more comfortable with IntelliJ as a whole, it
because a really nice IDE to work in.  There are plenty of rough spots
around the edges, but I think with a few more revisions, this plug-in
could easily be a decent contender for ColdFusion Builder (especially if
it gets a debugger).

If
you are looking to purchase an IDE, I would still say stick with
ColdFusion Builder for now if you are on Mac/Windows, but if you are on
Linux, and don’t want to move, IntelliJ looks like a dark horse to watch
in the ColdFusion IDE space.

Learning More
If this has piqued your interest, the best place to really learn about this plug-in is the google group, so sign up there. The blog is also good for information about new releases and what new features are available.

Leave a Comment

Comments

  • dcsaltrock | September 8, 2010

    there is a 30 day trial , i guess the plugin would work with that … , nice rev , i look forward to javaloader final

  • Frank Priscoglio | September 8, 2010

    Mark, sounds promising.

    Does it support full cfscript in cfc’s?

  • Mark | September 8, 2010

    @Frank – good question.

    I had a *very* quick play. It’s not 100% there with script cfcs, but I could get code completion happening for functions, and you do get syntax colouring, although it is reporting some false positives for errors.

    I forgot to mention in my post (as @dcsaltrock rightly points out), there is a 30 day trial, so it’s easy enough to have a look for yourself.

  • Josh | September 8, 2010

    @Frank Yes it has support for full cfscript in CFCs

    One small gripe I have found is that it uses the same icon for both .cfm & .cfc files which makes it harder to differentiate between the two in a folder which contains both.

    Apart from that it is looking like a promising alternative to Eclipse.

  • Frank Priscoglio | September 8, 2010

    Sounds good, will definitely give it a try, just wish Adobe would release CFBuilder for Ubuntu/Linux. I have no issue with paying for it, I just want to use it under my preferred OS…Ubuntu..

  • johans | September 9, 2010

    If they added CF plugin support to JetBrains WebStorm I think it would be great lightweight alternative to CF Builder. It has great JS and CSS support.

  • Jamie Krug | September 9, 2010

    Mark, great review. I’m right there with you on all points. I will also mention that, while watching this plugin rather closely over that past 4+ months, I have seen tremendous progress and response. Bugs are raised and squashed quite quickly, and they’re extremely responsive to community input.

    One item I don’t believe you mentioned is that there’s MXUnit support built right into IntelliJ IDEA’s CFML Support Plugin. Like some other features, it’s very new and yet to fully mature, but it’s there and it’s a great start.

    There is some completion already there for createObject(), but I think it’s just for files/folders under your Web root, and it seems a bit buggy at the moment. That said, there’s definitely an open issue or two to address this.

    The fullly scripted CFCs are almost there. There’s autocompletion for functions and such, and the syntax highlighting is quite good. The false-positives for errors you mention seem to be primarily CF9/9.0.1 type syntax that’s new–in particular, reserved keywords like "abort" (as opposed to "abort()"). There are issues opened for this as well.

    Again, I agree. This has a lot of promise if active development continues as it has been, and even more so if we can get a debugger in there 😀 Cheers.

  • Mike Benner | September 9, 2010

    I had been using it for Java/Android/Flex/Rails development, so I figured I would give it a try for CFML a few weeks ago. I agree with most of your sentiments (especially the initial hurdles), but have to say it is nice have a unified IDE for all of my projects and being able to have modules that are all parts (Android App, Web App, etc) of one project available is great.

    My experience has been that it is also more performant than Eclipse on my Macbook Air which is a great benefit.

  • Jamie Krug | September 10, 2010

    BTW, I really didn’t mind the default appearance, but I hadn’t looked at the Settings/Appearance theme options, so thanks for pointing that out. I like "Nimbus"–not a big fan of the GTK+, and some others are just awful.