org.springframework.shell.plugin.PromptProvider Java Examples

The following examples show how to use org.springframework.shell.plugin.PromptProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LensJLineShellComponent.java    From zeppelin with Apache License 2.0 5 votes vote down vote up
/**
 * get prompt text from provider. The provider has highest order
 * {@link org.springframework.core.Ordered#getOrder()} will win.
 * 
 * @return prompt text
 */
protected String getPromptText() {
  PromptProvider promptProvider = PluginUtils.getHighestPriorityProvider(this.applicationContext,
          PromptProvider.class);
  String providerPromptText = promptProvider.getPrompt();
  if (providerPromptText != null) {
    return providerPromptText;
  } else {
    return promptText;
  }
}