User Guide Cancel

ColdFusion Builder extensions

  1. ColdFusion Tools User Guide
  2. Performance Monitoring Toolset
    1. Overview of ColdFusion Performance Monitoring Toolset
    2. Auto-discovery of ColdFusion nodes and clusters
    3. Code profiler in ColdFusion Performance Monitoring Toolset
    4. Configure ColdFusion Performance Monitoring Toolset settings
    5. Install ColdFusion Performance Monitoring Toolset
    6. View cloud metrics
    7. Monitor GraphQL in Performance Monitoring Toolset
    8. Configure TLS/SSL and Authentication for Elasticsearch 8.x  in Performance Monitoring Toolset
    9. View cluster and node metrics
    10. View data source metrics
    11. View external services
    12. View incoming services
    13. View list of sites and busy connections
    14. View topology of sites
    15. Datastore Health Monitoring
    16. Performance Monitoring Toolset Update 1
    17. Secure Performance Monitoring Toolset with HTTPS/SSL
    18. Performance Monitoring Toolset deployment guide
  3. Use ColdFusion Builder
    1. About ColdFusion Builder
    2. System requirements | ColdFusion Builder
    3. Install ColdFusion Builder
    4. Edit code in ColdFusion Builder
    5. Manage servers in ColdFusion Builder
    6. Manage projects in ColdFusion Builder
    7. What's new in Adobe ColdFusion Builder (2018 release)
    8. Frequently Asked Questions (FAQ) | Adobe ColdFusion Builder (2018 release)
    9. Debug applications in ColdFusion Builder
    10. ColdFusion Builder workbench
    11. ColdFusion Builder extensions
    12. Debugging Perspective in ColdFusion Builder
    13. Build mobile applications using ColdFusion Builder
    14. Bundled ColdFusion Server
    15. Debug mobile applications in ColdFusion Builder
    16. Use extensions in ColdFusion Builder
  4. Coldfusion API Manager
    1. Overview of Adobe ColdFusion API Manager
    2. Features in ColdFusion API Manager
    3. Get started with ColdFusion API Manager
    4. Install ColdFusion API Manager
    5. Authentication types
    6. Create and publish APIs
    7. Administrator
    8. Subscriber
    9. Throttling and rate limiting
    10. Notifications
    11. Connectors
    12. Set up cluster support
    13. Integrate ColdFusion and API Manager
    14. Metrics and Logging in API Manager
    15. Generate Swagger documents
    16. Configure SSL
    17. Known issues in this release
    18. Policies in ColdFusion API Manager
    19. Create a Redis cluster
    20. Multitenancy in API Manager
    21. Docker images for ColdFusion API Manager

Adobe ColdFusion Builder is End of Life from Oct 1, 2024

Thank you for being part of the exciting journey of Adobe ColdFusion Builder.

As Adobe continues to focus on ColdFusion Builder extension for Visual Studio Code as the IDE for Adobe ColdFusion, we have decided to End of Life (EOL) Adobe ColdFusion Builder on Oct 1, 2024.

View the End of Life (EOL) announcement for ColdFusion Builder.

About extensions

You can extend the ColdFusion Builder IDE (Integrated Development Environment) functionality to support various ColdFusion frameworks and code generation requirements. You develop ColdFusion Builder extensions to generate code, design dynamic user interfaces, and perform basic CRUD (Create, Read, Update, and Delete) operations on the database. The ColdFusion Builder extension is a structured component that adds context menus in the ColdFusion Builder IDE and handles events on these menus. You, the ColdFusion developer, can develop a ColdFusion Builder extension yourself or you can install an available extension.

To develop your own ColdFusion Builder extension, you create the configuration file and handler files. You define the context menus and events in the configuration file - IDE_Config.xml. For more information, see Developing extensions.

ColdFusion Builder lets you extend the IDE at various levels including creating user interfaces. For more information, see Creating user interfaces for extensions.

The extensions that are shipped along with ColdFusion Builder are Adobe CFC Generator and AS Class Generator. You can install and integrate these extensions with ColdFusion Builder. For more information, see Using Extensions.

ColdFusion Builder provides the ColdFusion Builder Extension Creator to guide you through the process of creating and packaging extensions. For more information, see Use ColdFusion Builder Extension Creator to create and package extensions.

Developing extensions

To develop a ColdFusion Builder extension, you create the following elements:

  • Configuration file (IDE_config.xml)
  • Handler files (CFM files)

You can create these elements by writing the code or by using the ColdFusion Builder Extension Creator wizard. For more information about using the ColdFusion Builder Extension Creator wizard, see Use ColdFusion Builder Extension Creator to create and package extensions.

Configuration file

Creating the configuration file (IDE_config.xml) is an important step in developing a ColdFusion Builder extension. You define all the elements of the configuration file within the {{application }}tag.

Specifying metadata elements

You use metadata elements to create an extension and specify information like, extension name, author, version, and extension description.

Use the following elements to specify application metadata in the configuration file.

Element

Description

name

The name of the extension.

author

The author's name.

version

The file version.

email

Specifies the e-mail address.

description

A brief description of the application. The description can be in plain text or you specify a path to an HTML file, which contains the application description. If you specify a path to an HTML file, store the HTML file in the Install directory within the extension.

license

License  agreement displayed when installing the extension.The license agreement can be displayed in plain text or you specify a path to an HTML file, which contains the license agreement. If you specify a path to an HTML file, store the HTML file in the Install directory within the extension.

Example

<application> 
<name>ORM CFC Generator</name> 
<author>Adobe</author> 
<version>1.0</version> 
<email>user@xyz.com</email> 
<description>ORM CFC code Generator</description> 
<license>license.html</license> 
</application>

Adding pages to the ColdFusion Builder Extension Installation wizard

When you define the Configuration file, you can specify code that adds screens to the ColdFusion Builder Extension Install wizard. You can use these screens to get user inputs. Generally, user inputs are required for performing any configuration tasks after installation.

You specify input details using the input tag; for information on how to specify input tags, see Specifying input types. The handler that is specified in the  handlerid  attribute of the  wizardtag  is called with the input details. You can also specify the height and width of the Install wizard using the height and width attributes of the wizard tag. You can specify the title for each page in the wizard using the title attribute of the page tag.

Syntax

<application> 
<name>Name of the ColdFusion Builder extension</name> 
<install> 
<wizard height="" width="" handlerid="handlerID" > 
<page title="Wizard page title" > 
<input name="Input" ... /> 
<input name="Input" ... /> 
</page> 
</wizard> 
</install> 
</application>

Example

In the following example, once the Extension Installation wizard finishes installing the extension, the handler ID, postinstallhandler, is called with the specified input details.

<application> 
<name>ORM CFC Generator</name> 
<install> 
<wizard height="" width="" handlerid="postinstallhandler" > 
<page title="Install settings" > 
<input name="Mapping" ... /> 
<input name="Datasource" ... /> 
</page> 
</wizard> 
</install> 
</application>

Extending IDE

You can extend the ColdFusion Builder IDE at the following levels:

  • Adding context menus: You can add context menus to the following views:
    • Resource navigator
    • RDS Data view
    • Outline view
    • CFML Editor
  • Handling workspace events: Currently  onprojectcreate  is the only supported event. 
  • Create views
  • Contribute to Code Assist from extensions

You can specify handlers for the context menus and events to perform CRUD or code generation operations.

Specifying Handlers

ColdFusion Builder supports CFM handlers. In the ColdFusion Builder context, a handler is a file that contains code, which is run in response to an event or an action. You specify handlers within the handlers tag. Use the handlerid attribute to associate the handler with an event or action. Specify all handler details within the handlers tag. For more details on specifying events and actions, see Specifying events and Specifying context-menus. All the handler files must be stored in the Handlers folder.

Syntax

<handlers> 
<handler id ="cfm" type="cfm" filename="filename" /> 
</handlers>

Attribute

Description

id

Handler ID

type

Specifies the handler type.The handler type you can specify is "CFM"

filename

The name of the CFM file

You can specify only alphanumeric characters for the attribute values. Special characters are not allowed.

Example

<handlers> 
<handler id="cfcgenerator" type="CFM" 
filename="ormCFCGenerator.cfm" /> 
<handler id="gridgenerator" type="CFM" 
filename="cfgridGenerator.cfm" /> 
</handlers>

Specifying events

Use the events tag to specify events. Currently, ColdFusion Builder only supports an event on project creation. The supported event type is onprojectcreate. Pass the required handler ID for the onprojectcreate event. When the event occurs, the handler associated with the handler ID is called.

All applications for which the onprojectcreate event is specified are listed under the list of applications in the Creating a ColdFusion project. When a user selects any of the listed applications, the associated handlers for the selected application are called. The onprojectcreate event is useful in creating a basic project structure for a given ColdFusion Builder extension.

Syntax

<events> 
<event 
type="onprojectcreate" 
handlerid="handler id" /> 
</events>

Attribute

Description

type

Specifies the event for which the handler runs.You can specify the event type=" onprojectcreate "

handlerid

Specifies the handler ID to pass.

You can specify only alphanumeric characters for the attribute values. Special characters are not allowed.

Example

<events> 
<event type="onprojectcreate" 
handlerid="projectCreationHandler" /> 
</events>

New events added in ColdFusion Builder 2.0.1

onfilechangeineditor: Extension can listen for events when file changes in the editor

Assume that you move to a different document (by clicking the tab on editor) or by opening a document in the editor. It is now possible for the extension to know this. For this, a new event {{onfilechangeineditor, has been introduced. The event can }}be registered as follows:

<event type=”onfilechangeineditor” handlerid=”any_handler_id/>

The information sent in the event message includes the following:

  • type: Event type is  onfilechangeineditor
  • project_path: Absolute path of the project to which the file (that is opened in the editor) belongs.
  • file_path: Absolute path of the file currently opened/switched to in the editor.
  • editor_name: Name of the editor that opened the file. For CFML files, the name is Adobe CFML  Editor..

The following is a sample output:

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0"> 
<callbackurl> 
http://[ip_address:port]/index.cfm?extension=<Extension_Name> 
</callbackurl> 
<eventinfo type="onfilechangeineditor"> 
<project> 
Extensions 
</project> 
<project_path> 
[project_path] 
</project_path> 
<file_path> 
[file_path] 
</file_path> 
<event> 
onfilechangeineditor 
</event> 
<editor_name> 
Adobe CFML Editor 
</editor_name> 
</eventinfo> 
</ide> 
<user> 
</user> 
</event>
onRDSDataViewSelectionChange: Extension can listen for event when selection changes in the RDS data view

ColdFusion Builder sends different event information messages to the handler, depending on selection in the RDS Data view.For this, a new event, onRDSDataViewSelectionChange has been introduced. The event can be registered as follows:

<event type=”onfilechangeineditor” handlerid=”any_handler_id/>

Node selected

Information Sent

Sample

Server

  • type: The event type onRDSDataViewSelectionChange
  • name: Server name
  • node_type: Type of the node- server

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0" > 
<callbackurl>http://[ip_address:port]/index.cfm? extension=<Extension_Name></callbackurl> 
<eventinfo type="onRDSDataViewSelectionChange"> 
<event>onRDSDataViewSelectionChange</event> 
<name>LocalCF9</name> 
<node_type>server</node_type> 
</eventinfo> 
</ide> 
<user></user> 
</event>

Data source

  • type: The event type onRDSDataViewSelectionChange
  • name: Data source name
  • parent_node: Name of parent node. That is, the name of the server to which the datasource belongs.
  • node_type: Type of the node- data source.

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0" > 
<callbackurl>http://[ip_address:port]/index.cfm? extension=<Extension_Name></callbackurl> 
<eventinfo type="onRDSDataViewSelectionChange"> 
<event>onRDSDataViewSelectionChange</event> 
<name>AUTHORS</name> 
<parent>Tables</parent> 
<node_type>table</node_type> 
</eventinfo> 
</ide> 
<user></user> 
</event>

Table Group

  • type: Event type, onRDSDataViewSelectionChange
  • name: Table group name
  • parent_node: Name of parent node. That is, the name of the data source to which this table group belongs
  • node_type: Type of the node- group.

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0" > 
<callbackurl>http://[ip_address:port]/index.cfm? extension=<Extension_Name></callbackurl> 
<eventinfo type="onRDSDataViewSelectionChange"> 
<event>onRDSDataViewSelectionChange</event> 
<name>Tables</name> 
<parent>cfbookclub</parent> 
<node_type>group</node_type> 
</eventinfo> 
</ide> 
<user></user> 
</event>

Table

  • type: Event type, onRDSDataViewSelectionChange
  • name: Table name
  • parent_node: Name of parent node. That is, the data source to which the table belongs.
  • node_type: Type of the node- table.

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0" > 
<callbackurl>http://[ip_address:port]/index.cfm? extension=<Extension_Name></callbackurl> 
<eventinfo type="onRDSDataViewSelectionChange"> 
<event>onRDSDataViewSelectionChange</event> 
<name>AUTHORS</name> 
<parent>Tables</parent> 
<node_type>table</node_type> 
</eventinfo> 
</ide> 
<user></user> 
</event>

Column

  • type: The event type onRDSDataViewSelectionChange
  • name : Column name
  • parent_node: Name of parent node. That is, the name of the table to which the column belongs.
  • node_type: Type of the node- column.

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0" > 
<callbackurl>http://[ip_address:port]/index.cfm? extension=<Extension_Name></callbackurl> 
<eventinfo type="onRDSDataViewSelectionChange"> 
<event>onRDSDataViewSelectionChange</event> 
<name>AUTHORID</name> 
<parent>APP.AUTHORS</parent> 
<node_type>field</node_type> 
</eventinfo> 
</ide> 
<user></user> 
</event>

OnFileSaved: Add event notification when file is saved

When a file is saved in ColdFusion Builder, an event notification is sent to the Handler CFM file. For this, a new event onFileSaved has been introduce . The event can be registered as follows:

<event type="onFileSaved" handlerid="OnFileSaved"/

The information sent to the Handler includes:

  • Specifying callback commands from handlerstype : Event type is onFileSaved
  • project_path: Absolute path of the project in which the file that is saved belongs.
  • file_path: Absolute path of the file saved.
  • editor_name: Name of the editor that opened the file. For CFML files the name is Adobe CFML Editor.

The following is a sample output:

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0"> 
<callbackurl> 
http://[ip_address:port]/index.cfm? extension=<Extension_Name> 
</callbackurl> 
<eventinfo type="onfilechangeineditor"> 
<project> 
Extensions 
</project> 
<project_path> 
[project_path] 
</project_path> 
<file_path> 
[file_path] 
</file_path> 
<event> 
onfilesaved 
</event> 
<editor_name> 
Adobe CFML Editor 
</editor_name> 
</eventinfo> 
</ide> 
<user> 
</user> 
</event>

Specifying context-menus

Use the menucontributions tag to specify a context-menu. A context-menu is a pop-up menu that appears on a right-click event.

To specify menu contributions for different views, use the contribution tag. Use the target attribute within the contribution tag to specify the target view where the menu must appear. Use the menu tag within the contribution tag to specify the menu to add. Use the action tag within the menu tag to specify menu items.

Syntax

<menucontributions> 
<contribution target="rdsview|projectview|outlineview"> 
<menu name="name of the menu item"> 
<action name="action name"> 
</action> 
</menu> 
</contribution> 
</menucontributions>

contribution

Attribute

Description

target

The target view can be any of the following:

  • rdsview
  • projectview
  • outlineview
  • editor
Note:

You can specify only alphanumeric characters for the attribute values. Special characters are not allowed.

Attribute

Description

name

Specifies the name of the menu.

Note:

You can specify only alphanumeric characters for the attribute values. Special characters are not allowed.

action

Attribute

Description

name

Specifies the name of the action.

handlerid

Specifies the ID of the associated handler.

showresponse

A Boolean that value that specifies if the HTML response that the handler receives must be shown to the user:yesnoThe default value is false.

Note:

You can specify only alphanumeric characters for the attribute values. Special characters are not allowed.

Specifying menu filters

Menu filters help control where a menu or menu item must appear. You specify menu filters using the filters tag. You can specify different filter types within the filters tag; use the type and pattern attributes to specify where the menu or menu item must appear. If any of the specified filters match, the specified menu or menu item appears.

You can specify filters for both menus and actions. If you specify the filter tag within the menu tag, the filter controls the display of the menu. For example, in the following code, the ORM Code Generator menu appears only if the user right-clicks the modelglue.xml file.

<filters>
<filter type="file" pattern="modelGlue.xml" />
<filters>
</menu>
Specifying  filters  for the Navigator View

You can specify filters on the project, folder, or file of the Navigator view.

Syntax

pattern="regular expression to match folder, project, or filename" />

*Example*If you want the ORM Code Generator menu to appear only in the context of a folder, you can use code like the following:

<filters>
<filter type="folder" />
<filters>
</menu>
Specifying filters for the Outline View

You can specify filters on different node types of the Outline view. The node name that you specify acts as the filter. In the Outline view, you can also specify filters for files. When you open the file that matches the filter in the CFML editor, the contributed menu appears in the Outline view.

<filters>
<filter type="node name" />

*Example*If you want the ORM Code Generator menu to appear only on the CFfunction node in the Outline view, you can use code like the following:

<filters>
<filter type="cffunction" />

Specifying input types

Before a handler is called, you can get user inputs using the input tag. The associated handler processes the user inputs. You specify an input tag for every action and the input tag must be within the action tag.

To control the height and width of the input dialogs, you specify the input tag within the dialog tag. For example, you can specify code like the following:

<input name="Mapping" ... />
<input name="Datasource" ... />
</dialog>

Attribute

Description

height

Specifies the height of the dialog.

width

Specifies the width of the dialog.

title

Specifies the title for the dialog.

image

Specifies the path to the image that appears in the title bar. The path that you specify must be relative to the Extension folder.

Syntax

<input name="input variable name"
label="label for the input dialog box"
tooltip="tool tip"
type="dir|string|boolean|file|password|list"/>
</action>
Attribute Description
name Input variable name
label The label of the input dialog box
tooltip The  tool tip  that appears when the user moves the mouse over the input dialog box.
type

The input variable can be any of the following data types:

  • dir
  • string
  • Boolean
  • file
  • password
  • list
  • projectdir
  • projectfile
required Specifies the input field as required. When you specify an input field as required, the OK button is not enabled until the user enters a value in the required field.
pattern Specifies the regular expression against which user input is validated. For a validation error, you can specify the error message that must appear. You use the  errormessage  attribute to specify the error message.
errormessage The error message that appears when validation fails for a given pattern.
helpmessage The Help tip that appears in the title area of the dialog for a given input field.
default Specifies a default value for a given input type. You cannot specify a default value for Boolean input types. For lists, the default value is pre-selected.
checked

A Boolean value that specifies if the  check box  field is selected or deselected, by default:

  • true -  check box  is selected (default value).
  • false -  check box  is deselected
Note:

You can specify only alphanumeric characters for the attribute values. Special characters are not allowed.

Each data type corresponds to an input type as specified in the table below. The syntax for each input type is also specified.

Datatype

Input type

Syntax

dir

Directory selection field

<input name="input variable name" label="label" tooltip=" tooltip" type="dir"/>

string

Text field

<input name="input variable name" label="label" tooltip=" tooltip" type="string"/>

boolean

Check box

<input name="input variable name" label="label" tooltip=" tooltip" type="boolean"/>

file

File selection field

<input name="input variable name" label="label" tooltip=" tooltip" type="file"/>

password

Password field

<input name="input variable name" label="label" tooltip=" tooltip" type="password"/>

list

List field

<input name="input variable name" label="label" tooltip=" tooltip" type="list"> <option value=”Option1”> <option value=”Option2”> </input>

projectdir

Project directory selection field

<input name="input variable name" label="label" tooltip=" tooltip" type="projectdir"/>

projectfile

Project file selection field

<input name="input variable name" label="label" tooltip=" tooltip" type="projectfile"/>

Example

<contribution target="rdsview" >
<menu name="ORM Code Generator">
<action name="Generate ORM CFC" handlerid="cfm1" >
<input name="Location" label="Enter location"
tooltip="Location where generated CFCs will be stored" type="dir"/>
<input name="generateAppCFC" label="Generate
Application CFC" tooltip="Generate Application CFC along with ORM CFC"
type="boolean"/>
<input name="generateView" label="Generate View"
tooltip="Generate View template along with ORM CFC" type="boolean"/>
</action>
<action name="Generate Ajax Grid" handlerid="cfm2" >
<input name="Location" label="Enter location"
tooltip="Location where generated View will be stored" type="dir"/>
</action>
</menu>
</contribution>
<contribution target="projectview" >
<menu name="ORM Code Generator">
<action name="Generate ORM CFC" handlerid="cfm1" />
<action name="Generate Ajax Grid" handlerid="cfm2" />
</menu>
</contribution>
<contribution target="outlineview" >
<menu name="ORM Code Generator">
<action name="Generate ORM CFC" handlerid="cfm1" />
<action name="Generate Ajax Grid" handlerid="cfm2" />
</menu>
</contribution>
</menucontributions>

Keyword support

ColdFusion Builder supports keywords that are used to add default values in input dialogs. During runtime, actual values replace the keywords.

The following table lists the supported keywords and the corresponding actual values.

Keyword

Actual value

projectlocation

Absolute path to the project location

projectname

Name of the project

serverhome

Absolute path to the serve installation location

wwwroot

Server web root

For example, you can specify the projectname keyword as follows:

<input name="projectname" label="projectname" default="{$projectname}" type="dir"/>

For information about importing, reloading, packaging, and debugging extensions, see Using the Extensions view.

Support for menu contribution on multiple nodes

Note:

Introduced in ColdFusion Builder 2.0.1

In RDS Data View, menu contributions can be added to server, database, and file nodes in addition to table nodes.

If you select server node, then server names are sent to the Handler. The attribute selected, if true, indicates if the server, database, table or field is part of the selection as shown in the following sample response sent to the Handler:

<event>
<ide version="2.0">
<callbackurl>
url
</callbackurl>
<rdsview>
<servers>
<server name="server1">
<server name="server2">
</servers>
<database name="db1" server="server1" selected="true">
<table name="table1" selected="false">
<fields>
<field
name="field1" .... selected="true">
</fields>
</table>
</database>
</rdsview>
</ide>
</event>

Filters

As menu contributions can be added to multiple nodes in the RDS data view, you can specify filters to specify the node that you choose to be active as shown in the following example.The valid filter types are server, database, table, and field.

<menu name="menu1">
<action name="action1">
</action>
<filters>
<filter type="database" />
<filter type="table" />
</filters>
</menu>
</contribution>-

Understanding ColdFusion Builder and handler communication

Communication between the handler and ColdFusion Builder IDE is through XML. When an event occurs, ColdFusion Builder sends the event details to the associated handler in XML format. The XML is sent to the handler as a FORM-scope variable named ideEventInfo. To retrieve the XML from the FORM-scope variable, use the cfparam tag in the handler.

Syntax

<cfparam name="ideeventinfo">

or

<cfset ideData= form.ideEventInfo >

Understanding XML structure

To understand the XML structure, let us review the XML code. Consider the following points before reviewing the code:

  • All information sent to the handler is within the event tag.
  • All event and action information is within the {{ide }}tag.
  • Any user inputs are within the user tag.

The following table describes the XML code. The contents of the XML code vary depending on the event.

Code

Context

Description

<database name="">
<table name="">
<fields>
<field name=""
type=""
length=""
nullallowed=""
primarykey=""/>
</fields>
</table>
</database>
</rdsview>

rdsview

When you click a menu item of the RDS view, the event details are sent to the associated handler.

projectname="" projectlocation="">
<resource name=""
path=""
type="file/folder/project" />
</projectview>

projectview

When you click a menu item of the Project view, the event details are sent to the associated handler.

projectname=""
projectlocation="" >
<source filename=""
path="" >
<node type="function/other">
<function name=""
returntype="">
<argument name=""
type="" />
</function>
</node>
</source>
</outlineview>

outlineview

When you click a menu item of the Outline view, the event details are sent to the associated handler.

projectname=""
projectlocation=""
eventtype="" >
<resource name=""
path=""
type="file/folder/project" />
</eventinfo>

on project create

When the specified event occurs, the event details are sent to the associated handler.

<input name="" value=""/>
<input name="" value=""/>
<input name="" value=""/>
</user>

input dialog

All user inputs are specified within the user tag. Each input tag within the user tag, contains specific user input. The input name is the same as the input name specified in the IDE_Config.xml file.

<user> <page index="" > <input name="" value="" /> </page> </user>

Install wizard

All user inputs are specified within the user tag and sent to the handler associated with the Install wizard. Each input tag within the user tag contains specific user input. The input name is the same as the input name specified in the IDE_Config.xml file.

ideeventinfo.xml sent to Handler CFM files from ColdFusion Builder has:

  • ColdFusion Builder version information provided as follows:
<ide version="2.0" >
....
</ide>
</event>
  • Server details that include hostname and port number, provided as follows:
projectlocation="C:/Documents and Settings/sandeepp/runtime-EclipseApplication/mg1"
eventtype="onprojectcreate">
<server name="local1" hostname="localhost" port="8501" wwwroot="C:\ColdFusion9\wwwroot"/>
</eventinfo>

Sending messages between extensions

Note:

Introduced in ColdFusion Builder 2.0.1

An extension can now send messages to another extension to perform an action or to notify of some event. The extension that receives the message can either take action or ignore the message.

The following scenario explains how this feature is useful:

You can now create extension that can listen to events, for example switching to a different file in the editor or selection change in the RDS data view. Using this feature, if you want, you can update the view content with this information (say about the new selection).

The handler CFM file that receives the event change notification executes a callback command sendMessageToExtension to ColdFusion Builder with the following:

  • Message information
  • Name of the extension to which the message has to be sent
  • The handler CFM file in the extension that has to be executed

The following example asks ColdFusion Builder to send message to New Extension Enhacements in CFB Twister extension and call its handler NewFeaturesTestViewHandler and passes information such as event type and other event related information:

<ide> <commands> <command type="sendMessageToExtension">
<params> <param
key="extension_name" value="New Extension Enhacements in CFB Twister" />
<param key="handlerid" value="NewFeaturesTestViewHandler" />
<param key="event_type" value="#type#" /> <cfloop
list="#structKeyList(eventinfo[1])#" index="key"> <param
key="#key#" value="#eventinfo[1][key].xmlText#" />
</cfloop> </params> </command>
</commands> </ide> </response> </cfoutput> </cfsavecontent>
<cftry>
<cfhttp url="#callbackURL#" method="post" result="httpResult">
<cfhttpparam type="body" value="#command#">
</cfhttp>
<cfcatch>
<cfset httpError = cfcatch.Message>
</cfcatch>
</cftry>

Handler communication

ColdFusion Builder sends the event details to the handler NewFeaturesTestViewHandler as XML (as FORM-scope variable ideEventInfo) as follows:

<ide version="2.0">
<callbackurl>
http://[ip_address:port]/index.cfm?extension=New Extension Enhacements in CFB 2.0.1
</callbackurl>
<extension_message>
<from_extension_name>
New Extension Enhacements in CFB 2.0.1
</from_extension_name>
<params>
<param key="project" value="Extensions"/>
<param key="project_path" value="[project_path]"/>
<param key="file_path" value="[file_path]"/>
<param key="event" value="onfilechangeineditor"/>
<param key="event_type" value="onfilechangeineditor"/>
<param key="editor_name" value="Adobe CFML Editor"/>
</params>
<from_extension_server>
LocalCF9
</from_extension_server>
</extension_message>
</ide>
<user>
</user>
</event>

The information passed inside the extension_message node include the following:

Information

Description

from_extension_name

The extension that has sent the message.

params

Parameters of the message.

Creating user interfaces for extensions

Create input dialogs

You can create an input dialog either by using a configuration file (IDE_Config.xml) or using CFM pages.

Note:

If you are creating a user interface using XML response, turn off the debug output by specifying cfsetting showdebugoutput="no" in the relevant code.

Using the configuration file

You create an input dialog by creating a configuration file (IDE_config.xml) and specifying the necessary details. For more information, see Configuration file.For, example, you can specify code like the following:

<dialog>
<input name="input variable name" label="label for the input dialog"
tooltip="tool tip" type="dir"/>
</dialog>
</action>

Using CFM pages

  • In the IDE_config.xml file, specify the showResponse attribute of the Action tag as yes, as follows:
<action name="generate CFC" handlerid="cfcgenerator" showResponse="yes" />
  • In the CFM handler, do the following:

1. Specify the content-type value of the  cfheader  tag as text/ xml , as follows:

<cfheader name="Content-Type" value="text/xml">

2. Create the input dialog by constructing the XML as follows:

<response>
<ide>
<dialog >
<input name="location" Label="Enter Location" type="dir" />
</dialog>
</ide>
</response>
</cfoutput>

Create HTML user interfaces

You can create an HTML user interface either by using HTML response or XML response.

Using HTML response

In the IDE_config.xml file, specify the showResponse attribute of the Action tag as yes, as follows:

<action name="generate CFC" handlerid="cfcgenerator" showResponse="yes" />

The HTML content of the CFM page appears in a dialog box. Ajax and Javascript are not supported in the HTML content. If you use links in the HTML content, the URL for the link must be an absolute URL and not a relative URL.

Using XML response

In the CFM handler, do the following:

1. Specify the content-type value of the  cfheader  tag as text/ xml , as follows:

<cfheader name="Content-Type" value="text/xml">

2. Create the HTML user interface by constructing the XML as follows:

<response showresponse="true">
<ide url="http://localhost:8500/local/Dynamic%20UI%20Test/handlers/main.swf" >
<dialog width="455" height="470" />
</ide>
</response>
</cfoutput>

The HTML content of the specified URL appears in a dialog box.You can also display HTML user interface through an XML response as follows:

<response showresponse="true">
<ide >
<dialog width="100" height="400" />
<body>
<![CDATA[
Any HTML content
]]>
</body>
</ide>
</response>
</cfoutput>
Note:

Extensions do not support relative paths for CSS and JavaScript. Ajax and JavaScript code that is specified in the CDATA section does not work. Any URL that you specify in the CDATA section must be an absolute URL.

Understanding the structure of XML response

Response

The XML response is defined within the response tag that has the following attributes:

Attribute

Description

showresponse

A Boolean value that specifies if the response must be shown to the user:

  • true
  • false

status

Displays a success or error dialog box. Depending on the status - success or error, the dialog appears with a relevant icon. Applicable only when message attribute is specified in IDE tag.This attribute is applicable only when you specify the message attribute within the IDE tag.

IDE

The IDE tag has the following attributes:

Attribute

Description

message

Displays the message that you specify in a success or error dialog box. Use status="success/error" attribute of the response tag to specify if the message must appear as an error message.

url

The URL of a page that you want to display to the user.

handlerfile

Path to the handler file that must be called when a user clicks OK in the message dialog box.This attribute is applicable only when input dialogs are created from an XML response.

Body

Use the body tag to specify any HTML content. The HTML content within the body tag must be specified in the CDATA section.

Dialog

The dialog tag is used to create input dialogs and has the following attributes:

Attribute

Description

height

Specifies the height of the dialog.

width

Specifies the width of the dialog.

title

Specifies the title for the dialog.

image

Specifies the path to the image that appears in the title bar.

dialogclosehandler

Path to the handler file that must be called when a user clicks Close or Cancel in the message dialog box.This attribute is applicable only when input dialogs are created from an XML response.

To control the height and width of the input dialogs, you use the input tag within the dialog tag.

Attribute

Description

height

Specifies the height of the dialog.

width

Specifies the width of the dialog.

title

Specifies the title for the dialog.

image

Specifies the path to the image that appears in the title bar. The path that you specify must be relative to the Extension folder.

Create views

ColdFusion Builder lets you create views using extensions. You can also specify a view icon and toolbar items for the view you create.

The feature helps you use IDE features concurrently while seeing the data.

Create view in either of the following ways:

  • Add contribution to ide_config.xml
  • Dynamically from handler response

Add contribution to IDE_config.xml

Specify the details in the configuration file IDE_config.xml as shown in the following code. Adding view contribution to ide_config.xml adds the view to the list of views under ColdFusion category in Show View dialog box (Window > Show View > Other).

<view id="ID" title="title" icon="relative_path_to_icon" handlerid="handler_id" >
<toolbarcontributions>
<toolbaritem icon="relative_path_to_icon" handlerid="handler_id" />
<toolbaritem icon="relative_path_to_icon" handlerid="handler_id" />
</toolbarcontributions>
</view>
</viewcontributions>

Attribute

Description

id

Identifies the view. Views contributed by an extension must have unique IDs. id can be used to update the content of a view from handler response.

title

A title for the view.

toolbaritem

Adds an item to the view toolbar.

icon

Relative path to  image  file that resides in the installation location of extensions. For example, specifying images/icon.png (in the images folder of extension installation location) displays icon.png as the view icon.The standard sizes are 16x16 pixels or 20x20 pixels. All popular image formats are supported.

handlerid

ID of the associated handler.

keepFocus(Added in ColdFusion Builder 2.0.1)

If true, avoids focus from shifting when an extension view is generated dynamically. Assume that you are editing a file and an action results in refresh/creation of extension view. You may not want the focus to move from the editor to the view. Set the attribute keepFocus to true to avoid focus from shifting when an extension view is generated dynamically using the <view> tag in IDE_config.xml. By default, dynamically created extension views do not get focus. The extension views displayed from the Window menu > Show View option always gets focus.

Displaying the view

  1. Install or import the extension which contributes the view.

  2. Open Show View dialog box (Window > Show View > Other).

  3. Double-click ColdFusion in the folder list.

  4. Select the view (that is contributed) and then click OK.

The view appears and calls the corresponding Handler CFM file.

Use Handlers (for dynamic views)

In the CFM handler,

1. Specify the content-type value of the  cfheader  tag (as text/ xml )as follows:

<cfheader name="Content-Type" value="text/xml">

2. Create the view that displays HTML content by constructing the XML as follows:

<response showresponse="true">
<ide url="URL">
<view id="ID" title="title" icon="icon_path" />
</ide>
</response>
</cfoutput>

You can also display HTML content through an XML response as follows:

<response showresponse="true">
<ide>
<view id="ID" title="title" icon="icon_path" handlerid="ID" />
<body>
[![CDATA[any html content]]>
</body>
</ide>
</response>
</cfoutput>
Note:

Currently, views do not persist across ColdFusion Builder sessions.

In ColdFusion Builder 2 and earlier versions, the dynamic views gets added to the sub menu of “Window > Show view” dialog. However, in ColdFusion Builder 3, the dynamic views are shown in the extension view as a drop down item:

Dynamic views
Dynamic views

Specifying callback commands from handlers

In ColdFusion Builder (the previous release), from the handler CFM files, you can request to run the following commands: refreshproject, refereshfolder, refreshfile, inserttext, and openfile.

Now you can complete all these operations and few others in the execution phase itself (rather than at the end of execution). From the Handler CFM files you can send a call to ColdFusion Builder using the callback URL. ColdFusion Builder provides the callback URL in ideeventinfo XMLas shown here:

<event> 
<ide version="2.0"> 
<callbackurl> 
callbackURL 
</callbackurl> 
</ide> 
</event>

In addition to the commands that get context information related to the editor, you can get server-specific information such as data source and table details.

The following table provides the list of commands that help you perform various operations in the execution phase. All commands which request data have command result in XML format. The table has the results returned by each command:

Name Action Input Result
refreshFile Refreshes the specified file by sending the absolute or relative path. If you specify the relative path, specify the project name.projectName is optional. It can be specified if the file is in the project. <command type="refreshFile"> 
<params> 
<param key="filename" value="filePath" />
<param key="projectname" value="#arguments.project
Name#" /> 
</params> 
</command>
Not applicable
refreshFolder Refreshes the specified folder.projectName is optional. It can be specified if the folder is in the project. <command type="refreshFolder"> 
<params> 
<param key="foldername" value="folderPath" /> 
<param key="projectname" value="projectName" /> 
</params> 
</command>
Not applicable
refreshProject Refreshes the specified project. <command type="refreshProject"> 
<params> 
<param key="projectname" value="projectName" /> 
</params> 
</command>
Not applicable
openFile Opens the specified file for editing, by sending the absolute or relative path. If you specify the relative path, specify the project name.projectName is optional. It can be specified if folder is in the project. lineNumber is an optional parameter (_added in ColdFusion Builder 2.0 _) <command type="openFile"> 
<params> 
<param key="filename" value="filePath" />
<param key="projectname" value="projectName" /> 
<param key="linenumber" value="10" /> 
</params> 
</command>
Not applicable
insertText Inserts the specified text in the active editor. Selected text in the editor is replaced after this command runs. <command type="inserttext"> 
<params> 
<param key="text"> 
<![CDATA[ text_to_insert ]]> 
</param> 
<param key="insertmode" value="replace/insert" /> 
</params> 
</command>
Not applicable
getServers Lists the servers added to the Server Manager. <command type="getservers" > 
</command>
<?xml version="1.0" encoding="UTF-8"?>
<event>
<ide version="2.0">
<callbackurl>
[call back URL]
</callbackurl>
<command_results>
<command_result type="getservers">
<servers>
<server name=""/>
...
</servers>
</command_result>
</command_results>
</ide>
</event>
getDatasources Lists the data sources for a given server. Output variable is comma-separated list of data source names.If server name is not specified, by default, the server on which the extension runs is considered. <command type="getdatasources" > 
<params> 
<param key="server" value="comma_
seperated_
server_names" /> 
</params> 
</command>
<?xml version="1.0" encoding="UTF-8"?>
<event>
<ide version="2.0">
<callbackurl>
[callback url]
</callbackurl>
<command_results>
<command_result type="getdatasources">
<datasources>
<datasource name="" server=""/>
...
</datasources>
</command_result>
</command_results>
</ide>
</event>
getTables Gets the details of tables for a given data source.If server name is not specified, by default, the server on which the extension runs is considered. <command type=
"gettables">
<params> <param key="server" value=
"servers" /> <param key=
"datasource" value="datasources" /> </params> </command>
<?xml version="1.0" encoding="UTF-8"?>
<event>
<ide version="2.0">
<callbackurl>
[callback url]
</callbackurl>
<command_results>
<command_result type="gettables">
<tables>
<table datasource="" name="table_Name" server="">
<field cfsqltype="" cftype="" javatype="" name=""
nullallowed="" primarykey="true|false" type=""/>
[list of other columns]
</table>
...[list of other tables]
</tables>
</command_result>
</command_results>
</ide>
</event>
getTable Gets the details of a particular table for a given data source.If server name is not specified, by default, the server on which the extension runs is considered. <command type="gettable"> 
<params> 
<param key="server" value="servername" />
<param key="datasource" value="dsn" /> 
<param key="table" value="tablename" /> 
</params> 
</command>
<?xml version="1.0" encoding="UTF-8"?>
<event>
<ide version="2.0">
<callbackurl>
[callback url]
</callbackurl>
<command_results>
<command_result type="gettable">
<table datasource="" name="" server="">
<field cfsqltype="" cftype="" javatype="" name=""
nullallowed="" primarykey="true|false" type=""/>
...
</table>
</command_result>
</command_results>
</ide>
</event>
searchFile Searches for a text content file and returns the content.Use getcontent only for text files.searchDirection indicates if you want to search through the parent folders (up) or sub-folders (down) <command type="searchfile" > 
<params> 
<param key="fileName" value="ide_config.xml"/> 
<param key="from" value="search_from_
this_
file_or_folder"/>
<param key="getcontent" value="true/false"/> 
<param key="searchDirection" value="up/down"/> 
<param key="matchfolder" value="true/false"/> 
</params> 
</command>
<?xml version="1.0" encoding="UTF-8"?>
<event>
<ide version="2.0">
<callbackurl>
[callback url]
</callbackurl>
<command_results>
<command_result type="searchfile">
<files>
<file path="" type="file"/>
</files>
</command_result>
</command_results>
</ide>
</event>
getfunctionsandvariables (For details onenhancements ,see the sectionEnhancements toexisting callbackcommands in ColdFusionBuilder 2.0.1) Lists the functions and variables in a file you specify. <command type=
"getfunctionsand
variables" > 
<params> 
<param key="filePath" value="path"/> 
</params> 
</command>
<?xml version="1.0" encoding="UTF-8"?>
<event>
<ide version="2.0">
<callbackurl>
[callback url]
</callbackurl>
<command_results>
<command_result type="getfunctionsand
variables">
<cfmlfile type="component
|interface|cfml">
<variables>
<variable function="name of function if variables is inside function" name="" type=""/>
...
</variables>
<functions>
<function file="" name=""/>
...
</functions>
</cfmlfile>
</command_result>
</command_results>
</ide>
</event>
getProjects(Added in ColdFusion Builder 2.0.1)

Gets the list of ColdFusion Builder projects. The details include:

  • name: Name of the project
  • path: Absolute path of the project.
  • isopen  :  If  project  is open or closed. If open, the value is true.
  • iscfproject : false if not a ColdFusion project. If it is a ColdFusion project, then additional information such as server name is returned.
<commands> 
<command type=
"getprojects" > </command> 
</commands>
<?xml version="1.0" encoding=
"UTF-8"?><event> <ide version="2.0"> <callbackurl> http://<ip_address:port>
/index.cfm?extension=untitled </callbackurl> <command_
results> <command_result type="getprojects"> <projects> <project name="TestProject"
path="<Project_Path>">
<cfproject> <server name="local_server"/>
</cfproject> </project>
</projects> </command_result> </command_results> </ide></event>
reloadExtensions(Added in ColdFusion Builder 2.0.1) Reloads an extension using an extension. <commands> 
<command type="reloadExtensions" > </command> 
</commands>
Not applicable
sendMessageToExtension(Added in ColdFusion Builder 2.0.1) For details, see Sending messages between extensions.    

Enhancements to existing callback commands in ColdFusion Builder 2.0.1

The response returned by the callback command  getfunctionsandvariables  now includes variable scope-related information. You can write extension to determine the scope, for example if the variable is var scoped in the function.The following three variables are identified:

  • Argument scope
  • Var scope
  • Tag created variables, for example, the variables created in  cfquery .

You can determine the remaining scopes in the Handler CFM file from the variable name prefix, for example  this or application. The following is a sample  getfunctionsandvariables  output that includes scope-related information:

<event> 
<ide version="2.0"> 
<callbackurl> 
http://ip_address:port/index.cfm?extension=untitled 
</callbackurl> 
<command_results> 
<command_result type="getfunctionsandvariables"> 
<cfmlfile type="cfml"> 
<variables> 
<variable name="i" type="numeric"/> 
</variables> 
<functions> 
<function name="testFunc" file="C:\ColdFusion9\wwwroot\MyExtension\handlers\test.cfm"> 
<variables> 
<variable name="j" type="numeric" function="testFunc" scope="varscope"/> 
<variable name="arg1" function="testFunc" scope="argument"/> 
<variable name="variables.l" type="numeric" function="testFunc"/> 
</variables> 
</function> 
</functions> 
</cfmlfile> 
</command_result> 
</command_results> 
</ide> 
</event>

Example: Execute commands using callback URL

  1. Step 1: Get ideeventinfo XML

    <cfparam name="ideeventinfo" > 
    <cfset xmldoc=xmlParse (ideeventinfo)>
  2. Step 2: Get callback URL from ideeventinfo XML

    <cfset callbackurl= xmldoc.event.ide.callbackurl.xmlText>
  3. Step 3: Create XML to send command to ColdFusion Builder

    <cfsavecontent variable="commandxml" > 
    <cfoutput> 
    <response> 
    <ide> 
    <commands> 
    [Any command xml to be executed] 
    </commands> 
    </ide> 
    </response> 
    </cfoutput> 
    </cfsavecontent>
  4. Step 4: Execute callback command and get response

    <cfhttp method="post" url="#callbackurl#" result="commandresponse" > 
    <cfhttpparam type="body" value="#commandxml#" > 
    </cfhttp>

Handling errors while using callback commands

If there is an error while executing commands which return data, command response XML provides the error node with information about the possible cause of error.

<?xml version="1.0" encoding="UTF-8"?> 
<event> 
<ide version="2.0"> 
<callbackurl> 
[callback url] 
</callbackurl> 
<command_results> 
<error> 
[error message] 
</error> 
</command_results> 
</ide> 
</event>

Additional resources

  • *[ColdFusion Builder 2 Extensions - Understanding
    Callback Commands|http://sandeepp.org/blog/?p=224]* ColdFusion Builder engineering team member Sandeep Paliwal explains the possibilities of callback commands in ColdFusion Builder 2 extensions.

Using the Extensions view

Use the Extensions view to install, uninstall, import, and reload extensions.

If the Extensions view is not already displayed in the workbench, add the Extensions view by selecting Window > Show View > Other. Then, in the Show View dialog box, select ColdFusion > Extensions view.

Install and uninstall extensions

  1. In the Extensions view, click   and select the Archive file to install.

    Note:

    If the extension that you are installing is shipped with ColdFusion Builder, the Archive file is available in the Extensions directory within the ColdFusion Builder installation.

  2. The Extension Install wizard guides you through the installation.

  3. Select the Server. If no server is configured, click Add Server to add a new server. For information about adding a server, see Adding ColdFusion servers.You can install the same extension on different servers. For example, CF9 local server and CF8 local server. However, at any given point, only the server that the extension uses is active.

  4. Enter the path to the ColdFusion web root (if the path is not automatically populated when selecting the server). For example, _C:\ColdFusion9_wwwroot\

  5. Select a folder within the web root to install the extension. The archive file is extracted to the install location.

  6. Click Install.

To view a brief description about the installed extension, click the extension name. If you have installed the same extension on more than one server, you can make one of the servers active. To do so, select the server that you want to make active from the Active Server drop-down list.

To uninstall an extension, select the extension in the Extensions view and click  . You can uninstall an extension from the IDE only, or remove the extension from your IDE and computer’s file system at the same time. When an extension is permanently removed from the file system, you cannot undo the command.

Note:

If you are uninstalling an extension that is installed on multiple servers, repeat the uninstall process for every server.

Import and reload extensions

Use the Extensions view to import and reload extensions.

  • You can import extensions from an existing directory into ColdFusion Builder. Click   in the Extensions view, and select the directory that contains the extension files.
Note:

It is useful to import extensions when you use existing extensions to develop new extensions.

  • You reload an extension if you change the configuration file of an installed extension. Configuration file changes are reflected only after you reload the extension. Click  in the Extensions view to reload all the installed extensions.

Debug and package extensions

While loading extensions from the configuration file, any errors are logged to the Eclipse log. To debug the errors, you can view the ColdFusion Builder error log by selecting Window > Show View > Other > General > Error Log. The ColdFusion Builder error log appears in the Error Log view.

To package an extension, add the following contents to a ZIP file:

  • Configuration file (IDE_config.xml)
  • Handler directory that contains all the Handler CFM files
Note:

Ensure that you add the configuration file and handler directory directly under the root of the ZIP file.

Ensure that you add the configuration file and handler directory directly under the root of the ZIP file.

The ColdFusion Builder Extension Creator wizard guides you through the process of creating and packaging extensions. The wizard guides you through creating the Configuration file (IDE_Config.xml) and Handler files (CFM), specifying metadata elements, adding context menus, and creating user interfaces.

Note:

The ColdFusion Builder Extension Creator wizard is installed only if you selected Install Extensions while configuring a ColdFusion server. See the Extensions view for the list of installed extensions.

  1. In the Navigator view, right-click the project in which you want to create the extension, and select Adobe Extension Builder > New.

  2. Enter or browse to a location to store the extension. Select Create Folder With Extension Name to store the extension files in a folder with the same name as the extension.

  3. Select the Extension Details tab to enter the extension name and details. You can also specify any license agreement text that must appear on installing the extension.

Specify menu contributions

Select the Menu contributions tab and click Add Menu to specify a context-menu. A context-menu is a pop-up menu that appears on a right-click action.

  • Enter the name of the menu and the target view from where the menu must appear. You can specify the target view as the Navigator or Project view, RDS view, Outline view, or the CFML editor. Then, click Save Menu.
  • To specify menu items, click Add Action.
  1. You can associate handlers with an action. Handlers display the code generation operations that are fetched from the server. Specify the Handler ID and Handler name, and select Show Response to display the server response. Then, click Save.

  2. Before a handler is called, you can get user inputs. To do so, click Add Input.

  3. Specify the input variable name, label for the input dialog box, tooltip, and the input variable type.

  4. You can also specify the pattern against which the user input is validated, and the error message that appears when the validation fails.

  5. Select Required to specify the input field as required, and select Checked to have the check box selected, by default. Then, click Save.

  • To specify filters that control the display of the menu, click Add Filter. You can specify filters at the project, folder, and file levels.

Specify handlers

Select the Handlers tab to view details about the installed handlers.

  1. To specify a new handler, click Add Handler, and enter the necessary details.

  2. Select Generates Response to get user inputs before calling the handler.

  3. Specify the title of the input dialog box, and the height and width in pixels. Then, click Save Handler.

Create an extension installation wizard

Select the Install Wizards tab to create an installation wizard that guides you through the extension installation.

  1. Specify the height and width of the wizard in pixels. You can also associate a handler with the wizard. Then, click Save.

  2. Specify a title for the wizard, and click Save.

  3. Specify the input variable name,  label  for the input dialog box, tooltip, and the input variable type. You can also specify the pattern against which the user input is validated, and the error message that appears when the validation fails.

Package the extension

  1. In the Navigator view, right-click the ide_config. xml  file and the Handler folder that contains all the Handler CFM files, and select Adobe Extension Builder > Package. The files are added to a ZIP file.

  2. Browse to a location to store the ZIP file.

Contribute to Code Assist from extensions

You can add proposals to Code Assist from extensions.

  1. In the IDE_config.xml, do the following:
  • To add proposals to Code Assist for function parameters, add the following code:

<codeassistcontribution> 
<functions> 
<function name="linkTo" variableName="event" componentName="component_name" handlerId="CodeAssistHandler"> 
<parameter index="1" /> 
</function> 
</functions> 
</codeassistcontribution>
  • To add proposals to Code Assist on variables, add the following code:
<codeassistcontribution> 
<variables> 
<variable name="event" componentName="component_name" handlerId="CodeAssistHandler"> 
<parameter index="1" /> 
</variable> 
</variables> 
</codeassistcontribution>

Attribute

Description

name

Name of the function that has to be listed.

variableName

Name of the variable. If specified, then the handler is called only if the name of the variable on which the function is called matches the variable name.For variables, when you specify variablename . ,in the editor, Code Assist presents the contribution for that variable.

componentName

If specified, the type of the variable on which the function is called matches the component name you specify.

handlerID

ID of the associated handler.

index

Specifies parameter indexes for which the handler can provide Code Assist. If not present, then the handler is called for all parameters in the function.

1. In the Handler CFM file, specify the response to add code assist proposal in the following format:

<codeassist_response> 
<proposal display="display_value" insert="insert_this_value" inquotes="true/false"/> 
</codeassist_response>

Attribute

Description

display

The value you specify appears in the proposal window.

insert

If that proposal is selected, then the value you specify is inserted in the editor.

inquotes

If set to true, then the text inserted in the editor is enclosed in double quotes.

2. Install/import the extension. When you start ColdFusion Builder Code Assist, the functions are displayed in the proposal window.

Extension support for setting Launch Page

You can dynamically generate Start Page URL for framework applications using extensions.

ColdFusion Builder features such as ColdFusion Debugger, Use External Browser, Run as ColdFusion Application use this URL as the Start Page URL.

The generated URL can also have query param added to it.

Note:

 ColdFusion Builder lets you Set Launch Page at the project level, which is helpful for simple applications. This feature provides option to set Launch Page for projects that are based on frameworks.

Add Start Page contribution to IDE_config.xml

Specify the details in the configuration file IDE_config.xml as shown in the following code:

<startpagecontribution> 
<urlgenerator handlerid="ID" /> 
</startpagecontribution>

Handler communication

ColdFusion Builder sends the event details to the handler as XML (as FORM-scope variable ideEventInfo) as follows:

<event> 
<ide version="2.0"> 
<callbackurl> 
... 
</callbackurl> 
<startpage_request> 
<project name="" projectlocation=""> 
<resource name="" path="" type="file|Folder|Project"/> 
<server name="" hostname="" port="" wwwroot=""/> 
</project> 
</startpage_request> 
</ide> 
</event>

This information can be used to generate the URL.

Using extensions to generate Start Page URL

  1. In the Project View, right-click the project and then select Properties > ColdFusion Project.

  2. In the Start Page Setting, select the option available in the Use Extension list.

  3. Click OK.

Next time, when you run the application, the handler identified with the ID you specified in IDE_config.xml is called. The information related to the project or the CFM is displayed.

Example

<cfheader name="Content-Type" value="text/xml"> 
<cfoutput> 
<startpage_response> 
<url>Any URL</url> 
</startpage_response> 
</cfoutput>

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online