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.
