Tiny UI tweaks around OR upgrades and recipes reload
This commit is contained in:
@@ -36,7 +36,7 @@ public class SpringQuickAccessProvider implements IQuickAccessComputer, IQuickAc
|
||||
|
||||
final private QuickAccessElement reloadRecipesAction = createForNoArgsLsCommand(
|
||||
"sts/rewrite/reload",
|
||||
"Reload OpenRewrite Recipes, Code Actions, Problem and Quick Fix Descriptors",
|
||||
"Reload OpenRewrite Recipes",
|
||||
"Failed to reload OpenRewrite Recipes!"
|
||||
);
|
||||
|
||||
|
||||
@@ -82,7 +82,10 @@ const ROOT_RECIPES_BUTTON: VSCode.QuickInputButton = {
|
||||
iconPath: new VSCode.ThemeIcon('home'),
|
||||
tooltip: 'Root Recipes'
|
||||
}
|
||||
|
||||
const PARENT_RECIPE_BUTTON: VSCode.QuickInputButton = {
|
||||
iconPath: new VSCode.ThemeIcon('arrow-up'),
|
||||
tooltip: 'Parent Recipe'
|
||||
}
|
||||
const SUB_RECIPES_BUTTON: VSCode.QuickInputButton = {
|
||||
iconPath: new VSCode.ThemeIcon('type-hierarchy'),
|
||||
tooltip: 'Sub-Recipes'
|
||||
@@ -150,7 +153,7 @@ function showCurrentPathQuickPick(itemsPromise: Thenable<RecipeQuickPickItem[]>,
|
||||
});
|
||||
quickPick.items = currentItems;
|
||||
if (itemsPath.length) {
|
||||
quickPick.buttons = [ ROOT_RECIPES_BUTTON ];
|
||||
quickPick.buttons = [ PARENT_RECIPE_BUTTON, ROOT_RECIPES_BUTTON ];
|
||||
}
|
||||
quickPick.selectedItems = currentItems.filter(i => i.selected);
|
||||
quickPick.onDidTriggerItemButton(e => {
|
||||
@@ -165,6 +168,10 @@ function showCurrentPathQuickPick(itemsPromise: Thenable<RecipeQuickPickItem[]>,
|
||||
currentItems.forEach(i => i.selected = quickPick.selectedItems.includes(i));
|
||||
itemsPath.splice(0, itemsPath.length);
|
||||
showCurrentPathQuickPick(Promise.resolve(items), itemsPath).then(resolve, reject);
|
||||
} else if (b === PARENT_RECIPE_BUTTON) {
|
||||
currentItems.forEach(i => i.selected = quickPick.selectedItems.includes(i));
|
||||
itemsPath.pop();
|
||||
showCurrentPathQuickPick(Promise.resolve(items), itemsPath).then(resolve, reject);
|
||||
}
|
||||
});
|
||||
quickPick.onDidAccept(() => {
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
},
|
||||
{
|
||||
"command": "vscode-spring-boot.rewrite.reload",
|
||||
"title": "Reload OpenRewrite Recipes, Code Actions, Problem and Quick Fix Descriptors",
|
||||
"title": "Reload OpenRewrite Recipes",
|
||||
"category": "Spring Boot"
|
||||
},
|
||||
{
|
||||
@@ -264,7 +264,7 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "JAR and YAML files to scan for recipes, code actions, problem and quick fix descriptors"
|
||||
"description": "JAR and YAML files to scan for recipes"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user