Getting Started with Ferret
Ferret is an automatic tool, meaning that, once started,
it responds automatically to your interactions with the Eclipse
environment. For example, selecting an item from the Outline
view causes Ferret to begin ferreting through the system to answer
a set of queries for that particular item. The results of the
queries are then listed in the Ferret view using an
Eclipse tree view.
Ferret can also be explicitly invoked for items using:
- the keyboard shortcut F9, or
- through selecting the Query with Ferret from
pop-up context menus, or
- through Navigate → Query with Ferret.
These forms of invocation are useful for issuing queries on text
such as from a text editor.
Configuration Jump Start
Ferret is only operational once the Ferret view has been opened.
This view can either be manually opened using Window → Show
View, or selecting Query with Ferret from an object's
context menu as described above.
Ferret first requires some simple configuration to describe its
query parameters before it can begin querying. This is accomplished
using the Ferret Sphere Configuration Wizard which will
pop-up on the first query, or which can be explicitly invoked
using the Configure Spheres... from the Ferret view's view
menu (). The configuration process is described
in more detail elsewhere, but for now,
simply select (1) the Java static program queries and
(2) click on Finish.
With such a configuration, Ferret performs like a normal Java
search tool.
Ferret Walk Through
Let's take a closer look at the Ferret view. This view displays
the results of a set of queries applicable to the query elements.
This image highlights four parts:
- This area displays a textual description of the current query element
(or elements). This example features queries for the Java class
EmpiricalFormula.
- The Clustering/Fidelity column provides information
about the clusterings of the results
of a query. In this example, the results of instantiators
has already been clustered by the declaring package of the
results.
- We can see the two clusters based on the declared package of the
query results. The cluster
org.manumission.chem
can still be clustered in three different ways.
- The Clustering/Fidelity column also indicates the
fidelity of the result to the
original query element(s).
The Ferret Toolbar
The Ferret toolbar features five command buttons.
- :
this toggle button supresses Ferret's automatic querying.
Queries may still be made explicitly using the keyboard shortcut
F9 or through the menus.
- : expand all
top-level queries by one level.
- : collapse the
tree to show only the top-level queries.
- :
re-open original query element, or select from previously queried-for
elements. This button is useful for returning to the start after some
exploration. If there are multiple elements,
then you will be prompted which parent to open.
- : a useful shortcut to open the containing
element of the current query element. If there are multiple elements,
then you will be prompted which parent to open.
The Ferret Query Results
The Ferret view is made up of four columns:
- Description
- A description of the element.
- Category
- Queries are grouped by category.
- #E
- The total number of elements for either the query or the current
cluster.
- Clustering/Fidelity
- The currently selected clustering, or the number of possible
clusterings.
For query results, this column displays the
fidelity of the result.
When items correspond to elements in the workbench, they can
opened by either double-clicking or using the Open
from the item's context menu. The context menu can be used to
open the item's container or querying on the item's container (when
found), and other operations (when supported).
The results of a query can also serve as the context for further
queries, displayed in the context of the tree.
Queries are sorted by their category. There are currently four
query categories:
- declarations
- Queries about relations involving the declarations of elements.
- inter-class
- Queries about relations between different classes.
- intra-class
- Queries about relations within a class.
- hierarchical
- Queries about relations involving type inheritance.