Table of contents
15 May 2012
|Adobe ColdFusion Builder (2016 release) (Download trial)||All|
Language dictionary at the Project level
Upload on Save
Keyboard shortcuts for Sync actions
Code Assist for CFCs includes the following:
- Suggestions for CFC names in
- Suggesting function or parameter names when code assist is invoked on CFC variable.
For both types of code assist support, ColdFusion Builder must resolve CFCs. That is, in the former case ColdFusion Builder finds valid CFCs, and, in the latter case ColdFusion finds the CFC path from CFC name.
ColdFusion Builder searches different parameters when resolving CFCs:
- Search in the current folder
- Search from the project root
- Search from the wwwroot of the server if you have associated the server with the project
- Search CFC mappings in the server administrator, again if you have associated the server with the project
- Search CFC variable mappings for the project
- Search external folders linked in the project
For CFCs that you host outside the project folder and wwwroot of the server, you can use CFC mapping in the server administrator or the link folders option. However, keep in mind that you might not always remember to configure mappings in the administrator at development time, and you might not always be connected to the server. In such cases, the link folders option is the only way for resolving such CFCs that are outside wwwroot and project root.
The link folders option work fine if no two projects refer to the same link folder, else you would have duplicate references to the same files. This could be a problem when using code hyperlinks on CFCs—if two projects have the same file, ColdFusion Builder asks you to select one through a dialog box that displays all references to the same file (from different projects). Many users had asked for ability to specify mappings at the project level, and we have implemented this option in ColdFusion Builder 2.0.1. To specify CFC mappings for a project, follow these steps:
- Open project properties (right-click the project name in the Navigator view and select Properties).
- Click CFC Mappings to see details. This page now contains a new section named CFC Folder Mappings.
- ColdFusion Builder caches CFC names in the mappings you specify on this page. If you add or delete any mapping, when you click OK or Apply, ColdFusion Builder automatically updates the cache. However if you add any files to the already mapped folder, you must make ColdFusion Builder update the cache. To do so, click Rebuild on this page.
New event notifications
We have added three new event notifications:
onFileSaved: When you save a file.
onFileChangeInEditor: When you open a new file in the editor or switch files in the editor by clicking on editor tabs.
onRDSDataViewSelectionChange: When you change a selection in the RDS Data View; that is, when you navigate between server, data sources, tables, and fields.
You may want to notify your extensions of the above events, for example, to update a view (for example, when a user changes or saves a file) or if it needs to perform some action in the background based on the above events. List the events that you want to notify your extensions of within the ide_conig.xml file. Refer to ColdFusion Builder documentation for mode details.
New Callback functions
Extension handlers use callback functions to ask ColdFusion Builder to perform some actions. We have added the following callback commands in this release:
- Get all projects (
getProjects): Returns a list of all the projects in ColdFusion Builder with information such as project name, path, whether the project is closed and if it is it a ColdFusion project.
- Reload all extensions (
reloadExtensions): If you change ide_config.xml for an extension, you must reload the extension in ColdFusion Builder. Now you can use this callback command to reload the extension from your extension handler.
- Sending a message to the extension, including itself (
sendMessageToExtension): You can send a message to any extension from the handler of your extension by specifying name of the receiver extension, id of the handler to execute, and message parameters (key-value pairs). This is also useful when you need to send message to the same extension, for example, a handler that receives an event notification might ask ColdFusion Builder to update a view in the same extension, while the view has a different handler (from the one that received notification).
Please see ColdFusion Builder documentation for more details.
New menu contribution targets in the RDS Data View
In previous releases of RDS Data View you could add menus from extensions to table nodes only. Now you can add menus from extensions to other nodes too, such as server, data source, or column. The menu contribution for RDS Data View now supports the filter tag too. So, if you want a menu contribution to appear on a data source node only, you can specify a filter in the ide_config.xml file as follows:
<menucontributions > <contribution target="rdsview"> <menu name="DatabaseMenu"> <action name="Add Table" handlerid="AddTableHandler" showresponse="true" /> </menu> <filters> <filter type="database" /> </filters> </contribution> </menucontributions>
If you do not specify a filter, the menu contribution displays on all nodes.
Other extension enhacements
The following are other extension enhancements we have added to ColdFusion 10.
- Each variable in the response to
getFunctionsAndVariablescallback command now contains one of the following scopes:
tagcreated(the variable created by a ColdFusion tag, such as the
cfquerytag). You can get other scopes from the prefix in the variable names, for example, the scopes of
- We have added a new attribute
viewtag. When an extension handler (as specified in the configuration in the ide_config.xml file) creates a view, ColdFusion Builder processes this attribute. If you specify
keepFocus=true, the view is in focus when created, otherwise focus remains in the editor. The default value is false. In the previous versions, ColdFusion Builder was set to focus on the view after creation, because of which some of the menu options did not work in the editor.
ColdFusion Builder has shipped with an Adobe CFC Generator Extension since its first version. By default, the extension does not install in ColdFusion Builder automatically; it is available in the Extensions folder where you have installed ColdFusion Builder. You install it using the Extensions panel in ColdFusion Builder.
This extension adds the following menu options to tables in RDS Data View:
- Create CFC: Creates CFCs for tables with SQL statements.
- Create ORM CFC: Creates ORM CFCs for tables using no SQL.
To use this extension, right-click the tables and then select the Adobe CFC Generator option. Adobe CFC Generator creates the following CFCs for each table:
- A data transfer CFC (named as table name) that has properties and getter/setters defined for each field in the table.
- A data access CFC (named as table name + "DAO") that contains CRUD functions for the table. ColdFusion Builder will not create this CFC for the ORM option.
- Gateway CFC (named as table name + "Gateway") that contains functions to get count, get all, and get paged records from the table. ColdFusion Builder will not create this CFC for the ORM option.
- Service CFC (named as table name + "Service") that contains remote wrappers for CRUD operations.
Note that the user interface for the Create ORM CFC menu option did not work for Mac in earlier versions of ColdFusion Builder. In ColdFusion Builder 2.0.1, we have redone the user interface so that it works for Windows and Mac.
When you select the Create ORM CFC option, ColdFusion Builder displays a dialog box with options to select the folder where you want to save the generated files. When you click OK in this dialog box, a new dialog box with tables that you have selected is displayed (Figure 7).
ColdFusion Builder 2.0.1 performs better than earlier versions. In addition to overall performance improvements when using the editor, we have fixed the following issues:
- If you had Application.cfc in the wwwroot (or in any application that had many CFCs), Code Assist for ORM became slow.
- ColdFusion Builder became unresponsive if you imported or refreshed large projects.
- Cyclic inclusion (the
cfincludetag) affected the editing speed of files.
Apart from these improvements, we have added a preference to turn off the Quick Fix option, which can improve performance in the following scenario. One of the features we added in ColdFusion Builder 2.0 was the Quick Fix option. If you had references to any undeclared functions such as CFCs or included files in the code, ColdFusion Builder displayed a warning icon and gave you the option to create the function, CFC, or file. Though this is a great productivity features, it might impact editor performance when working with large files in a large project that had many references to CFCs. This is because ColdFusion Builder needs to resolve each CFC reference; in a large project, this might cause slow performance. In ColdFusion Builder 2.0.1, you have option to turn off the Quick Fix feature by going to Preferences > ColdFusion > Profiles > Editor > Syntax Checking. Note that in ColdFusion Builder 2.0.1, we have turned off this feature by default. If you want to use this feature, turn it on in the Preferences noted aboves.
Though not new in this version, note that if you experience performance issues in the editor, you can set optimal performance options by selecting the following option: Preferences > ColdFusion > Profiles > Editor > Optimize editor preferences.
To leverage the latest functionalities, we have packaged the stand-alone version of ColdFusion Builder 2.0.1 with Eclipse 3.7.2.
ColdFusion Builder 2.0.1 has complete support for use with ColdFusion 10. It enables configuration of ColdFusion 10 in the server manager, supports syntax check and colorization for new language constructs, and provides code assist for new functions, tags, and attributes. The release also enhances existing features and improves performance substantially. The goal of this article is to provide an overview of various features in ColdFusion Builder 2.0.1. Please read the complete ColdFusion Builder documentation for details on how to use all of the new and enhanced features.