diff --git a/package.nls.json b/package.nls.json index ebf6e65..61ac14c 100644 --- a/package.nls.json +++ b/package.nls.json @@ -22,6 +22,7 @@ "Check syntax on load": "Check syntax on load", "Check syntax on save": "Check syntax on save", "Check syntax with KEL grammar (fast)": "Check syntax with KEL grammar (fast)", + "Choose Yes or No": "Choose Yes or No", "Clear all previously reported ECL Syntax Check results": "Clear all previously reported ECL Syntax Check results", "Client Tools Homepage": "Client Tools Homepage", "Completed": "Completed", @@ -39,6 +40,7 @@ "Default timeout (secs)": "Default timeout (secs)", "Delete Workunit": "Delete Workunit", "Digitally sign ECL file": "Digitally sign ECL file", + "Do not delete": "Do not delete", "Down": "Down", "ECL Client Tools Terminal": "ECL Client Tools Terminal", "ECL Watch": "ECL Watch", @@ -66,6 +68,7 @@ "Launch ECL Watch": "Launch ECL Watch", "Max result limit for workunit results": "Max result limit for workunit results", "My workunits": "My workunits", + "No": "No", "Open ECL": "Open ECL", "Open ECL Watch": "Open ECL Watch", "Open ECL Watch in external browser": "Open ECL Watch in external browser", @@ -136,5 +139,6 @@ "View ECL Markdown": "View ECL Markdown", "Waiting": "Waiting", "Write eclcc log file to specified file": "Write eclcc log file to specified file", + "Yes": "Yes", "eclcc syntax check arguments": "eclcc syntax check arguments" } \ No newline at end of file diff --git a/src/ecl/eclWatchTree.ts b/src/ecl/eclWatchTree.ts index 6e29cd3..8a17381 100644 --- a/src/ecl/eclWatchTree.ts +++ b/src/ecl/eclWatchTree.ts @@ -115,43 +115,43 @@ export class ECLWatchTree extends Tree { vscode.commands.registerCommand("hpccPlatform.setStateRunning", (wuNode: ECLWUNode) => { wuNode.setStateRunning(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateCompleted", (wuNode: ECLWUNode) => { wuNode.setStateCompleted(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateFailed", (wuNode: ECLWUNode) => { wuNode.setStateFailed(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateArchived", (wuNode: ECLWUNode) => { wuNode.setStateArchived(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateAborting", (wuNode: ECLWUNode) => { wuNode.setStateAborting(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateAborted", (wuNode: ECLWUNode) => { wuNode.setStateAborted(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateBlocked", (wuNode: ECLWUNode) => { wuNode.setStateBlocked(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateSubmitted", (wuNode: ECLWUNode) => { wuNode.setStateSubmitted(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateScheduled", (wuNode: ECLWUNode) => { wuNode.setStateScheduled(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateCompiling", (wuNode: ECLWUNode) => { wuNode.setStateCompiling(); }); - + vscode.commands.registerCommand("hpccPlatform.setStateWait", (wuNode: ECLWUNode) => { wuNode.setStateWait(); }); @@ -560,7 +560,15 @@ export class ECLWUNode extends Item { } delete() { - this._wu.delete().then(() => this._tree.refresh()); + const items: vscode.QuickPickItem[] = []; + items.push({ label: localize("Yes"), description: `${localize("Delete Workunit")} ${this._wu.Wuid}` }); + items.push({ label: localize("No"), description: localize("Do not delete") }); + + vscode.window.showQuickPick(items, { title: localize("Delete Workunit"), canPickMany: false, placeHolder: localize("Choose Yes or No") }).then(selection => { + if (!selection || selection.label == localize("No")) + return; + this._wu.delete().then(() => this._tree.refresh()); + }); } hasChildren() {