a query-based code browser

 
Home
Download
Papers
Screen Shots
Contact
 

Advanced Features

< ^ >

This section describes the more advanced features of JQuery.


Using external rules files

You can create your own TyRuBa predicates and rules and use them in JQuery. Rules allow you to simplify complicated queries by hiding the query behing a single rule and can be recursive in nature, allowing you to write queries that would not be possible simply by using the query editor.

Rules are contained in .rub files. .Rub files are just plain text files with a .rub extension, so they can be edited by using any text editor you like. Once you write a rules file, you can share it with other JQuery users by sending it to them and having them load it into their JQuery instance. To see how to write rules, see Example 3 - Writing Rules.

JQuery maintains two sets of rules files: one that is global for all of JQuery which contains the built-in queries and menu items, and another that is local to the current query tab. To manage the rules files:

  1. Either select Manage Rules Files -> Working Set Rules files... or Manage Rules Files -> Global Rules files... from the drop-down menu () depending on whether you want to modify the global or local rules files.

    The rules file manager dialog will appear.

  2. Manage the rules files as follows:

    • Add... - Brings up a file chooser so that you can choose a .rub file to add.

    • Remove - Remove the selected rules file.

    • Move Up and Move Down - Change the order in which the rules files are loaded. This can be important if one rules file uses the predicates or rules defined in another rules file.

  3. Click OK to finish managing the rules files.

NOTE: If you find that you've removed an important rules file from the global rules files and forget what the file was, you can restore the original state of the global rules by selecting Manage Rules Files -> Restore Default Global Rules File. This does not restore the actual content of the files, just the list of files that are loaded by JQuery. If you make changes to any of the core JQuery rules files, make sure you back them up first.

Reloading rules files

When you modify a rules file (or change the rules files that are loaded by JQuery), JQuery does not automatically reload the rules files. You must manually do this. To reload the rules files:

  • For the current query tab:

    1. Click on the icon or select Reload Working Set's Rules from the drop-down menu ().

    2. Right-click in the tree subtab of the query tab to reload the rules.

  • For all query tabs:

    1. Select Reload All Set's Rules from the drop-down menu ().

    2. Right-click in the tree subtab of the query tab to reload the rules.

 

< ^ >