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.

ColdFusion Builder Extensions Tutorial Part I - Introduction

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

As I had said in my previous post that I will post a series of articles on extensions covering basics, tips and tricks etc, so here’s my first one.  This articles introduces you to ColdFusion Builder Extensions, explains what are they, what all is possible, where to find extensions etc.

First things First

What Are ColdFusion Builder Extensions?

Well in very simple words, extensions allow you to extend ColdFusion Builder by writing CFML code. Yes, that’s right CFML!!!….no java…no need to learn eclipse..just CFML code and a bit of XML. All this (CFML code and XML configuration file) can be packaged as ready to use zip file. This zip is what you can install/distribute as extension for ColdFusion Builder.

What all you can do with extensions?

Through extensions, ColdFusion Builder lets you hook into it in different ways. This means that you can tie specific CFML code to a given hook. To tell ColdFusion Builder to tie a hook to a specific CFML template you need to XML configuration file. Broadly there are two type of hooks

1) Hooks to Add Context Menus to different views inside ColdFusion Builder. Context menus are the pop-up menus which appear when you right click on a selected object/UI element etc. This can be useful to address code generation/analysis use-cases specific to a Framework or application development in general.

Context menus can be added to following views as of now

  • Navigator View
  • RDS Data View
  • Outline View

2) Hooks for Listening to Events inside ColdFusion Builder

  • Currently Project creation event is supported. This means that specific CFML code can be called whenever user creates a new project in ColdFusion Builder. This can be useful in creating default project templates, basic application code, Framework specific directory structure etc.

Are there any extensions available as of now?

Adobe ColdFusion Builder ships few extensions which can be location in <ColdFusion Builder install Dir>/extensions. These include extensions to generate basic as well as ORM  CFCs and Action script classes from database tables. Also a basic extension for Model-Glue Framework. And there quite a few exciting extensions already available on RIAForge under ColdFusion Builder Extensions category.

So go ahead and try out a few of them.

Hope this post clears your basic question about ColdFusion Builder extensions. Next post I will cover how you can add a context menu and hook it to cfm file.