CFEclipse Resource Page
Table Of Contents
- +Introduction - >>
- +Getting Started - >>
- +Using CFEclipse - >>
- +Customizing CFEclipse - >>
- +More on CFEclipse - >>
- How can I get involved?
- How can I request a new feature?
- What do I do when I find a bug?
- What else can I do with Eclipse?
- When will the next version of CFEclipse be out? What will be in it?
- How can I view the CFEclipse source?
- How can I get the latest development version of the CFEclipse plug-in?
- I fixed a bug in the source, how can I commit my changes?
- How can I add my custom tags to the dictionary?
What Is Eclipse?
Eclipse is a next-generation universal integrated development environment (IDE). It's an open-source project primarily sponsored by IBM to make a strong, open, and very extensible Java IDE.
What Is CFEclipse?
It's a plug-in for Eclipse that creates a solid place for you to develop your ColdFusion applications.
Why does this page exist?
To give you hints and tips on how to maximize your ability to use Eclipse as your ColdFusion editor. To publish help and work-arounds for users of CFEclipse.
topSo let's get started...
How do I get Eclipse set up?
Start off by visiting the Eclipse web site, http://www.eclipse.org/. Click on downloads and pick a nearby mirror, then pick the latest version. Ignore the "M" versions, "M" stands for milestone, usually stable but not a full release.
Now your best bet is to download the full Eclipse SDK version (about 87MB), which is the Eclipse platform, Java Development Tools, and the Plug-in Dev stuff all in one. If you know you'll never ever look at a .java file in your life, feel free to just get the 'Platform Runtime Binary' version, closer to 25Mb.
Installing is easy. Just unzip it, open the folder it creates and run the eclipse executable.
How do I set up the CFEclipse plug-in?
The easiest way to install it is from Eclipse's auto-update feature. Here is how.
- In the Help menu, go to Software Updates / Find and Install.
- This will present you with the Install/Update dialog, choose to 'Search for new features' and then continue
- On the next screen, you will add a 'New Remote Site' by clicking the button, name it CFEclipse, and give it the address http://www.cfeclipse.org/update/
- Expand the CFEclipse site and check the box for the stable release, then click Next
- You will see a list of the available versions, so choose the highest version number and click Next
- Proceed through the license agreement screen and hit the Finish button
- Restart Eclipse (it will prompt you to do so)
When it comes back up, CFeclipse will be installed. You can keep reading this section, or skip ahead to Using CFEclipse
How do I set up the 'Snips'?
If you don't see the Snips view (a view is a docked window in Eclipse), switch to the CFML perspective, or click Window > Show View > Other and pick CFML / Snip Tree View. You may have to fish around your open views to find it.
Now you can add and remove code snippets until you're blue in the face. Right-click in the area to make a new folder for organization or a new snippet.
Where are the CFEclipse options?
Select Window / Preferences from the menu, then click CFEclipse in the tree on the left. There are also some per-project options, right-click on the project and choose properties.
How do I upgrade to a new version of CFEclipse?
Go to Help / Software Updates / Find and Install and pick the first radio button, Search for updates of currently installed features. Eclipse will let you know if there are any plugins that need updating.
To set it up to check automatically, go to Window / Preferences, and go to the Install/Update / Automatic Updates preferences where you can set it up however you like.
Why can't I open a .cfm file?
If you try to do a File > Open External File, and open a coldfusion file, you will get an error. This is evident of a change in thinking when using Eclipse. It's not a pop-it-open-and-edit-it IDE, it's a set-it-up-and-manage-it IDE. This problem may be fixed one day (if the issue receives enough votes on the tigris project site), but to think like Eclipse, you'll have to make a project and open your files from there. Read on for instructions.
How do I start a new project for my CF files?
Right-click in the Navigator or Package Explorer pane, or open the File menu, then select New / Project from the menu. Choose to create a simple project.
On the next screen, you name your project, and you tell it where you want the files stored. The default location is in the 'workspace', a folder where Eclipse saves everything by default. While this may work for Java projects, you will probably want to make your CF projects save files to your web root. You can point the location to an existing site folder that you already have.
Note: Each Eclipse project makes a .project file in the root of the project. It's an XML file that identifies the project for Eclipse, so just leave it alone.
How do I get my existing local CF projects into CFEclipse?
Go to File / New Project just like you are creating a new project (directly above). Create a new simple project with the wizard (you may have to select the 'Show All Wizards' checkbox). Name it whatever you want and point it to the directory of your ColdFusion files. It will create a .project file in the root of that directory and import all your files into the workspace on screen.
How do I get my existing CVS projects into Eclipse?
With CVS built-in and strongly supported by Eclipse, this is a breeze. Start by switching to the 'CVS Repository Exploring' perspective (Window / Open Perspactive / Other) and right-click CVS Repositories tab to create a new repository location. After you set up the options and connect to your server, you can check the files out by right-clicking on them. By right-clicking and selecting 'Check Out As', you can check out projects into an existing workspaces, perhaps into one located in your wwwroot to test locally.
More On CVS controls
You will most likely want your .cfm, .cfc, .js, .css, etc. files saved as ASCII. The default for unknown filetypes in Eclipse is binary. To change these, go to Window / Preferences, then navigate to Team / File Content and add each extension.
If your files are being reported as binary and they're supposed to be ascii, do this:
- Right-click the file and select Team / Change ASCII/Binary Property
- Select ASCII with keyword substitution, then next
- Select 'Include all files that are already shared in the repository', next
- Enter the commit comment, next
- Then confirm and finish
Is there a CFEclipse perspective, like the Java/resource/CVS perspectives?
Yes, you can switch to the CFML perspective by selecting Window / Perspective / Other from the menu, and choosing CFML in the Other Perspectives window.
topCustomizing the work environment...
How can I see the line numbers?
The line numbers can be turned on by going into preferences / Workbench / Editors / and checking show line numbers.
How can I customize the keys?
Honestly, the default keyset can be pretty bad, and really needs to be changed. Here's how:
- Window / Preferences
- Expand the 'Workbench' node
- Select 'Keys', you'll be presented with the keyboard shortcuts pref page
- In the 'Command' area, select the appropriate area you wish to modify from the first drop-down
- Drill-down your selection in the Name select box
- Select the existing assignemnt and click 'Remove' (if there is one)
- Now enter the combination you require in 'Name' under 'Key Sequence'
- Click the 'Add' button
What are CFEclipse's default shortcut keys?
|Insert date||No mapping|
- Select Window->Preferences
- Expand the 'Workbench' node
- Select 'Keys'
- In 'Category' find CFML Editor
- Add and remove to your hearts content
How about editing CSS files?
The Eclipse Project makes a great CSS editor, in the form of their WST project (Web Standards Tools). You can download the WST plugins by running the Eclipse update tool (Help > Updates > Find and Install), and choosing to find new updates at the Eclipse.org update site. Expand the results and choose the WST tools plugin and click the 'select required' button to select all the dependencies, then install it.
See the question above, editing CSS files. The WST can handle this.
How about a regular expression (regex) testing plugin?
Personally, I prefer QuickREx for my regular expression testing plugin, though there are a few others. You can find it at http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html. Add the auto-update URL (http://www.bastian-bergerhoff.com/eclipse/features) to your remote sites installation list to install it automatically. This plugin is free and very cool.
How about an XPath testing plugin?
A good XPath (XML Search) testing plugin can be found here: http://www.purpletech.com/xpe/index.jsp
topMore about CFEclipse...
How can I get involved?
First, make sure you have joined the project by creating a profile on http://www.tigris.org/ and joining the CFEclipse project. Now visit the project site, http://cfeclipse.tigris.org/ and join the 'users' mailing list.
How can I request a new feature?
First, make sure you have joined the project by creating a profile on http://www.tigris.org/ and joining the CFEclipse project. Now, visit the project site, http://cfeclipse.tigris.org/, and click the 'Issue Tracker' link on the menu. From here, you can search the open issues and, if no similar one is found, you can add your own.
What do I do when I find a bug?
This is basically the same as requesting a new feature. First, make sure you have joined the project by creating a profile on http://www.tigris.org/ and joining the CFEclipse project. Now, visit the project site, http://cfeclipse.tigris.org/, and click the 'Issue Tracker' link on the menu. From here, you can search the open issues and, if no similar one is found, you can add your own.
What else can I do with Eclipse?
Don't forget Eclipse is a killer Java editor, plus, you can find plug-in sites on google and download extras for eclipse. Many of the plugins available relate to Java in some way, which is no suprise since they are written in Java, but there are quite a few that may peak your interest, including an instant messenger, editors for most of your favorite languages, some gui programming plugins, some database mangement, and a lot more, so check them out.
When will the next version of CFEclipse be out? What will be in it?
If you really want to know, ask your question on the CFEclipse users list, or, if you just cant wait that long, why don't you build the latest version from cvs. The next question will explain how.
For Eclipse updates, to know when the next release candidate will be out, check this page.
How can I view the CFEclipse source?
- In Eclipse, go to Window / Open Perspective / Other
- In the 'Select Perspective' window, pick the 'CVS Repository Exploring' perspective and hit ok
- Right-click in the 'CVS Repositories' pane (on the left), and select New / Repository Location
- In the 'Add CVS Repository' window, use these options:
- Host: cvs.tigris.org
- Repository path: /cvs
- User: anoncvs
- Connection type: pserver
- Use Default Port and Validate Connection on Finish should both be selected
- Hit OK and wait for a successful confirmation that it connected
- Now you can browse the CFEclipse source files locally
How can I get the latest development version of the CFEclipse plug-in?
First off one warning: The CVS generally changes daily, so it's possible that when you check out the files, the plugin source may be broken at that time. With that in mind, read on.
- Get CVS access to the source files (see above, 'How can I view the CFEclipse source?')
- Open the cvs.tigris.org server, scroll to cfeclipse/src/version1/
- Right-click on the version1 folder and select 'Checkout' (this downloads a local copy)
- Now switch to the Java Perspective (window / open perspective / java) and you will see the CFEclipse version1 folder in the package explorer
- Turn off 'Perform build automatically on resource modification' in Window / Preferences, Workbench
- Test to see if it will run:
- From the Run menu, choose Run As / Run-time Workbench
- Test the plug-in, make sure it works, see if your bugs are fixed, etc.
- If it looks good, continue building the plug-in
- Click on the the version1 project and select Project, Build Project, CFEclipse should now compile
- Now File / Export your built project to 'Deployable plug-ins and fragments'
- On the next screen, choose com.rohanclan.cfml... and deploy it as a single deployable zip file
- Specify the location to save the file to and finish
- Now that you have a deployable zip file, you can install it just like a downloaded version
I fixed a bug in the source, how can I commit my changes?
Because CFEclipse is a small project (thus far), they try to keep the number of developers with CVS access to a minimum. However if you can prove you're a good, useful, upstanding, hard-working programmer and can submit useful code for the project, you can probably get developer access without too much trouble. However, before that happens, you'll need to submit some code, so, you have to make a patch.
Making a patch isn't difficult. Select the starting point in the CVS resource tree (right-click), then select Team / New Patch. You can save the output to a file or the clipboard, then send it to the appropriate party.
Appropriate parties are something like this:
- Oliver, project leader, CFML parser, CFScript
- Rob, code completion, syntax dictionaries, web browser, and general issues
- Spike (Stephen), preferences, code outlining (including CFCs) and snips
- Chris, file wizards
- Nathan, this page and the Tigris project page
And if you don't know, just send it to the users mail list.
How can I add my custom tags to the dictionary?
- Find your CFEclipse plugin directory from within Eclipse's plugin dir
- You should have a dictionary directory
- Open user.xml in a text/xml editor
- Edit to your hearts content
There are some instructions within user.xml, plus an example tag.
It was last updated 11/16/2005.