Notes: Advanced CFEclipse

Presented by Mark Drew.

CFEclipse was started by Rob Rohan in 2003. Mark joined in 2004. Macromedia endorses it in 2005, and was bought by Adobe he joined the Eclipse Foundation. Flex Builder was built on Eclipse in 2006, and added the RDS plugin for Eclipse. And CFEclipse 1.3 has been released in 2007.

Eclipse automatically gives us cross-platform capability, version control (with CVS), Ant task runner, a generic text editor, a built-in web browser, search, and more. CFEclipse sits on top of this functionality.

CFEclipse gives us tag completion, syntax highlighting, outline view of code, methods view, web help, snippets. It has a file explorer view for those of us who like the HomeSite style of editing files. Scribble pad for quick code testing. Multiple syntax libraries (to support BlueDraon, Railo, etc), toolbars like HomeSite, component explorers, variable insight.

Snippets

Can create snippets to effectively “paste in” code you may use over and over again. Hit Ctrl-J or Cmd-J to pull up a snippet after typing the trigger text. Can have snippet variables to insert custom code when pasting the snippet.

<mycode>$${MyCustomVar}</mycode>, for example, will insert what you put in msgbox when it asks for that variable. You can also define default values. For instance, $${MyCustomVar:The default value} will put “The default value” in there.

Development Patterns and Support

The typical Eclipse project paradigm is for local development. Working in the Eclipse workspace and probably use Subversion.

Otherwise, can use “File Location” or “FTP/SFTP” locations to directly edit some text that is somewhere outside your workspace, either on another machine, a file share, etc.

Ant

Ant scripts are typically called build.xml. When in the build.xml file, hit Ctrl-Space to get a build file template. You can then just work on the template.

Ant builds are “Target” oriented. They are basically collections of tasks that can be accomplished. A target can have a depends=”" attribute that will not run until another target is executed. You can then use commands to copy files, zip files, etc. For instance, <copydir>, <mkdir>, <input>, <echo>, <svn>, <ftp>, etc.

Good articles on Ant with SQL Scripts, Ant with Subversion, and Ant with FTP.
Unit Testing

A CFUnit plugin just had a soft release at CFUnited! Supports both CFUnit and cfcUnit. With it, you can do unit testing from right within Eclipse rather than going to a web page and doing it. Sweeeet!

Framework Explorer

Just like there is a CFC explorer, there is a framework explorer. When you open the view in your project, it will automatically figure out what frameworks you’re using, it will show them, and you can open them up and see your beans and other various components of your frameworks. Sweeeeet!

SnipEx

Can have snippets that are stored on a central server.

Favorite Eclipse Plugins

The list of my favorite Eclipse plugins is not that long.

CFEclipse

This is a no-brainer. I do ColdFusion all the time, and I use Eclipse. Of course CFEclipse is on my list. :-)

Subclipse

I am a revision control fanatic, so I have TortoiseSVN on my Windows machines and Subclipse on all Eclipse installations to connect to my Subversion repositories. It is so awesome to have Subversion functionality built into the IDE. In fact, it was this ability, even more so than the CFEclipse plugin, that finally tore me away from Dreamweaver in code view (yuck, did I really use to do that?).

JSEclipse

Originally developed by the guys at Interakt (who were enveloped by Adobe because they were so awesome), this plugin provides awesome JavaScript insight.

Aptana

The IDE itself is nice, but then lacking some features I need (like ColdFusion insight). Aptana is so cool, they even made it into an Eclipse plugin! First, it is a great editor for HTML, JavaScript, and XML. Secondly, it gives you an opportunity to abandon Eclipse’s project-oriented approach and edit files from any context: your local filesystem, an FTP connection, a network share!

XMLBuddy

Great for XML editing, specifically.

There are more plugins I use, but these are the must-haves.

Better FTP Support in Eclipse Via Aptana

A while ago, I mentioned the release of a new web development IDE called Aptana. The cool thing about Aptana is that it can be downloaded as a standalone IDE or as a plugin for Eclipse.

Aptana is a really nice modern IDE for web development: It has excellent support for CSS and JavaScript and, consequently, AJAX. It also has decent built-in support for FTP and SFTP connections. Especially this last point is something where Eclipse is sorely lacking, and you can’t entirely blame it, since its original purpose was (and is) something larger than just web development.

Whether I end up using Aptana as the Eclipse perspective of choice for HTML or JavaScript or CSS is yet to be determined; however, I guarantee you I’ll be using Aptana for my FTP connectivity. The Aptana folks have a nice screencast demonstrating how easy directly manipulating files via FTP can be with Aptana. It is very reminiscent of the way Dreamweaver handles FTP connections, which is incredibly easy, especially when considering the lack of FTP support in Eclipse.

And regardless of whether you are in the Aptana perspective or not, a project that has a “Synchronized Connection” to an FTP connection will have a “Synchronize” group in the contextual menu that enables you to upload/download/synchronize your project’s files with the FTP connection in any perspective. Nice!

Aptana: A Promising Upcoming Web IDE

I just got wind of Aptana today. At first glance, I would describe Aptana as a new IDE focused on web development, especially with an eye to Web 2.0 development. In other words, it has strong support for JavaScript-oriented code insight for AJAX development.

Aptana’s strength, then, from what I can see in some of the screencasts, is that is supports HTML and JavaScript and CSS all in the same editor, providing outline insight and even error detection with all the code intermixed. This seemed pretty nice.

Being that it is still in its infancy, I’m hard-pressed to try it at this time. After all, Eclipse can do most of what Aptana claims to do with various plugins, and much more. The thing, though, is that Aptana is also offered as a plugin for Eclipse itself. I actually just downloaded JSEclipse and the ATF today, but if I find these mediocre, maybe Aptana would be worth a closer look.

  Theme Brought to you by Directory Journal and Elegant Directory.