Skip to content

Commit

Permalink
reorganize context menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
Lramseyer committed Jan 10, 2025
1 parent 800c135 commit e3d7ea4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
62 changes: 35 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@
{
"command": "vaporview.saveViewerSettings",
"when": "view == 'netlistContainer' || view == 'displaylistContainer'",
"group": "1_saveLoad"
"group": "1_saveLoad@1"
},
{
"command": "vaporview.loadViewerSettings",
"when": "view == 'netlistContainer' || view == 'displaylistContainer'",
"group": "1_saveLoad"
"group": "1_saveLoad@2"
},
{
"command": "vaporview.reloadFile",
Expand All @@ -187,32 +187,32 @@
],
"webview/context": [
{
"command": "vaporview.removeSignal",
"submenu": "vaporview.valueFormat",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@1"
},
{
"command": "vaporview.showInNetlistView",
"submenu": "vaporview.valueColor",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@2"
},
{
"submenu": "vaporview.valueFormat",
"command": "vaporview.showInNetlistView",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@3"
},
{
"submenu": "vaporview.valueColor",
"command": "vaporview.removeSignal",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@4"
},
{
"command": "vaporview.saveViewerSettings",
"group": "1_saveLoad"
"group": "1_saveLoad@1"
},
{
"command": "vaporview.loadViewerSettings",
"group": "1_saveLoad"
"group": "1_saveLoad@2"
},
{
"submenu": "vaporview.waveDrom",
Expand All @@ -223,77 +223,85 @@
"vaporview.valueFormat": [
{
"command": "vaporview.displayAsBinary",
"group": "0_default@1",
"when": "webviewSection == 'signal' && width > '1'"
},
{
"command": "vaporview.displayAsDecimal",
"command": "vaporview.displayAsHexadecimal",
"group": "0_default@2",
"when": "webviewSection == 'signal' && width > '1'"
},
{
"command": "vaporview.displayAsDecimalSigned",
"command": "vaporview.displayAsOctal",
"group": "0_default@3",
"when": "webviewSection == 'signal' && width > '1'"
},
{
"command": "vaporview.displayAsHexadecimal",
"command": "vaporview.displayAsDecimal",
"group": "0_default@4",
"when": "webviewSection == 'signal' && width > '1'"
},
{
"command": "vaporview.displayAsOctal",
"command": "vaporview.displayAsDecimalSigned",
"group": "0_default@5",
"when": "webviewSection == 'signal' && width > '1'"
},
{
"command": "vaporview.displayAsFloat",
"group": "0_default@6",
"when": "webviewSection == 'signal' && (width == '8' || width == '16' || width == '32' || width == '64')"
},
{
"command": "vaporview.displayAsBFloat",
"group": "0_default@7",
"when": "webviewSection == 'signal' && width == '16'"
},
{
"command": "vaporview.displayAsTFloat",
"group": "0_default@8",
"when": "webviewSection == 'signal' && width == '19'"
}
],
"vaporview.valueColor": [
{
"command": "vaporview.defaultColor1",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@1"
},
{
"command": "vaporview.defaultColor2",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@2"
},
{
"command": "vaporview.defaultColor3",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@3"
},
{
"command": "vaporview.defaultColor4",
"when": "webviewSection == 'signal'",
"group": "0_default"
"group": "0_default@4"
},
{
"command": "vaporview.customColor1",
"when": "webviewSection == 'signal'",
"group": "1_custom"
"group": "1_custom@1"
},
{
"command": "vaporview.customColor2",
"when": "webviewSection == 'signal'",
"group": "1_custom"
"group": "1_custom@2"
},
{
"command": "vaporview.customColor3",
"when": "webviewSection == 'signal'",
"group": "1_custom"
"group": "1_custom@3"
},
{
"command": "vaporview.customColor4",
"when": "webviewSection == 'signal'",
"group": "1_custom"
"group": "1_custom@4"
}
],
"vaporview.waveDrom": [
Expand Down Expand Up @@ -322,7 +330,7 @@
},
{
"command": "vaporview.addAllInModule",
"title": "Add All Signals In Module"
"title": "Add All Variables In Module"
},
{
"command": "vaporview.removeSelectedNetlist",
Expand All @@ -334,11 +342,11 @@
},
{
"command": "vaporview.removeAllInModule",
"title": "Remove All Signals In Module"
"title": "Remove All Variables In Module"
},
{
"command": "vaporview.removeSignal",
"title": "Remove Signal"
"title": "Remove Variable"
},
{
"command": "vaporview.showInNetlistView",
Expand Down
2 changes: 1 addition & 1 deletion src/extension_core/viewer_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export class WaveformViewerProvider implements vscode.CustomReadonlyEditorProvid
element.type !== 'Real';
});

if ((elementList.length > 16) && !noWarning) {
if ((elementList.length > 24) && !noWarning) {
// show warning message
vscode.window.showWarningMessage('You are about to add a large number of signals to the waveform viewer. This may cause performance issues. Do you want to continue?', 'Yes', 'No').then((response) => {
if (response === 'Yes') {
Expand Down

0 comments on commit e3d7ea4

Please sign in to comment.