Justus SmartGrep parses all the statements of a set of programs and creates and index that can be used to search files based on the statements read. Generic search utilities only search lines in files but most ABL statements are usually written using more than one line, so you ability to find what you're looking for is limited. Also, SmartGrep can recognize different types of statements (FOR, ASSIGN, FIND, CREATE, etc.) so you can search only through the desired types.
To start Justus coverage you have to run:
justus smartgrep |
Be sure you have $JUSTUS_HOME/bin on your path.
To create a new Source Code Index you have to click File -> New... and inform the location of the new database. If you type the location of an existing database all the information will be updated with the new entries found by this new processing. However, you have in the old database information about source files not found in the new path, they won't be removed from the database.
You can add as many source directories you wish. SmartGrep will recursively search through the directories looking for files with the specified extensions (.p, .w. .i and .cls), parse and add them to the database.
If you have previously created a database and want to search for files you just go to File -> Open... and inform the database's location. Notice that the database is a folder in your Operating System.
Once you have created or opened a database you'll be able to search for files in it.
Just like google or other search engines, SmartGrep uses words as a query string to search the database. Just type the words you want to locate and SmartGrep will find all the source files whose statements contain the words informed.
You can combine these words with operators like AND and OR to make your query smarter and find only the information you need. SmartGrep uses Lucene Search Engine to process queries. Check Lucene' documentation to have more information about how to create queries.
if you need help to create your queries you can click on the Advanced link (near the Search Button) to create it The Advanced Search window allow you to specify the words/expression you want or don' want, as well the types of statements (Find, For, If, etc.) that should be considered valid.