Avoid disorientation with Ferret, a powerful search tool for the Eclipse IDE

Ferret is a conceptually simple software exploration tool that seeks to summarize how a program element relates to the rest of the software system. Ferret was motivated by research into how and why programmers become lost or disoriented during software development activities. Two contributing factors include losing the context of how the programmer came to examine an element, and managing the mental workload required to combine the results of IDE searches to answer the questions that the programmer really wants to answer.

Ferret is implemented as a single view (below) that presents a densely-packed set of answers to dozens of questions about some element. On selecting some element in the UI (shown in label 1), Ferret starts digging. The questions (label 2) are grouped by type (label 3) as to whether they relate to questions about where or how an element is declared, to inheritance, or relationships between classes or within a class. Ferret includes the number of answers found (label 4); questions with no answers are hidden by default. Ferret supports drilling down into the answers by clustering along different attributes (label 4).In the example below, the instantiators of a type, which includes instantiators of subtypes, have been clustered by the subtype instantiated (label 6).

Ferret understands that software systems are more than just Java files, and supports bridging program elements across other sources of information such as type references in XML and plain-text manifests, method references in dynamic traces, revision history, and more. As these equivalences may not be 1–1 or onto, Ferret captures and propagates the fidelity of the equivalence (label 7).

Results may be clustered by common attributes, such as by the defining package or project, or using the Eclipse package naming conventions to separate API types from internal types. Irrelevant questions or answers may be removed from the view.

As answers may spawn further questions, Ferret supports cascading queries in-place. In the following example, I wished to examine the instantiators of an EGitCredentialsProvider. I discovered that it was created in a method on an activator and wanted to confirm that the method was called as part of the bundle activation. Cascading queries can save having to jump between files, and preserves the context of the trail that I was investigating.

One word of caution: Ferret can bite off more than it can chew, such as might happen when set on java.lang.String or some other widely-used type. In such circumstances, simply closing the Ferret view should allow it to recover; you can also use the “Stop” button in the Progress view.

Disorientation isn’t unique to software development, and understanding the causes and mitigating factors is essential to applications that help people make sense of complex domains. If you're coming to EclipseCon Europe, come to my talk (Wednesday, October 25 at 11:15) where I will talk about Ferret and dive into disorientation and its causes. The Ferret README links to research papers describing the approach in more depth and with pointers to related research.

Ferret is open source and licensed under the EPL. The source is available on GitHub, and prebuilt binaries can be installed via the Eclipse Marketplace.

About the Author