| By Christian Schneider | Article Rating: |
|
| June 7, 2001 12:00 AM EDT | Reads: |
6,970 |
This article demonstrates how to customize and extend ColdFusion Studio's capabilities. Allaire has built lots of nice widgets into the Studio Integrated Development Environment (IDE) to help developers wherever they can. And they did a good job, as you can see.
Starting at the customization level we can define our own color-coding schemes, code templates, keyboard shortcuts, icons, toolbars, and more. Most of this can be customized inside Studio's Options dialog (press F8 to open it directly). At the extension level there are efficient techniques available, including Tag Completion, Tag Insight, Tag Editors, and custom Wizards.
In this article I demonstrate how to extend ColdFusion Studio by using VTML to integrate your custom tags into the Studio IDE.
What are Tag Editors, Tag Insight, and custom Wizards? I suppose most of you working with Studio are using the Tag Insight feature (can be enabled from the Options dialog) quite often while typing HTML and CFML tags. This handy pop-up box lists all possible attributes of the tag you're currently typing so you can choose the attributes you want (see Figure 1).
In addition, the Tag Insight, available at the left-handed resource tab labeled "Tag Inspector," lists all possible attributes with their values grouped together. Tag Editors are dialog boxes in which you enter tag attributes into a GUI (with some basic validation possible) that can be activated by right-clicking a tag and choosing "Edit tag..." from the context menu (see Figure 2 for a tag editor in action).
Custom Wizards are step-based dialogs that ask information and complete special tasks based on what the user has entered. Put simply, ColdFusion Studio Wizards are a series of dialogs that the user has to go through sequentially that results in a new template being generated. When choosing "New..." from the File menu you have a list of all installed wizards (there are many helpful wizards being shipped with your Studio installation) to choose from (see Figure 3 for the first step of Studio's LDAP wizard). Now let's see how to develop the features that extend CF Studio.
The Visual Tool Markup Language (VTML)
VTML is a family of markup languages used to extend the IDE of HomeSite and ColdFusion Studio. Using VTML you can define your own Tag Insight and Tag Editors, which is very helpful when developing your own custom tags, since you can simply put the VTML files inside your distribution, enabling your custom tags to tightly integrate into the ColdFusion Studio IDE. As the name (Markup Language) might suggest, VTML is a tag-based language (CFML is also tag-based) and therefore easy to learn.
The Wizard Markup Language
WIZML is also a tag-based markup language that extends VTML, making custom Wizards possible through the combination of VTML for the user interface and WIZML under the hood for flow control and input processing. The use of VTML is the main topic of this article's tutorial; how to use WIZML to develop custom Wizards will be the topic of a future article.
Beginning with Easy VTML Now let's jump into some practical examples of VTML, since this article aims to be an example-based tutorial. The easiest (and also fastest) way to enhance your custom tags with VTML is to use the visual Tag Definitions Editor. As you can see from Figure 4, the visual VTML editor for the Tag Insight can be called from the Resource Tab's Tag Inspector (click on the red-marked icon representing a gear). All you've got to do in the VTML editor to generate a Tag Insight for your custom tag is the following:
- Click on the "Add Tag..." button and enter the custom tag's name
- Click the "Add..." button on the right tab to add attributes to your custom tag
- Define the type of each attribute by choosing the appropriate type from the "Edit Type" drop-down listbox:
- Text: For attributes taking strings as their value
- Enumerated: For attributes taking one value out of a list of pre- defined values
- Color: For attributes representing a color value
- Font: For attributes representing a font definition
- FileName: For attributes holding a file name
- FilePath: For attributes holding a file path
- Directory: For attributes holding a directory name
- RelativePath: For attributes holding a relative path
- Style: For attributes holding a stylesheet definition
- Flag: For attributes acting as flags without having values
- Queryname: For ColdFusion recordsets
- Expression: For a ColdFusion expression
- Optionally, you can add categories to organize your attributes into different types (for example, mandatory and optional) under the Attribute Categories tab.
-
The logical grouping of attributes into categories is outlined in the Tag Inspector when you've selected a tag (see the left-sided attribute list in Figure 1).
- To add documentation to your tag simply enter a filename of an HTML file that documents your tag at the Documentation tab of the Tag Definitions Editor.
- Finally, click the "Done" button and restart ColdFusion Studio to let the changes take effect.
- Open a new template and start typing your custom tag. Voilà! Tag Insight is working for your tag.
Providing Help Files
VTML Syntax
<ATTRIBCATEGORIES>
<EDITORLAYOUT>
<TAGLAYOUT>
Part 2 of this article will cover TagEditor dialogs. Meanwhile, you should work with the VTML you've seen in this article in order to get a feeling for how this customization of CF Studio helps developers.
To provide your custom tags with the help feature (every CFML tag has a help feature - press F1 when the cursor is selecting a tag), just write the docs in a simple HTML file and name it like your Custom Tag. For example, if your custom tag is
Now let's look at how it was done by analyzing the results that were automatically generated for you. An outlined VTML file has the following structure:
<TAG>
<ATTRIBUTES>
The Tag Definitions Editor helps us by generating the <ATTRIBUTES>, <ATTRIBCATEGORIES>, and <TAG-DESCRIPTION> sections, which is enough to provide your custom tags with Tag Inspector, Tag Help, and Tag Insight features inside Studio. However, if you wish to have Tag Editor dialogs working for your custom tags you'll have to dig a little deeper into the VTML syntax and code the user interface of the dialogs by hand. You might think it sounds difficult, but it'll be much easier than you might expect.
... Defines tag attribute properties and behavior
</ATTRIBUTES>
... Defines logical grouping for tag attributes
</ATTRIBCATEGORIES>
... Defines the layout of a tag editor
</EDITORLAYOUT>
... Defines the tag generation template
</TAGLAYOUT>
<TAGDESCRIPTION>
... HTML-based documentation for the tag
</TAGDESCRIPTION>
</TAG>
Published June 7, 2001 Reads 6,970
Copyright © 2001 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Christian Schneider
Christian Schneider is an Allaire Certified ColdFusion and Web site developer. He has over four years of intensive experience developing CF-based intranet applications for banks and logistic corporations.
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Adobe Cans Another 9% of its Workforce
- Moyea DVD4Web Converter V2.0 Converts DVD to FLV Fast and Synchronously with Watermarks
- Adobe Fiddles with its Web Apps
- Adobe & Salesforce Cut Cloud Deal
- Hosting.com Launches ColdFusion 9 in the Cloud
- The Real Time Infrastructure Ultimatum
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Microsoft Expression Web Has Got Game
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Bruce Chizen Joins Voyager Capital as Venture Partner
- My Top Seven Wishes From Adobe MAX 2009
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- The Asynchronous CFML Gateway
- Web Services Using ColdFusion and Apache CXF
























