Skip to content
boughtonp edited this page Jan 19, 2012 · 2 revisions

This page gives instructions on how to build CFEclipse from source.

Get the required plugin sources

You'll need to check out at least org.cfeclipse.cfml, org.cfeclipse.cfml.core and org.cfeclipse.cfml.feature from the source repository. The easiest thing to do may be to edit the Team Project Set found at Checking Out CFEclipse - if you don't want the entire tree (the full team set contains the update site, snipex.server, frameworks, etc.).

Coding and Debugging

Excerpt from the cfeclipse user group mailing list:

I'm still working on 3.2, but I'd assume the stuff below applies to 3.3 (it does, and to 3.4 and 3.5 too).

This is going to sound a little complicated, but it only takes a minute and will save you hours of development time:

Note: You can also open the org.cfeclipse.cfml/plugin.xml file with the Manifest Editor, select the "overview" tab, and select "launch an eclipse application in debug mode", which generally covers the paragraphs below.

With your plugin project selected - assuming you've cloned CFEclipse from GitHub and it all compiles correctly, etc - go to your little debug icon in the toolbar. click the little black arrow beside it. you'll get a bunch of previous launches, then a separator, then 3 menu items. select the 2nd "debug" menu so that you get the "launcher" interface.

  1. In the left-hand side menu, find "Eclipse Application".
  2. Select it, right click, "New". Give it a name, like "CFEclipse".
  3. Down in the "Workspace Data" section, change the Location from ".... runtime-New Location(1)" or whatever it is to "... runtime-CFEclipse". This last step isn't technically required but it's a good idea to make a meaningful location for the launcher.
  4. Now here's what is important: go to the "plugins" tab. select the 3rd radio button, "choose plugins and fragments from the list below". (On Eclipse 3.3, it's no longer a set of radio buttons but a dropdown named "Launch With". Select the 2nd option.)
  5. This enables all the checkboxes in the list below.
  6. make sure that the CFML plugins are checked in the first list. then, down below, make sure they're deselected in the 2nd longer list.
  7. this guarantees that the new eclipse runtime workbench that you're about to launch is running the versions of the plugin you think it's running.

After you confirm that, click "debug". this will open up a 2nd eclipse app. when you edit code in your development workbench, your runtime workbench will reflect those changes, although I do believe you have to close and open views to see those changes. and i don't' think you're doing this, but i've noticed that when doing some major layout work, i.e. changing gridlayout to filllayout and crap like that, that i do have to completely restart the workbench even if it doesn't bug me about code hotswap problems.

If the plugin has logging or other stuff that only happens when the "-debug" flag is passed on eclipse startup, and you want to see what that output is, do this:

  1. Open your debug configuration
  2. Go to the Arguments tab
  3. Add -debug to the end of the arguments list

One last thing: some changes you make in your development workbench will put your runtime workbench in a funk, and it'll throw errors asking you whether you want to terminate, restart, etc. usually this happens when making major class changes (changing the hierarchy, adding new fields, etc).

Now, once you start this, don't be surprised if you get addicted. When you do, check out the "building commercial quality plugins" book by eric clayberg and dan rubel. it's one of the bibles of eclipse plugin development.

Good luck.

Marc E.

Building and Installing the plugin source using the local update site

You'll have to have the update site source code downloaded (org.eclipse.cfml.update)- as well as all the CF plugins (update, feature, cfml, cfunit, snipex.server, frameworks -- use the team project set).

Open the org.cfeclipse.cfml.update/site.xml file with the Site Manifest Editor (right-click, "open with"...), select the org.cfeclipse.cfml feature and click the "build" button (This is on the "Site Map" editor tab). Do not try to build the docshare plugins, they're just placeholders for compatibility reasons. You should see new jars with the date appended to them.

Go to the Eclipse update manager, add a "local site" pointing at the update plugin directory.

Now, whenever you update your sources (to test those bug fixes and nifty next versions) you can simply push that "build" button, and then run an Eclipse update. Bam! You're running from the source.

Cool, neh?

NOTE: If you need to build the DocShare 3.4 plugin on 3.5+, or when we need to start developing against older versions of eclipse, here's how you can do it in a recent version: You can change the 'Target platform' setting to point to the location of an existing set of eclipse 3.3 plugins. This will compile your code against the 3.3 plugins, making sure that they stay compatible no matter which version of eclipse you are using to develop the application.

The setting is under Window->Preferences->Plug-in development->Target Platform

Export the plugin as an Eclipse Archived Update Site

You'll have to have the update site source code downloaded (org.eclipse.cfml.update)- as well as all the CF plugins (core, feature, cfml, etc.).

Open the org.cfeclipse.cfml.update/site.xml file with the Site Manifest Editor (right-click, "open with"...), click on the release you wish to build (probably the one with highest ordinal), and click the "build" button (This is on the "Site Map" editor tab).

Assuming the build doesn't have errors, you can now simply create a Zip archive of the whole org.cfeclipse.cfml.update/ folder. But be sure to not get the top level folder in the archive- The first directory entries should be /feature, /plugin , etc. NOT org.cfeclipse.cfml.update.

Installing the plugin using the Archived Update Site

You may need to remove the current version of CFEclipse, if the version you are installing is the same ordinal as the one you already have installed. I just delete the relevant folders or .jars from the eclipse install plugin and feature folders. Then, or if you're installing a newer version, simply go to help > software updates > find and install > Search for new features to install > new archived site and point at the zip file you created. Assuming everything build ok, you should see the version you build as an installable option.

Export the plugin, without using the Archived Update Site method

Open the org.cfeclipse.cfml.feature/feature.xml file using Eclipse's Feature Manifest Editor, click on the "Overview" tab (located on the bottom left corner of the edit window), and then follow the Export Wizard link.

Choose a destination folder for the plugin files, and then export (do not package the plugin as individual jar files, since you'll want to edit the dictionary files, etc., later).

Installing the plugin by copying folders and/or files

Copy the resulting folders (plugin & feature) into their respective Eclipse locations (feature, and plugin folders).

Start eclipse with the -clean option.

You may want to remove or disable any previous versions of the plugin.

Clone this wiki locally