ColdFusion Builder Extensions allow you to add filters to menu contributions . With this you can control what menus are visible/hidden when the context menu is displayed.
Filter’s can be used for menu contributions to navigator and outline view.
Adding Filters to Menus:
For Navigator you may want to use filter to control menu contributions appearing when user tight clicks a project|folder|file or a file with given name or extension.
For ex. following menu will appear only when user right clicks a project
<menu name="Deploy">
<filters>
<filter type="project" />
<filters>
</menu>
and following menu will appear only when user right clicks a file with name “modelGlue.xml”
<menu name="Validate Config File">
<filters>
<filter type="file" pattern="modelGlue.xml" />
<filters>
</menu>
For outline view you can control for which nodes menu contribution can appear.
For Ex. Following menu will only appear when user clicks on node named “Events” in outline view.
<menu name="Add Event">
<filters>
<filter type="Events" />
</filters>
</menu>
Adding filters for Menu Actions:
Sometimes you may want to show the Menu every time, but may want to hide/show menu actions based on what user has clicked on. This can be achieved by adding filters at action level and not at menu level. So menu will appear all time but, display of individual menu items will be controlled by filters applied on menu action. Here’s an example
<menu name="ModelGlue Assistant">
<action name="Add Controller" handlerid="handler1" >
<filters>
<filter type="controllers" /> <!-- action appears only when user right clicks controllers node -->
</filters>
</action>
<action name="Add Message Listener" handlerid="handler2" >
<filters>
<filter type="controller" /> <!-- action appears only when user right clicks controller node -->
</filters>
</action>
<action name="Remove" handlerid="eventhandler" /> <!-- action appears for all nodes -->
</menu>
Here are the Screen shots for above code-
Above images show the working Action Filters. Here Menu and remove action appear at all places but other actions are controlled by filters.

