add inline action buttons for plugin goals (#396)
* add inline action buttons for plugin goals * remove comments Signed-off-by: Yan Zhang <yanzh@microsoft.com>
This commit is contained in:
Родитель
1028d2563e
Коммит
9bc009d342
11
package.json
11
package.json
|
@ -149,7 +149,11 @@
|
|||
{
|
||||
"command": "maven.plugin.execute",
|
||||
"title": "%contributes.commands.maven.plugin.execute%",
|
||||
"category": "Maven"
|
||||
"category": "Maven",
|
||||
"icon": {
|
||||
"light": "resources/icons/light/play.svg",
|
||||
"dark": "resources/icons/dark/play.svg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "maven.plugin.debug",
|
||||
|
@ -369,6 +373,11 @@
|
|||
"when": "view == mavenProjects && viewItem == MavenProject",
|
||||
"group": "0-pom@0"
|
||||
},
|
||||
{
|
||||
"command": "maven.plugin.execute",
|
||||
"when": "view == mavenProjects && viewItem == PluginGoal",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "maven.plugin.execute",
|
||||
"when": "view == mavenProjects && viewItem == PluginGoal",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"contributes.commands.maven.archetype.update": "Update Maven Archetype Catalog",
|
||||
"contributes.commands.maven.history": "History ...",
|
||||
"contributes.commands.maven.goal.execute": "Execute commands",
|
||||
"contributes.commands.maven.plugin.execute": "Execute",
|
||||
"contributes.commands.maven.plugin.execute": "Run",
|
||||
"contributes.commands.maven.plugin.debug": "Debug",
|
||||
"contributes.commands.maven.view.hierarchical": "Switch to hierarchical view",
|
||||
"contributes.commands.maven.view.flat": "Switch to flat view",
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 2V14.4805L12.9146 8.24024L4 2ZM11.1809 8.24024L4.995 12.5684V3.91209L11.1809 8.24024Z" fill="#C5C5C5"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 259 B |
|
@ -0,0 +1,3 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.80723 14.9754C2.57119 14.9721 2.33826 14.9211 2.12247 14.8254C1.90667 14.7297 1.71248 14.5913 1.55158 14.4186C1.2385 14.1334 1.04433 13.7408 1.00775 13.3189C0.966225 12.8828 1.09269 12.4473 1.36133 12.1013C2.56779 10.8289 4.9473 8.4494 6.67811 6.75479C6.30983 5.75887 6.32704 4.66127 6.72637 3.67739C7.05474 2.85876 7.63869 2.16805 8.39129 1.70807C8.9817 1.31706 9.66031 1.07944 10.3657 1.01673C11.0711 0.954022 11.7809 1.06819 12.4311 1.34892L13.0482 1.6162L10.1824 4.56738L11.4371 5.82582L14.3809 2.94887L14.6482 3.56788C14.8735 4.08976 14.993 4.65119 14.9997 5.21961C15.0064 5.78802 14.9002 6.35211 14.6872 6.87915C14.476 7.40029 14.1623 7.87368 13.7647 8.27122C13.5394 8.49169 13.2904 8.68653 13.0222 8.85218C12.4673 9.22275 11.8324 9.45636 11.1697 9.5338C10.5069 9.61124 9.83521 9.5303 9.20982 9.29764C8.11194 10.4113 5.37142 13.1704 3.89119 14.5522C3.59426 14.8219 3.20832 14.9726 2.80723 14.9754ZM10.7448 1.92802C10.087 1.92637 9.44359 2.12018 8.89614 2.48485C8.68265 2.6152 8.48437 2.76897 8.30498 2.9433C7.82789 3.42423 7.50926 4.03953 7.39182 4.70669C7.27437 5.37385 7.36374 6.06098 7.64792 6.67591L7.78342 6.97288L7.55048 7.20025C5.81224 8.89672 3.28146 11.4201 2.06479 12.7045C1.95646 12.8658 1.91012 13.0608 1.93435 13.2535C1.95857 13.4463 2.05171 13.6238 2.19657 13.7532C2.28005 13.8462 2.38177 13.9211 2.49541 13.9731C2.59557 14.0184 2.70383 14.043 2.81373 14.0455C2.98064 14.0413 3.14044 13.977 3.26383 13.8646C4.83687 12.3964 7.87622 9.32641 8.76807 8.42435L8.9973 8.19326L9.29242 8.32783C9.80618 8.56732 10.3731 8.66985 10.9382 8.62545C11.5033 8.58106 12.0473 8.39125 12.5174 8.07447C12.7313 7.9426 12.9296 7.78694 13.1085 7.61045C13.4183 7.30153 13.6631 6.93374 13.8286 6.52874C13.994 6.12375 14.0767 5.68974 14.0719 5.25228C14.0719 5.03662 14.0505 4.82148 14.0078 4.61007L11.4306 7.12508L8.87944 4.57759L11.3944 1.98834C11.1804 1.94674 10.9628 1.92653 10.7448 1.92802Z" fill="#C5C5C5"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -0,0 +1,3 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 2V14.4805L12.9146 8.24024L4 2ZM11.1809 8.24024L4.995 12.5684V3.91209L11.1809 8.24024Z" fill="#424242"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 259 B |
|
@ -0,0 +1,3 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.80723 14.9754C2.57119 14.9721 2.33826 14.9211 2.12247 14.8254C1.90667 14.7297 1.71248 14.5913 1.55158 14.4186C1.2385 14.1334 1.04433 13.7408 1.00775 13.3189C0.966225 12.8828 1.09269 12.4473 1.36133 12.1013C2.56779 10.8289 4.9473 8.4494 6.67811 6.75479C6.30983 5.75887 6.32704 4.66127 6.72637 3.67739C7.05474 2.85876 7.63869 2.16805 8.39129 1.70807C8.9817 1.31706 9.66031 1.07944 10.3657 1.01673C11.0711 0.954022 11.7809 1.06819 12.4311 1.34892L13.0482 1.6162L10.1824 4.56738L11.4371 5.82582L14.3809 2.94887L14.6482 3.56788C14.8735 4.08976 14.993 4.65119 14.9997 5.21961C15.0064 5.78802 14.9002 6.35211 14.6872 6.87915C14.476 7.40029 14.1623 7.87368 13.7647 8.27122C13.5394 8.49169 13.2904 8.68653 13.0222 8.85218C12.4673 9.22275 11.8324 9.45636 11.1697 9.5338C10.5069 9.61124 9.83521 9.5303 9.20982 9.29764C8.11194 10.4113 5.37142 13.1704 3.89119 14.5522C3.59426 14.8219 3.20832 14.9726 2.80723 14.9754ZM10.7448 1.92802C10.087 1.92637 9.44359 2.12018 8.89614 2.48485C8.68265 2.6152 8.48437 2.76897 8.30498 2.9433C7.82789 3.42423 7.50926 4.03953 7.39182 4.70669C7.27437 5.37385 7.36374 6.06098 7.64792 6.67591L7.78342 6.97288L7.55048 7.20025C5.81224 8.89672 3.28146 11.4201 2.06479 12.7045C1.95646 12.8658 1.91012 13.0608 1.93435 13.2535C1.95857 13.4463 2.05171 13.6238 2.19657 13.7532C2.28005 13.8462 2.38177 13.9211 2.49541 13.9731C2.59557 14.0184 2.70383 14.043 2.81373 14.0455C2.98064 14.0413 3.14044 13.977 3.26383 13.8646C4.83687 12.3964 7.87622 9.32641 8.76807 8.42435L8.9973 8.19326L9.29242 8.32783C9.80618 8.56732 10.3731 8.66985 10.9382 8.62545C11.5033 8.58106 12.0473 8.39125 12.5174 8.07447C12.7313 7.9426 12.9296 7.78694 13.1085 7.61045C13.4183 7.30153 13.6631 6.93374 13.8286 6.52874C13.994 6.12375 14.0767 5.68974 14.0719 5.25228C14.0719 5.03662 14.0505 4.82148 14.0078 4.61007L11.4306 7.12508L8.87944 4.57759L11.3944 1.98834C11.1804 1.94674 10.9628 1.92653 10.7448 1.92802Z" fill="#424242"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -3,7 +3,7 @@
|
|||
|
||||
import * as vscode from "vscode";
|
||||
import { taskExecutor } from "../../taskExecutor";
|
||||
// import { Utils } from "../../Utils";
|
||||
import { getPathToExtensionRoot } from "../../utils/contextUtils";
|
||||
import { mavenExplorerProvider } from "../mavenExplorerProvider";
|
||||
import { pluginInfoProvider } from "../pluginInfoProvider";
|
||||
import { ITreeItem } from "./ITreeItem";
|
||||
|
@ -35,13 +35,12 @@ export class MavenPlugin implements ITreeItem {
|
|||
|
||||
public async getTreeItem(): Promise<vscode.TreeItem> {
|
||||
const label: string = this.prefix ? `${this.prefix} (${this.pluginId})` : this.pluginId;
|
||||
return new vscode.TreeItem(label, vscode.TreeItemCollapsibleState.Collapsed);
|
||||
// const treeItem: vscode.TreeItem = new vscode.TreeItem(label, vscode.TreeItemCollapsibleState.Collapsed);
|
||||
// treeItem.iconPath = {
|
||||
// light: Utils.getResourcePath("light/plug.svg"),
|
||||
// dark: Utils.getResourcePath("dark/plug.svg")
|
||||
// };
|
||||
// return treeItem;
|
||||
const treeItem: vscode.TreeItem = new vscode.TreeItem(label, vscode.TreeItemCollapsibleState.Collapsed);
|
||||
treeItem.iconPath = {
|
||||
light: getPathToExtensionRoot("resources", "icons", "light", "property.svg"),
|
||||
dark: getPathToExtensionRoot("resources", "icons", "dark", "property.svg")
|
||||
};
|
||||
return treeItem;
|
||||
}
|
||||
|
||||
public async getChildren(): Promise<PluginGoal[]> {
|
||||
|
|
Загрузка…
Ссылка в новой задаче