A few weeks ago I did a session at the UKCFUG on Eclipse Tips & Tricks, from the session I created a very simple cheat sheet of some of the coolest keyboard shortcuts I know about. (The cheat sheet is here if you want a copy)

Also as part of the session I showed off Doc Share. This has been spoken about a few times, in both the ColdFusion Builder, CF Eclipse and the general eclipse user communities but I’ve never seen a working example; well that was until I spent some time working out what is required and getting it all to run.

Nathan Mische, created a small plugin that gives the option to share an editor in ColdFusion Builder. With ColdFusion Builder being my primary IDE this example will use it as a base, but everything else should be simple enough on any eclipse install.

The first thing you need to get is the Eclipse Communication Framework, now depending on what version of Eclipse you have ColdFusion Builder installed in will depend on the version of ECF you can use, but in essence they do the same job for the purposes of this example.

These are the release sites for the main eclipse yearly release, so you may need to search for them, but they should be under Collaboration > Eclipse Communication Framework SDK
You’ll also need to get the docshare plugin:

Once you have these installed, you’ll want to run your own ECF server, I couldn’t get the public on to work, and if you’re working on company projects you won’t want to use a public server.

You can run the ECF server in two modes, the interactive one (via java) where you get to see a command prompt or the non-interactive one when you don’t see anything other than an extra CFBuilder / Eclipse running in your task manager.

To run with a Command Prompt (Straight from java) interface you can run the following:

java -Dfile.encoding=ISO-8859-1 -classpath /home/ecf/eclipse/plugins/org.eclipse.equinox.common_3.4.0.v20080421-2006.jar:/home/ecf/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610.jar :/home/ecf/eclipse/plugins/org.eclipse.equinox.registry_3.4.0.v20080516-0950.jar:/home/ecf/eclipse/plugins/org.eclipse.osgi.services_3.1.200.v20071203.jar :/home/ecf/eclipse/plugins/org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar:/home/ecf/eclipse/plugins/org.eclipse.core.jobs_3.4.0.v20080512.jar :/home/ecf/eclipse/plugins/org.eclipse.equinox.app_1.1.0.v20080421-2006.jar :/home/ecf/eclipse/plugins/org.eclipse.ecf.discovery_2.1.0.v20081224-1728.jar :/home/ecf/eclipse/plugins/org.eclipse.ecf.identity_2.0.0.v20080611-1715.jar :/home/ecf/eclipse/plugins/org.eclipse.ecf.server.generic_1.2.1.v20081224-1728.jar :/home/ecf/eclipse/plugins/org.eclipse.ecf.provider_1.3.0.v20081224-1728.jar :/home/ecf/eclipse/plugins/org.eclipse.ecf.sharedobject_1.3.100.v20081224-1728.jar :/home/ecf/eclipse/plugins/org.eclipse.ecf_2.0.0.v20080611-1715.jar org.eclipse.ecf.server.generic.app.ServerApplication -c /home/ecf/server.xml

You’ll need to change the paths, to point to your ColdFusion Builder / Eclipse install. (The above is a copy of paste from the site which used Linux)

If you want the hidden less intrusive version you can place the following into a batch file and run when required. (I think this is the easiest way of running it)

"C:\Program Files\Adobe\Adobe ColdFusion Builder\CFBuilder.exe" -console -nosplash -application org.eclipse.ecf.server.generic.Server

Of course you may want to set up, your very own dedicated server. (i.e. not on a developer machine, maybe on your dev server) You can get confirmation of the above information and more from the following links:

Once you have your own ECF server running, you will want to connect to it from eclipse. To make this easier we need to add a new option on to our (already full) tool bar.

  • Right click the tool bar area and select Customize Perspective.
  • Click the “Command Groups Availability” tab
  • Ensure the checkbox for Communications is checked
  • Back on “Tool Bar visibility” Ensure the Communications option is Checked
  • You may wish to uncheck the sub option “Connect to Provider”
  • This is used for connecting to other providers like Skype/MSN/gTalk not covered here
  • Click ok; you now have a new icon of two orange and blue men (or women) shaking hands.
  • Click the new icon
  • Enter the group id of any of the following, whatever feels right or works for you:
    • ecftcp://localhost:3282/server
    • ecftcp://127.0.0.1:3282/server
    • ecftcp://you.r.i.p:3282/server
    • ecftcp://yourmachinename:3282/server
  • You can then enter a nickname so you can identify yourself.
  • Click finish to connect to the ECF Server

You will then be connected to the ECF server, but hey wait there is no option to share a doc when I right click the ColdFusion editor, well of course not as you can currently only share with yourself as you’re the only one connected. There are two ways round this, get a colleague on the same network as you to connect to your ECF server. (Replace localhost with your IP or machine name, remember you may need to play around with the windows firewall or any other security you might have running) The other option is to install another eclipse instance and install the ECF there and connect to the same ECF server.

Now when they are connected you can open a ColdFusion page, right click and you’re now able to share the document with them, you can both edit the file at the same time, one at the top one at the bottom, whatever you want. The greatest use I can see for this is, pair programing with a distributed worldwide team (As I work in). You also have a little chat area, but it may be better to actually call the other developer, so Skype or a good old fashioned telephone is great here.

Now you have the knowledge to get it running, go have fun sharing the love of Pair Programing with others. Some of the sites above mention using Skype and Google Talk, in the environment I work in I’ve not been able to get this up and running. Soon as I get some more time I will give them a go too. As a side note on this, in my UKCFUG demo I had the remote machine and server running on my mac and the client on the PC so this works as with most Eclipse Plugins on both Windows and Mac (And if you’re not using CFB Linux too)
 
I’ll be moving house over the next few weeks, but once I’ve settled in I will do a ScreenCast of this all working.

 

One Response to ColdFusion Builder DocShare Plugin

  1. Jasper says:

    Hi Kev,

    Thanks for the post. I could not get this to work with the docs from ECF itself. But how does one get to share CF files? I do not have the “Share with” context menu option when editing a CF file. Do I need to modify a config file somewhere..?

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *