import * as vscode from "vscode" ; import { mavenExplorerProvider } from "../mavenExplorerProvider" ; import { ITreeItem } from "./ITreeItem" ; import { MavenPlugin } from "./MavenPlugin" ; import { MavenProject } from "./MavenProject" ; import { Menu } from "./Menu" ; export class PluginsMenu extends Menu implements ITreeItem { constructor ( project ) { super ( project ) ; this . name = "Plugins" ; } public async getChildren ( ) { await this . project . getEffectivePom ( ) ; return this . project . plugins ; } public getTreeItem ( ) { const treeItem = new vscode . TreeItem ( this . name , vscode . TreeItemCollapsibleState . Collapsed ) ; treeItem . iconPath = new vscode . ThemeIcon ( "extensions" ) ; return treeItem ; } public async refresh ( ) { this . project . refreshEffectivePom ( ) . catch ( console . error ) ; mavenExplorerProvider . refresh ( this ) ; } }