- User enters text and invokes autocompletion
- A list of candidate completion items is returned based on the word preceding the cursor position
- The user selects one of the completion items from the list of candidate completion items
- The word preceding the cursor postion is replaced based on the insertion text of the selected completion item
Activity Diagram
Below is the use case represented as an activity diagram.
The are actually two entry points in the sequence. The first part of the use case ends with completion items being displayed. The second part of the use case ends with the cursor word (word preceding the cursor position) with the completion item insertion text. Sequence Diagram
The sequence diagram, shown below, shows the interactions of the primary classes involved. This module provides the AutoCompletion
object as the public controller class and Document
and CompletionItemsDisplayer
as interfaces which should also be implemented by the client.