ColdFusion Builder Extensions Tutorial - Part 2 - Adding context menus

Author: sandeepp  |  Category: ColdFusion Builder, Extensions  |  Comments (0)  |  Add Comment

This post from me comes a little delayed than i would have liked, but all I can say is that some cool stuff for ColdFusion Builder has been keeping me busy ;).

So to get started I will cover how to add custom context menu to different views in ColdFusion Builder in this post. Supported views include

1) Project Navigator

2) Outline view

3) RDS Data View

One good way to learn how to add custom menu is to try this out on currently available extensions. For this post I will assume you have already installed Adobe CFC generator.
All you need to do is modify ide_config.xml file (Once you install an extension, config file is placed in install location/<extension name> folder.)

Once you locate ide_config.xml at extension install location, open ide_config.xml file for editing.
Now add following entry directly under <menu name=”Adobe CFC Generator”>

<action name=”hello” handlerid=”helloworld” showResponse=”yes” />

Save the file.

Navigate to Preferences->ColdFusion->Extensions page. Click on Reload Extensions button. This will make ColdFusion Builder reload the currently modified config file and reflect you current changes.

Now when you right click any table on RDS data view, this newly menu will appear under Adobe CFC generator menu.

Once you add menu you want to be able to do stuff when users clicks on it.
to achieve this, again open ide_config.xml and add following entry inside “<handlers>” node.

<handler id=”helloworld” type=”CFM” filename=”helloworld.cfm” />

Now create “helloworld.cfm” file under handlers directory, with content <cfoutput>Hello World</cfoutput>.

Reload extensions again, and this time once you click newly added menu, a dialog will come up showing response from helloworld.cfm.

That’s it you have successfully add custom menu in ColdFusion Builder and handled click event on it.

Tags: ,

Leave a Reply