User Tools

Site Tools


tutorial:command_suggestions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:command_suggestions [2021/09/17 04:49] – external edit 127.0.0.1tutorial:command_suggestions [2022/09/04 07:06] – grammar solidblock
Line 8: Line 8:
  
 A ''SuggestionProvider'' is used to make a list of suggestions that will be sent to the client. A suggestion provider is a functional interface that takes a ''CommandContext'' and a ''SuggestionBuilder'' and returns some ''Suggestions''. The ''SuggestionProvider'' returns a [[https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/util/concurrent/CompletableFuture.html|CompletableFuture]] as the suggestions may not be available immediately. A ''SuggestionProvider'' is used to make a list of suggestions that will be sent to the client. A suggestion provider is a functional interface that takes a ''CommandContext'' and a ''SuggestionBuilder'' and returns some ''Suggestions''. The ''SuggestionProvider'' returns a [[https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/util/concurrent/CompletableFuture.html|CompletableFuture]] as the suggestions may not be available immediately.
- 
  
 Suggestions can be contextual since a suggestion provider gives you access to the current command context. Suggestions can be contextual since a suggestion provider gives you access to the current command context.
Line 14: Line 13:
 ===== An example suggestion provider ===== ===== An example suggestion provider =====
  
-For example lets say you want to suggest all attributes an entity could have.+For example let'say you want to suggest all attributes an entity could have.
  
 <code java [enable_line_numbers="true", highlight_lines_extra="4"]> <code java [enable_line_numbers="true", highlight_lines_extra="4"]>
tutorial/command_suggestions.txt · Last modified: 2023/11/18 12:06 by solidblock