-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also fix displaying critical issues.
- Loading branch information
Showing
58 changed files
with
1,916 additions
and
255 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import * as vscode from 'vscode'; | ||
import { ExtensionComponent } from '../extensionComponent'; | ||
import { TreesManager } from '../treeDataProviders/treesManager'; | ||
import { BuildGeneralInfo } from '../types/buildGeneralinfo'; | ||
import { DependenciesTreeNode } from '../treeDataProviders/dependenciesTree/dependenciesTreeNode'; | ||
import { GeneralInfo } from '../types/generalInfo'; | ||
|
||
/** | ||
* Manage the filters of the components tree. | ||
*/ | ||
export class BuildsManager implements ExtensionComponent { | ||
constructor(private _treesManager: TreesManager) {} | ||
|
||
public activate(context: vscode.ExtensionContext) { | ||
return this; | ||
} | ||
|
||
public async showBuildsMenu() { | ||
let buildsMap: Map<string, GeneralInfo> = this.getBuilds(); | ||
let choice: string | undefined = await vscode.window.showQuickPick(Array.from(buildsMap.keys()), <vscode.QuickPickOptions>{ | ||
placeHolder: 'Build Name', | ||
canPickMany: false | ||
}); | ||
if (!!choice) { | ||
const chosenBuild: BuildGeneralInfo | undefined = <BuildGeneralInfo>buildsMap.get(choice); | ||
if (!chosenBuild) { | ||
this._treesManager.logManager.logError(new Error('Failed choosing build'), false); | ||
return; | ||
} | ||
this._treesManager.buildsTreesProvider.loadBuild(chosenBuild, () => { | ||
this._treesManager.treeDataProviderManager.onChangeFire(); | ||
}); | ||
} | ||
} | ||
|
||
public getBuilds(): Map<string, GeneralInfo> { | ||
let buildsMap: Map<string, GeneralInfo> = new Map<string, BuildGeneralInfo>(); | ||
const buildsTree: DependenciesTreeNode = this._treesManager.buildsTreesProvider.allBuildsTree; | ||
if (!!buildsTree && !!buildsTree.children) { | ||
for (const build of buildsTree.children) { | ||
const gi: GeneralInfo = build.generalInfo; | ||
buildsMap.set(gi.artifactId + ':' + gi.version, gi); | ||
} | ||
} | ||
return buildsMap; | ||
} | ||
} |
Oops, something went wrong.