days
-1
-9
hours
0
-1
minutes
-1
-5
seconds
-3
-4
search
Let's go exploring!

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

Brian de Alwis
Eclipse
© Shutterstock / Sadovski

Discover Ferret, a conceptually simple software exploration tool that seeks to summarize how a program element relates to the rest of the software system. In this article, Brian de Alwis goes over Ferret and explains how this tool can help developers explore their codebases.

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

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.

Ferret

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.

Ferret

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.  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.

 

eclipseorb_color

This post was originally published in the October 2017 issue of the Eclipse Newsletter: Utility Belt: Projects and Tools

For more information and articles check out the Eclipse Newsletter.

Author

Brian de Alwis

Brian de Alwis is the founder of Manumitting Technologies, and the creator of the new project and task planning tool called Kizby. He’s a committer on the Eclipse e4 project and on the Platform UI component of the Eclipse Platform. Follow him on Twitter @delaweeza.


Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of