## 1.112.0
This commit is contained in:
parent
8ca13ac88a
commit
5269b0db43
5
type-script-helper/.vscode/settings.json
vendored
5
type-script-helper/.vscode/settings.json
vendored
@ -7,7 +7,10 @@
|
|||||||
"initialise",
|
"initialise",
|
||||||
"Kanban",
|
"Kanban",
|
||||||
"Phares",
|
"Phares",
|
||||||
"VSIX"
|
"signalr",
|
||||||
|
"VSIX",
|
||||||
|
"Weightest",
|
||||||
|
"WSJF"
|
||||||
],
|
],
|
||||||
"files.eol": "\n",
|
"files.eol": "\n",
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
|
@ -179,7 +179,7 @@ None
|
|||||||
- Removed
|
- Removed
|
||||||
- kanban.refreshBoth
|
- kanban.refreshBoth
|
||||||
- kanban.refreshSidebar
|
- kanban.refreshSidebar
|
||||||
- kanban.refreshWebView
|
- kanban.refreshWebview
|
||||||
- kanban.debugReload
|
- kanban.debugReload
|
||||||
- columns-to-cards-webview-view-provider-view
|
- columns-to-cards-webview-view-provider-view
|
||||||
|
|
||||||
@ -189,3 +189,8 @@ None
|
|||||||
-----------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- Changed trigger for code-insiders
|
- Changed trigger for code-insiders
|
||||||
|
|
||||||
|
## 1.112.0 1738349146299 = 638739459462990000 = 2025-0.Winter = Fri Jan 31 2025 11:45:45 GMT-0700 (Mountain Standard Time)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Added Cost of Delay (CoD)
|
||||||
|
20
type-script-helper/media/bootstrap.min.css
vendored
Normal file
20
type-script-helper/media/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
37
type-script-helper/media/cod.css
Normal file
37
type-script-helper/media/cod.css
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#HeaderGridDiv,
|
||||||
|
#DetailsGridDiv {
|
||||||
|
font-size: 12px;
|
||||||
|
min-width: 1200px;
|
||||||
|
max-width: 1200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#HeaderGrid {
|
||||||
|
font-family: monospace;
|
||||||
|
margin-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#HeaderGrid tr td {
|
||||||
|
max-width: 200px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#AllGrid {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
min-width: 1200px;
|
||||||
|
background-color: whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:nth-of-type(odd) {
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
#AllTextarea {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
#th-span {
|
||||||
|
margin-right: 500px;
|
||||||
|
}
|
50
type-script-helper/media/cost-of-delay.js
Normal file
50
type-script-helper/media/cost-of-delay.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
$(document).ready(function () {
|
||||||
|
const fromHtml = true;
|
||||||
|
const username = _webviewUsername;
|
||||||
|
const machineId = _webviewMachineId;
|
||||||
|
const windowLocationHRef = window.location.href + '?site=' + _webviewSite + 'view=' + _webviewView;
|
||||||
|
const baseUri = 'https://eaf-dev.mes.infineon.com';
|
||||||
|
const apiUrl = 'https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/';
|
||||||
|
const signalRUrl = baseUri + '/signalr';
|
||||||
|
const workItems = {
|
||||||
|
a: baseUri + '/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49',
|
||||||
|
b: baseUri + '/markdown/{[]}.json?v=2025-01-22-10-49'
|
||||||
|
};
|
||||||
|
const b = {
|
||||||
|
page: 'business',
|
||||||
|
description: 'Value',
|
||||||
|
th: 'Business Value',
|
||||||
|
span: 'What is the relative value to the Customer or business?<br>• Do our users prefer this over that?<br>• What is the revenue impact on our business?<br>• Is there a potential penalty or other negative effects if we delay?'
|
||||||
|
};
|
||||||
|
const r = {
|
||||||
|
page: 'risk',
|
||||||
|
description: 'Risk',
|
||||||
|
th: 'Risk Reduction and/or Opportunity Enablement',
|
||||||
|
span: 'What else does this do for our business?<br>• Reduce the risk of this or future delivery?<br>• Is there value in the information we will receive?<br>• Enable new business opportunities?'
|
||||||
|
};
|
||||||
|
const t = {
|
||||||
|
page: 'time',
|
||||||
|
description: 'Critical',
|
||||||
|
th: 'Time Criticality',
|
||||||
|
span: 'How does user/business value decay over time?<br>• Is there a fixed deadline?<br>• Will they wait for us or move to another Solution?<br>• What is the current effect on Customer satisfaction?'
|
||||||
|
};
|
||||||
|
const c = {
|
||||||
|
page: 'cod',
|
||||||
|
description: 'CoD',
|
||||||
|
th: 'Cost of Delay (CoD)',
|
||||||
|
span: "Cost of Delay (CoD) is the money lost by delaying or not doing a job for a specific time. It's a measure of the economic value of a job over time."
|
||||||
|
};
|
||||||
|
const e = {
|
||||||
|
page: 'effort',
|
||||||
|
description: 'Effort',
|
||||||
|
th: 'Effort',
|
||||||
|
span: 'Effort'
|
||||||
|
};
|
||||||
|
const w = {
|
||||||
|
page: 'wsjf',
|
||||||
|
description: 'WSJF',
|
||||||
|
th: 'Weightest Shortest Job First calculation (WSJF)',
|
||||||
|
span: 'Weightest Shortest Job First calculation (see @SCALE formula)'
|
||||||
|
};
|
||||||
|
initIndex(fromHtml, username, machineId, windowLocationHRef, workItems, b, r, t, c, e, w, apiUrl, signalRUrl);
|
||||||
|
});
|
4
type-script-helper/media/jquery-1.6.4.min.js
vendored
Normal file
4
type-script-helper/media/jquery-1.6.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9
type-script-helper/media/jquery.signalR-2.4.3.min.js
vendored
Normal file
9
type-script-helper/media/jquery.signalR-2.4.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -77,11 +77,51 @@
|
|||||||
"command": "kanban.openWithTextEditor",
|
"command": "kanban.openWithTextEditor",
|
||||||
"title": "Open with Text Editor Kanban"
|
"title": "Open with Text Editor Kanban"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"category": "Leominster",
|
||||||
|
"command": "webview.costOfDelayLeominster",
|
||||||
|
"title": "Cost of Delay (CoD)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"category": "Leominster",
|
||||||
|
"command": "webview.costOfDelayLiveLeominster",
|
||||||
|
"title": "Cost of Delay (CoD) - Live Update"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"category": "Leominster",
|
||||||
|
"command": "webview.costOfDelayEffortLeominster",
|
||||||
|
"title": "Effort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"category": "Leominster",
|
||||||
|
"command": "webview.costOfDelayWSJFLeominster",
|
||||||
|
"title": "Weightest Shortest Job First calculation (WSJF)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"category": "Markdown",
|
"category": "Markdown",
|
||||||
"command": "markdown.newMarkdownFile",
|
"command": "markdown.newMarkdownFile",
|
||||||
"title": "New Markdown File"
|
"title": "New Markdown File"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"category": "Mesa",
|
||||||
|
"command": "webview.costOfDelayMesa",
|
||||||
|
"title": "Cost of Delay (CoD)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"category": "Mesa",
|
||||||
|
"command": "webview.costOfDelayLiveMesa",
|
||||||
|
"title": "Cost of Delay (CoD) - Live Update"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"category": "Mesa",
|
||||||
|
"command": "webview.costOfDelayEffortMesa",
|
||||||
|
"title": "Effort"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"category": "Mesa",
|
||||||
|
"command": "webview.costOfDelayWSJFMesa",
|
||||||
|
"title": "Weightest Shortest Job First calculation (WSJF)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"category": "Quick Fix",
|
"category": "Quick Fix",
|
||||||
"command": "replaceLinesHelper.quickFixCamelCaseProperties",
|
"command": "replaceLinesHelper.quickFixCamelCaseProperties",
|
||||||
@ -188,9 +228,9 @@
|
|||||||
"title": "Wrap Sql for VB"
|
"title": "Wrap Sql for VB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"category": "WebView",
|
"category": "Webview",
|
||||||
"command": "webView.webView",
|
"command": "webview.example",
|
||||||
"title": "Web View"
|
"title": "Webview Example"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -235,5 +275,5 @@
|
|||||||
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
||||||
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
||||||
},
|
},
|
||||||
"version": "1.111.1"
|
"version": "1.112.0"
|
||||||
}
|
}
|
217
type-script-helper/src/WebviewPanelCostOfDelay.ts
Normal file
217
type-script-helper/src/WebviewPanelCostOfDelay.ts
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
import * as vscode from "vscode";
|
||||||
|
import { getNonce } from "./getNonce";
|
||||||
|
import { apiBaseUrl } from "./constants";
|
||||||
|
import { PostMessage } from "./PostMessage";
|
||||||
|
import { title } from "process";
|
||||||
|
|
||||||
|
export class WebviewPanelCostOfDelay {
|
||||||
|
/**
|
||||||
|
* Track the currently panel. Only allow a single panel to exist at a time.
|
||||||
|
*/
|
||||||
|
public static _site: string;
|
||||||
|
public static _view: string;
|
||||||
|
public static currentPanel: WebviewPanelCostOfDelay | undefined;
|
||||||
|
|
||||||
|
public static readonly viewType = "web-view-panel";
|
||||||
|
|
||||||
|
private _disposables: vscode.Disposable[] = [];
|
||||||
|
|
||||||
|
public static createOrShow(extensionContext: vscode.ExtensionContext, site: string, view: string) {
|
||||||
|
this._site = site;
|
||||||
|
this._view = view;
|
||||||
|
|
||||||
|
const column = vscode.window.activeTextEditor
|
||||||
|
? vscode.window.activeTextEditor.viewColumn
|
||||||
|
: undefined;
|
||||||
|
|
||||||
|
// If we already have a panel, show it.
|
||||||
|
if (WebviewPanelCostOfDelay.currentPanel) {
|
||||||
|
WebviewPanelCostOfDelay.currentPanel._panel.reveal(column);
|
||||||
|
WebviewPanelCostOfDelay.currentPanel._update(site, view);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const title = view === '' ? 'Cost of Delay (CoD)' :
|
||||||
|
view === 'EFFORT' ? 'Effort' :
|
||||||
|
view === 'LIVE' ? 'Cost of Delay (CoD) - Live Update' :
|
||||||
|
view === 'WSJF' ? 'Weightest Shortest Job First calculation (WSJF)' :
|
||||||
|
'CoD';
|
||||||
|
|
||||||
|
// Otherwise, create a new panel.
|
||||||
|
const panel = vscode.window.createWebviewPanel(
|
||||||
|
WebviewPanelCostOfDelay.viewType,
|
||||||
|
title,
|
||||||
|
column || vscode.ViewColumn.One,
|
||||||
|
{
|
||||||
|
// Enable javascript in the webview
|
||||||
|
enableScripts: true,
|
||||||
|
|
||||||
|
// And restrict the webview to only loading content from our extension's `media` directory.
|
||||||
|
localResourceRoots: [
|
||||||
|
vscode.Uri.joinPath(extensionContext.extensionUri, "media"),
|
||||||
|
vscode.Uri.joinPath(extensionContext.extensionUri, "out/compiled"),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
WebviewPanelCostOfDelay.currentPanel = new WebviewPanelCostOfDelay(panel, extensionContext, site, view);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static kill() {
|
||||||
|
WebviewPanelCostOfDelay.currentPanel?.dispose();
|
||||||
|
WebviewPanelCostOfDelay.currentPanel = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static revive(panel: vscode.WebviewPanel, extensionContext: vscode.ExtensionContext) {
|
||||||
|
WebviewPanelCostOfDelay.currentPanel = new WebviewPanelCostOfDelay(panel, extensionContext, this._site, this._view);
|
||||||
|
}
|
||||||
|
|
||||||
|
private constructor(private readonly _panel: vscode.WebviewPanel, private readonly _extensionContext: vscode.ExtensionContext, site: string, view: string) {
|
||||||
|
|
||||||
|
// Set the webview's initial html content
|
||||||
|
this._update(site, view);
|
||||||
|
|
||||||
|
// Listen for when the panel is disposed
|
||||||
|
// This happens when the user closes the panel or when the panel is closed programmatically
|
||||||
|
this._panel.onDidDispose(() => this.dispose(), null, this._disposables);
|
||||||
|
|
||||||
|
// // Handle messages from the webview
|
||||||
|
// this._panel.webview.onDidReceiveMessage(
|
||||||
|
// (message) => {
|
||||||
|
// switch (message.command) {
|
||||||
|
// case "alert":
|
||||||
|
// vscode.window.showErrorMessage(message.text);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// null,
|
||||||
|
// this._disposables
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
|
public dispose() {
|
||||||
|
WebviewPanelCostOfDelay.currentPanel = undefined;
|
||||||
|
|
||||||
|
// Clean up our resources
|
||||||
|
this._panel.dispose();
|
||||||
|
|
||||||
|
while (this._disposables.length) {
|
||||||
|
const x = this._disposables.pop();
|
||||||
|
if (x) {
|
||||||
|
x.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async _update(site: string, view: string) {
|
||||||
|
const webview = this._panel.webview;
|
||||||
|
|
||||||
|
this._panel.webview.html = this._getHtmlForWebview(site, view, webview);
|
||||||
|
webview.onDidReceiveMessage(async (postMessage: PostMessage) => {
|
||||||
|
switch (postMessage.type) {
|
||||||
|
case "on-info":
|
||||||
|
if (!postMessage.value)
|
||||||
|
return;
|
||||||
|
vscode.window.showInformationMessage(postMessage.value);
|
||||||
|
break;
|
||||||
|
case "on-error":
|
||||||
|
if (!postMessage.value)
|
||||||
|
return;
|
||||||
|
vscode.window.showErrorMessage(postMessage.value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
vscode.window.showErrorMessage(postMessage.type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private _getHtmlForWebview(site: string, view: string, webview: vscode.Webview) {
|
||||||
|
const baseUri = 'https://eaf-dev.mes.infineon.com';
|
||||||
|
|
||||||
|
const styleBootstrapUri = webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "bootstrap.min.css")
|
||||||
|
);
|
||||||
|
const styleCostOfDelayUri = webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "cod.css")
|
||||||
|
);
|
||||||
|
const scriptJQueryUri = webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "jquery-1.6.4.min.js")
|
||||||
|
);
|
||||||
|
const scriptSignalRUri = webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "jquery.signalR-2.4.3.min.js")
|
||||||
|
);
|
||||||
|
const scriptCostOfDelayUri = webview.asWebviewUri(
|
||||||
|
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "cost-of-delay.js")
|
||||||
|
);
|
||||||
|
|
||||||
|
// Use a nonce to only allow a specific script to be run.
|
||||||
|
const nonce = getNonce();
|
||||||
|
|
||||||
|
return `<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Infineon - Cost of Delay (CoD) (see @SCALE formula)</title>
|
||||||
|
<link href="${styleBootstrapUri}" rel="stylesheet" />
|
||||||
|
<link href="${styleCostOfDelayUri}" rel="stylesheet" />
|
||||||
|
<script nonce="${nonce}" src="${scriptJQueryUri}"></script>
|
||||||
|
<script nonce="${nonce}" src="${scriptSignalRUri}"></script>
|
||||||
|
<script nonce="${nonce}" src="${baseUri}/signalr/hubs"></script>
|
||||||
|
<script nonce="${nonce}" src="${baseUri}/js/cod-b.js?v=2025-01-22-10-49" type="text/javascript"></script>
|
||||||
|
<script nonce="${nonce}">
|
||||||
|
const _webviewSite = '${site}';
|
||||||
|
const _webviewView = '${view}';
|
||||||
|
const acquiredVsCodeApi = acquireVsCodeApi();
|
||||||
|
const apiBaseUrl = ${JSON.stringify(apiBaseUrl)}
|
||||||
|
const _webviewUsername = '${process.env.USERNAME}';
|
||||||
|
const _webviewMachineId = '${vscode.env.machineId}';
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="navbar navbar-fixed-top">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<span id="siteHeader"> </span> -
|
||||||
|
<span id="th-span"> </span>
|
||||||
|
<button id="toggle">Toggle</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="navbar-collapse collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
</ul>
|
||||||
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid body-content" style="margin-top: 40px; margin-left: 15px;">
|
||||||
|
<div id="HeaderGridDiv">
|
||||||
|
<table id="HeaderGrid" border="1"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div id="AllGridDiv">
|
||||||
|
<table id="AllGrid"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<textarea id="AllTextarea" rows="20" cols="147"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script nonce="${nonce}" src="${scriptCostOfDelayUri}"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>`;
|
||||||
|
}
|
||||||
|
}
|
@ -3,16 +3,16 @@ import { getNonce } from "./getNonce";
|
|||||||
import { apiBaseUrl } from "./constants";
|
import { apiBaseUrl } from "./constants";
|
||||||
import { PostMessage } from "./PostMessage";
|
import { PostMessage } from "./PostMessage";
|
||||||
|
|
||||||
export function refreshWebView(extensionContext: vscode.ExtensionContext): any {
|
export function refreshWebviewPanelExample(extensionContext: vscode.ExtensionContext): any {
|
||||||
WebViewPanel.kill();
|
WebviewPanelExample.kill();
|
||||||
WebViewPanel.createOrShow(extensionContext);
|
WebviewPanelExample.createOrShow(extensionContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WebViewPanel {
|
export class WebviewPanelExample {
|
||||||
/**
|
/**
|
||||||
* Track the currently panel. Only allow a single panel to exist at a time.
|
* Track the currently panel. Only allow a single panel to exist at a time.
|
||||||
*/
|
*/
|
||||||
public static currentPanel: WebViewPanel | undefined;
|
public static currentPanel: WebviewPanelExample | undefined;
|
||||||
|
|
||||||
public static readonly viewType = "web-view-panel";
|
public static readonly viewType = "web-view-panel";
|
||||||
|
|
||||||
@ -24,15 +24,15 @@ export class WebViewPanel {
|
|||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
// If we already have a panel, show it.
|
// If we already have a panel, show it.
|
||||||
if (WebViewPanel.currentPanel) {
|
if (WebviewPanelExample.currentPanel) {
|
||||||
WebViewPanel.currentPanel._panel.reveal(column);
|
WebviewPanelExample.currentPanel._panel.reveal(column);
|
||||||
WebViewPanel.currentPanel._update();
|
WebviewPanelExample.currentPanel._update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, create a new panel.
|
// Otherwise, create a new panel.
|
||||||
const panel = vscode.window.createWebviewPanel(
|
const panel = vscode.window.createWebviewPanel(
|
||||||
WebViewPanel.viewType,
|
WebviewPanelExample.viewType,
|
||||||
"Web-View-Panel",
|
"Web-View-Panel",
|
||||||
column || vscode.ViewColumn.One,
|
column || vscode.ViewColumn.One,
|
||||||
{
|
{
|
||||||
@ -47,16 +47,16 @@ export class WebViewPanel {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
WebViewPanel.currentPanel = new WebViewPanel(panel, extensionContext);
|
WebviewPanelExample.currentPanel = new WebviewPanelExample(panel, extensionContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static kill() {
|
public static kill() {
|
||||||
WebViewPanel.currentPanel?.dispose();
|
WebviewPanelExample.currentPanel?.dispose();
|
||||||
WebViewPanel.currentPanel = undefined;
|
WebviewPanelExample.currentPanel = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static revive(panel: vscode.WebviewPanel, extensionContext: vscode.ExtensionContext) {
|
public static revive(panel: vscode.WebviewPanel, extensionContext: vscode.ExtensionContext) {
|
||||||
WebViewPanel.currentPanel = new WebViewPanel(panel, extensionContext);
|
WebviewPanelExample.currentPanel = new WebviewPanelExample(panel, extensionContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
private constructor(private readonly _panel: vscode.WebviewPanel, private readonly _extensionContext: vscode.ExtensionContext) {
|
private constructor(private readonly _panel: vscode.WebviewPanel, private readonly _extensionContext: vscode.ExtensionContext) {
|
||||||
@ -83,7 +83,7 @@ export class WebViewPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public dispose() {
|
public dispose() {
|
||||||
WebViewPanel.currentPanel = undefined;
|
WebviewPanelExample.currentPanel = undefined;
|
||||||
|
|
||||||
// Clean up our resources
|
// Clean up our resources
|
||||||
this._panel.dispose();
|
this._panel.dispose();
|
@ -6,9 +6,10 @@ import * as kanbanHelper from './kanbanHelper';
|
|||||||
import * as markdownHelper from './markdownHelper';
|
import * as markdownHelper from './markdownHelper';
|
||||||
import * as promiseLinesHelper from './promiseLinesHelper';
|
import * as promiseLinesHelper from './promiseLinesHelper';
|
||||||
import * as replaceLinesHelper from './replaceLinesHelper';
|
import * as replaceLinesHelper from './replaceLinesHelper';
|
||||||
|
import { WebviewPanelExample } from './WebviewPanelExample';
|
||||||
import * as readOnlyLinesHelper from './readOnlyLinesHelper';
|
import * as readOnlyLinesHelper from './readOnlyLinesHelper';
|
||||||
import { WebViewPanel, refreshWebView } from "./WebViewPanel";
|
import { WebviewPanelCostOfDelay } from './WebviewPanelCostOfDelay';
|
||||||
import { ColumnsToCardsWebviewViewProvider, refreshSidebar } from "./ColumnsToCardsWebviewViewProvider";
|
import { ColumnsToCardsWebviewViewProvider, refreshSidebar } from './ColumnsToCardsWebviewViewProvider';
|
||||||
|
|
||||||
// This method is called when your extension is activated
|
// This method is called when your extension is activated
|
||||||
// Your extension is activated the very first time the command is executed
|
// Your extension is activated the very first time the command is executed
|
||||||
@ -41,7 +42,6 @@ export async function activate(extensionContext: vscode.ExtensionContext) {
|
|||||||
vscode.commands.registerCommand("copyHelper.copySyntaxInLight", copyHelper.copySyntaxInLight),
|
vscode.commands.registerCommand("copyHelper.copySyntaxInLight", copyHelper.copySyntaxInLight),
|
||||||
vscode.commands.registerCommand("kanban.refreshBoth", () => { kanbanHelper.refreshBoth(extensionContext); }),
|
vscode.commands.registerCommand("kanban.refreshBoth", () => { kanbanHelper.refreshBoth(extensionContext); }),
|
||||||
vscode.commands.registerCommand("kanban.refreshSidebar", refreshSidebar),
|
vscode.commands.registerCommand("kanban.refreshSidebar", refreshSidebar),
|
||||||
vscode.commands.registerCommand("kanban.refreshWebView", () => { refreshWebView(extensionContext); }),
|
|
||||||
vscode.commands.registerCommand("kanban.openWithTextEditor", kanbanHelper.openWithTextEditor),
|
vscode.commands.registerCommand("kanban.openWithTextEditor", kanbanHelper.openWithTextEditor),
|
||||||
vscode.commands.registerCommand("kanban.openInNewWindow", kanbanHelper.openInNewWindow),
|
vscode.commands.registerCommand("kanban.openInNewWindow", kanbanHelper.openInNewWindow),
|
||||||
vscode.commands.registerCommand("markdown.newMarkdownFile", markdownHelper.newMarkdownFile),
|
vscode.commands.registerCommand("markdown.newMarkdownFile", markdownHelper.newMarkdownFile),
|
||||||
@ -72,7 +72,15 @@ export async function activate(extensionContext: vscode.ExtensionContext) {
|
|||||||
vscode.commands.registerCommand('replaceLinesHelper.unwrapSql', replaceLinesHelper.unwrapSql),
|
vscode.commands.registerCommand('replaceLinesHelper.unwrapSql', replaceLinesHelper.unwrapSql),
|
||||||
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlCSharp', replaceLinesHelper.wrapSqlCSharp),
|
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlCSharp', replaceLinesHelper.wrapSqlCSharp),
|
||||||
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlVB', replaceLinesHelper.wrapSqlVB),
|
vscode.commands.registerCommand('replaceLinesHelper.wrapSqlVB', replaceLinesHelper.wrapSqlVB),
|
||||||
vscode.commands.registerCommand("webView.webView", () => { WebViewPanel.createOrShow(extensionContext); })
|
vscode.commands.registerCommand("webview.costOfDelayMesa", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'MES', ''); }),
|
||||||
|
vscode.commands.registerCommand("webview.costOfDelayEffortMesa", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'MES', 'EFFORT'); }),
|
||||||
|
vscode.commands.registerCommand("webview.costOfDelayLiveMesa", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'MES', 'LIVE'); }),
|
||||||
|
vscode.commands.registerCommand("webview.costOfDelayWSJFMesa", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'MES', 'WSJF'); }),
|
||||||
|
vscode.commands.registerCommand("webview.costOfDelayLeominster", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'LEO', ''); }),
|
||||||
|
vscode.commands.registerCommand("webview.costOfDelayEffortLeominster", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'LEO', 'EFFORT'); }),
|
||||||
|
vscode.commands.registerCommand("webview.costOfDelayLiveLeominster", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'LEO', 'LIVE'); }),
|
||||||
|
vscode.commands.registerCommand("webview.costOfDelayWSJFLeominster", () => { WebviewPanelCostOfDelay.createOrShow(extensionContext, 'LEO', 'WSJF'); }),
|
||||||
|
vscode.commands.registerCommand("webview.example", () => { WebviewPanelExample.createOrShow(extensionContext); })
|
||||||
];
|
];
|
||||||
|
|
||||||
commands.forEach(command => extensionContext.subscriptions.push(command));
|
commands.forEach(command => extensionContext.subscriptions.push(command));
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { refreshWebView } from './WebViewPanel';
|
|
||||||
import { paramCase } from './promiseLinesHelper';
|
import { paramCase } from './promiseLinesHelper';
|
||||||
import { refreshSidebar } from './ColumnsToCardsWebviewViewProvider';
|
import { refreshSidebar } from './ColumnsToCardsWebviewViewProvider';
|
||||||
|
|
||||||
export function refreshBoth(extensionContext: vscode.ExtensionContext): any {
|
export function refreshBoth(extensionContext: vscode.ExtensionContext): any {
|
||||||
refreshSidebar();
|
refreshSidebar();
|
||||||
refreshWebView(extensionContext);
|
|
||||||
setTimeout(() => { vscode.commands.executeCommand("workbench.action.webview.openDeveloperTools"); }, 500);
|
setTimeout(() => { vscode.commands.executeCommand("workbench.action.webview.openDeveloperTools"); }, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user