ColdFusion Builder 2 (codenamed 'Storm') the next version of ColdFusion Builder is now public beta and it comes packed with several new features. One of the highlights of this release is the ColdFusion specific Search and Replace feature; CFB is an Eclipse based IDE and the search\replace functionality provided in the 1.0 version of the product (codenamed 'Bolt') used the Eclipse's search and replace functionality. Storm now comes with a separate engine for Search and Replace.
One can search not only for text but also tags based on the conditions that you specify. The search scope is now widened and users can search over various scopes such as Open documents, Projects, Workingset, Workspace, Local directory, Selected Resources and over any of your FTP\RDS connections. And that's not it, you can also perform certain actions on the matches found. In this post I'll be providing an overview and will try to deliver more complex scenarios in the coming posts.
The Search dialog:
The search dialog shown above looks very compact and is packed with features. The scope combo box lists various scopes across which search can be performed, by default the 'Current Document' will be set as the scope. The search combo box lists two options Text and Tag. There is text box for entering the string that you would like to search and a text box to replace the matching string. Also, as noted from the above screenshot there are various options provided to perform search. However, you get more options when you switch to other scopes or when you switch to Tag search.
When the search scope is changed to Tag search, the ColdFusion search dialog box changes its layout to provide various options which are relevant to the tag you search. After selecting the tag from the list ('Choose Tag'), there are various conditions that the user can select and add to the list.
There are various conditions that you can specify to search for tags. Conditions such as With attribute, Without attribute, Containing (Tag\Text), and Not containing (Tag\Text).
When the condition 'With attribute' is selected the dialog box also provides attribute matching conditions 'is\is not\containing\does not contain\starts with\ends with'. User can provide the attribute name and the value for the same. If no conditions are added to the list then the file would be searched for the mentioned tag.
When Without attribute is selected an attribute list is shown and this will match all the tags which do not contain the specified attribute.
Users can now search tags that contain the specified Tag\Text. An example would be to search for cffunction tags that contain cfargument tags.
Not Containing Tag\Text:
Similar to containing; the Not containing condition would select those tags which do not contain the specified text\tag.
Users can specify multiple conditions for tag search. By specifying Any of the conditions an 'OR' operation would be performed by the tag search engine; meaning that if any of the tags match any of the conditions then it would be returned. Similarly with 'All of the conditions' an 'AND' operation would be performed and only the tags matching all of the conditions would be returned.
The Action section lists everything that you can do with the tag searched and found. Apart from Replace\Remove the tag block you can perform various other actions such as Add Text Before\After the tag block and Set\Remove the attribute.
I will be explaining more about Actions in my next blog post.