-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocompletion of scan directories and apply available recipes #261
Autocompletion of scan directories and apply available recipes #261
Conversation
Needs a slash |
public List<CompletionProposal> complete(CompletionContext completionContext) { | ||
ProjectContext projectContext = projectContextHolder.getProjectContext(); | ||
List<Recipe> applicableRecipes = applicableRecipeListCommand.execute(projectContext); | ||
return applicableRecipes.stream().map(Recipe::getName).map(CompletionProposal::new).toList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured this one is so simple and duplicates parts of ApplyShellCommand.apply
, that it does not warrant it's own unit test.
Hi @timtebeek, I like the auto-completion. For path auto-completion, I think we could improve the handling a bit to make it easier to use. |
Fixes #128.
Tested locally through:
cd spring-boot-migrator/applications/spring-shell/
mvn package -DskipTests
java -jar target/spring-boot-migrator.jar
scan <tab> ../../../ <tab>
apply <tab> <tab>
That should provide you with auto complete examples located next to
spring-boot-migrator
.Followed by autocompletion of available recipes.