Class HelpCoordinator<S extends Source>
java.lang.Object
studio.mevera.imperat.command.tree.help.HelpCoordinator<S>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends Source>
HelpCoordinator<S>create()A factory method to create a new HelpCoordinator with default settings.static <S extends Source>
HelpCoordinator<S>create(TreeHelpVisitor<S> provider, HelpLayoutRenderer<S, ?> renderer) A factory method to create a new HelpCoordinator with custom settings.<C> voidDisplays the help documentation based on the given context and query.
-
Method Details
-
create
public static <S extends Source> HelpCoordinator<S> create(TreeHelpVisitor<S> provider, HelpLayoutRenderer<S, ?> renderer) A factory method to create a new HelpCoordinator with custom settings.- Type Parameters:
S- The type of theSource.- Parameters:
provider- The provider responsible for fetching help entries.renderer- The renderer responsible for displaying help entries.- Returns:
- A new instance of
HelpCoordinator.
-
create
A factory method to create a new HelpCoordinator with default settings.- Type Parameters:
S- The type of theSource.- Returns:
- A new instance of
HelpCoordinatorwith default provider and renderer.
-
showHelp
Displays the help documentation based on the given context and query.This method fetches the relevant help entries, then uses the configured renderer to display the information to the source.
- Parameters:
context- The execution context of the command.query- The help query, specifying what help information is needed.theme- The theme that controls how the help is displayed.
-