Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Recommenders/ExtDoc/Architecture
Contents
Plug-ins / Bundles
commons.extdoc | Mostly interface that are shared among multiple ExtDoc plug-ins. |
commons.selection | Listens for different types of user interaction with the IDE and reports Java element selections and corresponding Eclipse and Java contexts (editor, compilation unit, ...). |
rcp.extdoc | Listens for selection changes, requests corresponding information from registered providers and controls the display in views and pop-ups. Also, it provides user preference pages, as well as common features such as community feedback widgets. |
rcp.extdoc.providers | Providers create composites of selection-relevant information, which are then displayed by the rcp.extdoc plug-in. |
server.extdoc | Contains interfaces to further software, such as databases, as well as the data types carrying the external/database information, such as the comments class. |
server.extdoc.proxy | Serves as a proxy for CouchDB by listening to a given port and forwarding a limited set of requests to a CouchDB instance. |
Java Element Selections
- Client plug-ins register through an extension point.
- A general ISelectionListener is registered with the workbench and listens for all selections, except those in JavaEditors.
- An IPartListener recognizes newly created JavaEditors and, for each, registers a ISelectionChangedListener which listens for new cursor positions.
- On each selection change, an IJavaElementSelection is created, which contains the IJavaElement, element location, editor offset, CU, ASTNode and the editor (most of those only if the selection occurred within an editor).
- The IJavaElementSelection is communicated to each extension.
ExtDoc Client
General Architecture
- The ProviderStore contains all providers which are registered trough an extension point. Also, order priorities are stored.
- The UiManager is a client to the selections service. On incoming selections, it notifies the view (when visible). Also, the manager is informed when new editors are created and registers the ExtDocCodeAssistantHover on such events.
Provider Composite
- Scrollable SWT composite, which holds all single providers in a grid layout and contains a title bar displaying the current Java element.
- On creation, each provider is asked to return his top composite. On updates, this composite is "given back" to the provider so he can update certain aspects, e.g., a text, instead of having to create a new composite on each selection change.
Update Procedure
- ...
Abstract Providers
- The AbstractProvider just delivers basic information such as the name and the icon.
- The
View
...
Element & Completion Hovers
...
Community Feedback
...
Providers
...
Server
...
CouchDB Proxy
...