Document Navigator View
This view is the main one. It allows the user to search through the documents indexed in Solr. Results are shown by taking advantage of a tree view in eclipse. This kind of navigator works together with the Document View such that the user can focus on specific part of a post (e.g. Question or Answer) or snippet of code. Whenever the user highlights a node in the tree, the Document View is updated with the node's content.
Another functionality provided by that view is the possibility of creating annotations and importing code snippets. The tree view allows to drag out some types of nodes (Document root and code snippets) and drop down in a text editor. For example, if we take in consideration the results shown in the image above, an user can drag the document When would it be worth using RegEx in Java? in the editor and Seahawk will first ask for a commment as shown in the image below:
If the Add is pressed, Seahawk will create a new annotation in the code like the following:
/*! * @documentId http://stackoverflow.com/questions/4125377 * @title When would it be worth using RegEx in Java? * @comment * @author Seahawk * @creationTime 2012.04.28 19:00:17.960 CEST */
This view shows, of course, the content of a document or a document's node. As explained for the previous view, the content shown in the Document View is updated whenever a node or a document in the Document Navigator View or in the Suggested Documents View is selected. Moreover, the view allows to navigate as a web browser does in order to follow links an user can find in the post.
Suggested Documents View
Last but not least, the Suggested Documents View. This view recalls the Document Navigator View since it implements the same navigations capabilities and it interacts with the Document View as well. However, drag and drop capabilities are forbidden for that view. The goal of this view is to show the documents already bookmarked in the code in form of annotations. As we can see from the image above, is a document is not retrievable, the view highlights that by adding a
[Not Available] in front of the title and, of course, by making it not navigable.
Automatic Query Functionalities
Seahawk allows to automatically generate query from Java entities. Differently from the other features, this kind of functionality applies just for the Java programming language. The developer is provided with an additional entry in the contextual menu: Ask Seahawk.... The contextual menu can be invoked from the Package Explorer, the editor's outline view and from the code editor itself. Moreover, the user is provided with an additional shortcut to access and bring the Document Navigator View on focus. When the user presses Ctrl+U, Seahawk extracts keywords from the entity in which the cursor in currently placed on in the editor, pushes them in the search box and allows the user to add additional information to the query before performing it.
The different ways in which Sehawk can be invoked allows the user to invoke it on a specific entity (e.g. the entity in which the user is writing code) or to select a set of Java entities (e.g. packages, classes, methods) from which extract a set of keyword to perform a query with.