It walks you through installing CFEclipse and the ColdFusion Extensions from Adobe, using snippets (and the SnipEx server), tasks / todo lists, code / application wizards and so on.
If you're new to Eclipse or still on the fence about it, it'll be good reading.
It started with Michael Henke's blog, where he asked people to share their Eclipse perspectives so we could all see how different people work. The discussion has also taken place on the CFEclipse users' mailing list. And today, I saw Charlie Griefer's blog post showing a very minimal Eclipse layout. He explains that he has almost all of the non-editor views set up as Fast Views to keep the main area uncluttered.
So what is a Fast View? Instead of having the view available visible and "docked" somewhere, the view lurks in the gutter at the bottom of the Eclipse window and only springs up (on the left or on the bottom) when you click on the icon. As soon as the view loses focus, it minimizes again.
I'm still getting used to this new way of working but certainly clears up the working area. Thanx Charlie for pointing me in that direction!
Another one of those "learn something new every day" moments...
Some people I respect love oXygenXML and have gone ahead and paid good money for it.
So, my questions to y'all are:
Are you using oXygenXML?
If not, what are you using to edit XML?
If yes, what license did you buy and how much did you actually pay? (pro seems to be $225 which seems awfully expensive just for an XML editor!)
Feel free to file bugs and enhancements in the issue tracker - and thank you for using my code!
In Eclipse, go to Window > Preferences... > ColdFusion > Debug Settings. If you enable this option, the debugger will stop whenever any exception is thrown inside your code - even if the exception would normally be caught and handled by a try / catch block. When the debugger stops on an exception, an alert dialog is displayed showed basic details of the exception. This can be extremely helpful in debugging those problems caused by an exception being silently "swallowed" by your code - or being hidden by a try / catch that then throws a different exception.
There is also a caveat with this option: if you enable this, you lose the ability to view function local variable scope data. That means you might want to leave the option disabled for general use but turn it on when you need to figure out certain bugs. You can always use this option to locate an unexpected exception and then set a breakpoint at the appropriate line. Then disable the option and re-run your code so you can inspect function local variables in the function that throws the exception.
Is there a pop-up tag editor in CFEclipse that is vaguely like CFS / HS?
Yes, click on a tag then right-click and select Edit This Tag. You'll get a dialog box with all of the attributes of the tag that you can edit and save.
If you haven't yet switched to CFEclipse, I highly recommend you investigate it. It's the most powerful IDE for ColdFusion - and it's free!
Buy that man a bottle of JD! Buy him several!
First, if you haven't already done so, install cfcUnit.
Second, if you haven't already done so, you need to install the new CFUnit plugin. In Eclipse, Help > Software Updates > Find and Install... and search for new features on the CFEclipse update site. You should see a CFUnit 1.0.4 plugin. Install that and restart your workspace.
Third, download my facade CFC and put it somewhere that is web accessible (I put mine in my webroot).
Then configure the CFUnit plugin to use that location, under Window > Preferences > CFEclipse > CFUnit. Specify the URL to the directory containing the CFEclipseFacade.cfc you just downloaded.
Finally, open the CFUnit view (Window > Show View > Other and select it from the CFML section).
Now you can enter a CFC path - or search for CFCs - and run them directly in Eclipse.
First off, the CFUnit code is Windows-centric, assuming expanded file paths contain \ instead of testing for both \ and /. That was an easy fix but I really wish ColdFusion developers would think about this issue when they're providing code for others to use!
Second, the Eclipse facade for CFUnit has pretty much zero documentation and next to no comments so it took me a while to figure out that it assumes the facade is actually a test listener. Once I'd figured that out, it was relatively straightforward to convert it over to work with cfcUnit. Up to a point.
Update: I have a fully operational facade CFC for cfcUnit that works smoothly with the CFUnit plugin. I've sent a copy to Robert Blackburn to review and also to Paul Kenney. Once I have their feedback, I'll post the CFC here for folks to download (in a post containing instructions on how to set it up).
Surprisingly, this is my first exposure to jUnit. Yeah, I know, I'm such a big fan of cfcUnit, how can I never have used jUnit? Anyway, I write my TestFoo.java class with its setUp() and tearDown() methods and start writing testMyMethod() methods. Then it occurs to me: how do I run this? I'm so used to the browser-based runner for cfcUnit that I'd never thought about the Java equivalent.
Out of curiosity, I right-clicked in the editor panel displaying the test case and there, in the Run As... submenu: JUnit Test. Wow! Really? Could it be that simple? Yup! Up pops a JUnit view in the bottom panel running my tests and showing a red failure bar and list of failed tests. Perfect!
Well, of course my tests failed - I just wrote the tests. Next I'll write the code.
As is so often the case, Eclipse continues to surprise me in pleasant ways! Now, where's the cfcUnit plugin?
With that in mind, it's interesting to see that Code Gear has just announced Delphi for PHP - an IDE built with Delphi (and inspired by the existing Delphi IDE) but for PHP developers. It's Windows-only right now (because Delphi is Windows-only - BTW, HomeSite / HomeSite+ is a Delphi application which is why it too is Windows-only) and will cost $299.
That places it in pretty much direct competition with Zend Studio which also costs $299. Zend Studio is cross-platform, which is a big plug, and of course there is also the free PDT (PHP Development Tool) plugin for Eclipse.
Did you know that CFEclipse has a built-in web browser? Just hit Cmd-Shift-F5 (on a Mac - Ctrl-Shift-F5 on Windows?) to load the project root URL in the built-in web browser or Shift-F5 to load the current page in the built-in browser. While you're working on that page, you can easily re-run the test in the browser using F5 to reload the browser. Edit, Cmd-S (Ctrl-S on Windows), F5, edit, Cmd-S, F5. What a nice, simple workflow.
All you need to do to make this work is set the project root URL:
- Right-click on the project in the Navigator and select Properties
- Select CFEclipse Properties
- Enter the project root URL, e.g., http://localhost:8500/
- Click OK
Want to test out an idea without actually editing your project's files? Check out the "scribble pad" feature. Under Window > Preferences... > CFEclipse > Scribble pad define a file to use as a quick test bed for ideas. Define the path to the file, the project it lives in and the URL to it and then hit F8 to open the file (it has to exist so you might need to create an empty file in the appropriate location first). CFEclipse opens your scribble pad file in the editor and in the browser. Edit, Cmd-S, F5 and you're testing out your idea without touching your project's files!
Simple testing made easy with CFEclipse!
If you haven't discovered the joys of ant yet, you should read his blog entry and realize how much easier ant can make your life.
I've already updated. So should you :)
So, yes, the website is terribly out of date. CFEclipse is still chugging along tho', driven almost entirely by the wonderful Mark Drew. You can read the CFEclipse category on his blog to stay abreast of everything he is working on - including a new website "coming soon".
Remember that this is a volunteer project and anyone contributing does so on their own time, in addition to everything else they have to do (e.g., earning a living). If you find a bug, tell Mark or, better still if you know Java, get the source and try to figure out a fix and send Mark a patch. If you find the documentation wanting, write something to fill the gap and send it to Mark. If you want to help, send Mark a note - he has plenty of things that need doing and he'll line you up with a volunteer task!
Thank you for all your sterling work on CFEclipse, Mark!
Note that he is happy to take donations via his blog and he has a wishlist!
As Simeon notes, we're planning to move the Fusebox project to this new server too but we really want to create fusebox.org subdomains for it - the request has gone out to John Quarto-vonTivadar who owns the fusebox.org hosting setup to get these setup. I'll keep you posted!
The P4 perspective in Eclipse is pretty good to work with and the plugin provides rich context menus for accessing most everything you need.
Since a couple of folks have heard me talk about this and asked me to blog the 'how to' I figured that even in advance of Paul officially releasing this, I'd go ahead and explain what you can do with it and how easy it is to set it all up.
The thing you'll notice immediately is the HomeSite-style toolbars... nice!
The new site should become the one-stop-shop for the CFEclipse community, making it easier to find information and contribute to the project.
There are a lot of new features in the nightly builds, mostly added by Mark - thanx! Hopefully we can prepare an official 1.3 release shortly that will solidify those features in a public release.
The roadmap will continue to be updated as the details of the forthcoming releases are fleshed out.
- Search file and search multiple files are different operations
- No "context" shown in the search results (you just get the filename and the number of occurrences of the match in each file)
As an example, I think the Java search is very cool so a nice enhancement would be to have CFEclipse add a CFML search option (if possible) that allowed you to search for methods etc in CFCs...
A couple of people asked for a way to bind specific keyboard shortcuts to snippets but that's not really possible with the way Eclipse handles shortcuts. That's why you have the keyword followed by a key command (shift-control-.) to insert shortcuts. Of course, we're open to suggestions on improving that so feel free to download the CFEclipse source and try stuff out...
Other than that specific issue, folks asked for "improvements" and "better customization" so let's have some comments around that, nailing down what it is you really want.
A general impression I get is that folks would like to see a HomeSite-compatible set of keyboard shortcuts where possible. What about situations where a HomeSite keyboard shortcut differs from, say, a Dreamweaver shortcut or a Flex Builder 2 shortcut or some other Eclipse plugin? Is consistency within Eclipse more important? Is Dreamweaver compatibility also a desire?
What specific keyboard shortcuts do you miss?
Let's start by looking at "code hint enhancements". Some specifics that were mentioned:
- CFC method "intellisense" - the ability to have CFEclipse offer a drop-down of available methods on an object and then hints for the arguments. That was the most-requested feature and it's pretty clear what folks want. It's also pretty clear that this is a big piece of work!
- cfimport custom tag insight - the ability to have CFEclipse offer a drop-down of custom tags available for a given import prefix. This requires that CFEclipse understands mappings but is otherwise not too onerous to implement I suspect.
Please add comments with any specific enhancements you'd like to see in the area of code hints / insight.
What I'd like to hear about are other things you'd like to see in CFEclipse. Not the small, niggling little bug fixes - there's a good process in place for managing those (the bug tracker on Tigris). What I want to hear about are the bigger concerns, the futures. What could CFEclipse do to make your life as a developer easier? How can CFEclipse help you write better code?
I'll be posting some of my thoughts over the next few weeks in this new cfeclipse category - stay tuned!
Updated link March 1st, 2007.
Yes! Well, sort of.
You can open a file in the standard CFEclipse editor and then you can also open the same file in the Text Editor (right-click on the file, select Open With... > Text Editor). Now drag one of the two editor tabs down the screen until you see a black outline indicating a new view will be added. Now you should be able to see the same file in both the CFEclipse editor and the Text Editor simultaneously.
Use the Text Editor for viewing only. Make all your edits via the CFEclipse editor. Whenever you save in the CFEclipse editor, the Text Editor will automatically update. (If you edit via the Text Editor and save, CFEclipse will complain that the file changed on disk and doesn't handle it very gracefully!)
Not quite a full Split View but probably enough for most users' needs?
Ben went through some of the "non-marquee" features: Application.cfc and the application event model, the administration API, Verity enhancements and charting enhancements as well as a number of "smaller" but very important enhancements (XML processing, data validation, <cftimer/>, <cfntauthenticate/>, SOAP handling etc).
Next up was Amit Yathirajadasan from Georgetown University who showed an application his group have built that leverages many of the new CFMX 7 features: a sophisticated Flash form-based web hosting console that lets their users manage their data sources and generate high-level reports based on log file analysis, as well as an interactive customer support chat (using the event gateways). Very slick.
Then Ben talked about the upcoming CFMX 7 Updater, codenamed "Merrimack", that is in beta and will be released later this year. The updater will provide, in addition to bug fixes, improved platform support and will surface the "CFCProxy" machinery to allow Java code to call ColdFusion Components. The platforms mentioned include: Mac OS X native installer, RHAS 3.0 / 4.0, SuSE ES 8 / 9, WSND, OAS 10g).
Next up Tim talked about IDEs, emphasizing how Dreamweaver MX provides excellent support for visually-oriented designers and developers as well as wizard-based assistance for new ColdFusion developers but that there is another class of developers that prefer a more code-oriented environment. He noted that Macromedia announced its intention to join the Eclipse Foundation and produce an Eclipse-based product for Rich Internet Application development (codenamed "Zorn"). He also said that the ColdFusion product team had been talking with the CFEclipse project team about how Macromedia can best support this effort to help provide the best possible experiences for ColdFusion developers. He introduced Simeon Bateman, the CFEclipse project manager, who announced the new cfeclipse.org website (content in progress!) and said that the team would be bringing the "stable build" up to date with the "nightly builds" to incorporate all the new features that have been developed and tested recently. They are also aiming for a 2.0 release in the fall that will provide improved packaging and more of the features that are being requested by developers. Tim said that Macromedia plan on becoming contributors to the CFEclipse project and will help support the project's goals. Lots of applause for this announcement!
And...
Ben announced the codename for the next release of ColdFusion: Scorpio! He said it's very early days yet in terms of planning but two of the areas that the team are looking at, based on requests from customers, are:
- enhancing the presentation features and functionality
- monitoring and access to the server internals
Ben closed by showing the updated CFMX 7 tag / function poster which is available from the Macromedia booth here at the conference.
The project is owned and run by the community and we would like to see more ongoing community involvement. To that end we are starting a drive to encourage more people to help out, so we have created a cfeclipse contributors list at:http://lists.topica.com/lists/cfeclipse-contrib/
The idea of this list is to help co-ordinate any efforts to improve the cfeclipse project. Those efforts may be in the form of java development, writing documentation, testing, answering support questions, co-ordinating efforts, fund raising, or anything else that you think would help.
Every so often on the list we will send an email with the same subject line as this one, or something similar. That will serve 2 purposes. Firstly it will remind you that the cfeclipse project needs help and secondly it will help us to track what everyone is doing.
Some of you will no doubt ask why we need another list apart from the ones on tigris.org. There are two reasons. Firstly we intend to migrate away from tigris.org in the future for a number of reasons and secondly the lists on tigris.org are catering to two specific groups of people. Users and plugin developers. They don't cover the whole range of potential contributors.
To do that, use the Finder to navigate to an arbitrary .cfm file and then right-click Get Info (or splat-i). Select Open With and in the drop-down choose Other... and navigate to the openeclipse application. Then select Change All... and accept the change. Do the same for a .cfc file. Now, whenever you double-click on a ColdFusion document, openeclipse should fire up and, if Eclipse is not already started, it will start Eclipse and then it should cause Eclipse to open the selected file.
This has certainly made my life easier so major thanks to Spike for doing this!
Why have I never used this wonderful feature before I wonder?
He ran through an introduction to Eclipse as both an IDE and a platform and ran through a bunch of JDT features (Java Development Toolkit) including some new stuff in 3.1. He also waxed lyrical about the new Ant debugger! Then he gave a demo of some of the more useful but less well-known aspects of the JDT. At one point he maximized the Java editor and then used control-O and control-T which bring up searchable trees containing the code outline and the type hierarchy respectively - nice! (something for CFEclipse, methinks!)
He also showed some of the refactoring support, giving the example of "extract method" which now finds and replaces duplicate code within a single file. Nice!
Then he moved on to an in-depth explanation of Eclipse's modular architecture and then the PDE - plugin development environment - showing how easy it is to extend Eclipse or even build complete new applications based on Eclipse.
He only really scratched the surface of what Eclipse is capable of but it contained some gems.
I chatted to him after the talk, telling him about CFEclipse and picking his brains about debugging the Fusebox plugin (because right now it runs in debug mode but not in the main IDE, at least for me, on a Mac). He gave me some useful pointers!
In addition to continuing the development of CFEclipse as a free plugin for Eclipse, the CFEclipse crew are planning to offer a well thought out bundle of Eclipse and various plugins, trimmed of excess 'fat', as a dedicated CF IDE called "CFML Workbench" and they might charge for that (to help fund ongoing CFEclipse development). For people who don't want all of Eclipse's complexity (and size), this might be a very good option!
I've had CFEclipse open for 24 hours now with no problems. That means I can give it a serious test drive again. That build has code folding which I really like and a lot of other improvements (documented on the blog / wiki).
I really like Eclipse's CVS integration and I use CVS for pretty much every project I work on so that's one of the main draws for me. CFE makes Eclipse very usable as a ColdFusion IDE. But I still need a Dreamweaver-style FTP / site integration (so I'm still using DW for site management on all my CF sites - and for all the non-CF sites I still work on).
The new "Scribble Pad" feature is interesting although I can't get it to work. It allows you to quickly test fragments of code without ending up with a directory full of short test pages - nice idea! I already have a project defined over my web root so I can't define a separate "Scribble" project in the web root - I tried setting the preference to use the existing project for the scribble pad but F8 doesn't bring up the scribble page. At least, it doesn't on my Mac. And I couldn't find how to change / check the assigned function key because I can't find how to access the scribble functionality from the menus. Oh well. Definitely a nice idea tho'.
Looks like the Browser View / CPU usage issue didn't make it into this release (based on my preliminary testing and the brief "Bugs Fixed" list on the website).
CFEclipse first:
I really like the CFC Methods View but it would be really useful to be able to switch between code order and alphabetical order (the latter makes it easier to find a given method in a large, unfamiliar CFC; the former makes it easier to find a given method when you're expecting them to be in a particular order, e.g.,
I still can't get on with the Outline View - if I could filter out certain tags, it might be more useful, e.g., hiding
Problems View - I've not seen a single message appear in this window so I've no idea what it does. Is there a good document explaining what it's for?
Select Text Context Menu - useful! Provides shift left / right, wrap in CF comment etc.
And I finally got around to digging deep enough into the Eclipse preferences to find the option to display line numbers!
OK, now back to He3:
I built a Fusebox 4 application today (my first) so the built-in support for the Fusebox XML files was very useful, saving me several visits to the FB4 documentation (Hah! Jeff's excellent book, more like!) and saving me a lot of typing! Unfortunately, the tag insight for
This side-by-side comparison will continue over the next few months as I get more familiar with the underlying Eclipse system as well as the specific products' features...
Open them both up (you can run both regular Eclipse and He3 side-by-side if you want) and He3 has a CFML perspective, CFML project / template (cfm) / component (cfc) whereas CFEclipse uses the regular perspective and requires you to add a 'simple' project when you want to use CFML. He3 wins there - it feels less like an add-on and more like it really understands ColdFusion.
CFEclipse has an outline view. I never liked the tree view in Dreamweaver's tag inspector (it was removed in DWMX 2004) so the outline view doesn't really interest me - I just find it too cumbersome for large files. He3 uses a perspective that doesn't have the outline view. For some people CFEclipse wins here but I think it's a wash - I prefer the cleaner perspective layout of He3.
Moving on to code hints etc. At the moment, CFEclipse definitively has the edge in terms of the layout and quality of the hints - showing more information about the tag and type information in the attributes. However, over the course of about an hour, CFEclipse code hints mysteriously switched off on a couple of occasions and I had to restart Eclipse to get the working again. He3 lets you turn the code hints on and off and set the delay before they popup. Overall, it's a close run thing here but CFEclipse wins by a nose.
Preferences. CFEclipse doesn't seem to have a separate set of preferences so He3 wins here.
Color coding. CFEclipse code-codes numbers and strings which He3 doesn't. CFEclipse wins here (but I know RichPalette is currently reworking the whole color-coding thing so it may well take the lead here soon).
Convenience buttons and menu options. CFEclipse provides shortcuts for a few tags via menu options and buttons, e.g., surrounding code with a comment or # signs etc. I know a lot of CF Studio / HomeSite+ users like this but, even after I'd set it up in Dreamweaver, I pretty much never used it. Still, I'll give CFEclipse a win for that. It should be easy enough to add to He3.
Regex / XPath. CFEclipse provides no special support for these whereas He3 provides dedicated panels to let you code-by-example. You paste text into the main regex window and then try out various patterns in the regex field and He3 shows the matches live. When you get the effect you want, copy the pattern into your code. Great for debugging regex patterns too. Similarly for XPath. I know a lot of CFers use regex and I think we'll see a lot more using XPath over the coming year so I'd say these features are both very useful. He3 wins hands down here.
Framework support. CFEclipse provides no special support for Fusebox or Mach II. He3 currently provides a special editor for the Mach II XML configuration file and is promising similar support for the Fusebox 4 XML configuration file. It's useful enough in its current form and I hear plans for improvements are in the pipeline. He3 wins here.
That's how it stacks up in my view. If I've missed some important CFEclipse functionality, let me know, but I looked around all the menus and that's all I could find.


