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.
- 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.
- 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.
UPDATE (21 October 2009): This will no longer work with Beta 2 of ColdFusion builder. If you are looking for a more up to date technique for installing ColdFusion Builder on Linux, please see this post .
So I’ve managed to hack my way to getting Bolt installed on Linux, and
it wasn’t quite as painful as I thought it was going to be. It is
essentially a pure plug-in install, but we have to jump though a few
hoops to get the plug-in itself.
I would suggest starting with a clean installation of Eclipse 3.4.2, with a clean workspace, just to make sure there are no major issues.
Here are the steps you need to reproduce:
-
Download ColdFusion Builder for Windows. I used 32 bit, but I don't think it matters.
- in the terminal run: unzip cfbuilder_{your version}.exe, to extract all the content.
(Update 16/09/09, as Universal Extractor isn't actually needed, see comments)
-
Install Universal Extractor - http://legroom.net/software/uniextract
(I installed under CrossOver office, and it worked a treat, should work under Wine)
Extract the data from bolt.exe (I extracted to /tmp/bolt), using Universal Extractor
- Extract /tmp/bolt/InstallerData/Disk1/InstData/Resource1.zip, (I extracted to /tmp/Resource1/)
-
Under /tmp/Resource1/Z_/dist/installer you will find ’installerdist_zg_ia_sf.jar’
- Unzip this .jar file, you will find the /plugins and /features directories you need for a plugin install on Eclipse.
- Extract those 2 directories into your Eclipse installation.
- If you want the CF Builder Extension Samples, you can find them inside /tmp/Resource1/Z_/installer as ’samples_zg_ia_sf.jar’. Open up that archive and there they are!
- Fire up Eclipse, and you should now find you have a ColdFusion perspective!
So far, there is only 1 annoying bug I’ve found.
When using CTRL+J to insert a snippet, it inserts perfectly, however, I
find I have to click outside of Eclipse, and then back into Eclipse
with my mouse before I can edit again (very weird, I know). It's annoying, but I can work around it.
Hopefully we can provide enough free testing for ColdFusion Beta on
Linux, and prove we have a large enough user base, that we can get
supported on Linux.
Make sure any bugs you run into are reported to the
ColdFusion Builder Bug Tracker page, so that Adobe is aware of them.