Skip to content

Commit 2679453

Browse files
author
Tim Etchells
committed
Context ID fixes
1 parent ece8dff commit 2679453

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
},
218218
{
219219
"command": "%cmdID_openInBrowser%",
220-
"when": "viewItem =~ /ext.mc.(projectItem.enabled.*|connectionItem.active)/",
220+
"when": "%isActiveConnectionOrEnabledProject%",
221221
"group": "ext.mc.a@0"
222222
},
223223
{

dev/package.nls.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,13 @@
102102
"See ProjectContextID.ts and Connection.ts for how the Context IDs are set"
103103
],
104104

105-
"isInViewWithNothingSelected": "view == ext\\.mc\\.mcProjectExplorer && !viewItem",
105+
"isInViewWithNothingSelected": "view == ext.mc.mcProjectExplorer && !viewItem",
106106
"isConnectionOrProject": "viewItem =~ /ext\\.mc\\.*/",
107107
"isConnection": "viewItem =~ /ext\\.mc\\.connectionItem*/",
108-
"isActiveConnection": "viewItem == ext\\.mc\\.connectionItem\\.active",
108+
"isActiveConnection": "viewItem == ext.mc.connectionItem.active",
109+
110+
"isActiveConnectionOrEnabledProject":
111+
"viewItem =~ /ext.mc.(projectItem.enabled.*|connectionItem.active)/",
109112

110113
"isProject": "viewItem =~ /ext\\.mc\\.projectItem*/",
111114
"isEnabledProject": "viewItem =~ /ext\\.mc\\.projectItem\\.enabled*/",

dev/src/command/CommandUtil.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function createCommands(): vscode.Disposable[] {
5353

5454
vscode.commands.registerCommand(Commands.REQUEST_BUILD, (selection) => requestBuildCmd(selection)),
5555
vscode.commands.registerCommand(Commands.TOGGLE_AUTOBUILD, (selection) => toggleAutoBuildCmd(selection)),
56+
// Enable and disable AB are the same as Toggle AB - they are just presented to the user differently.
5657
vscode.commands.registerCommand(Commands.ENABLE_AUTOBUILD, (selection) => toggleAutoBuildCmd(selection)),
5758
vscode.commands.registerCommand(Commands.DISABLE_AUTOBUILD, (selection) => toggleAutoBuildCmd(selection)),
5859

@@ -73,7 +74,7 @@ export function createCommands(): vscode.Disposable[] {
7374
}
7475

7576
// Some commands require a project or connection to be selected,
76-
// if they're launched from the command pallet we have to ask which resource they want to run the command on.
77+
// if they're launched from the command palette we have to ask which resource they want to run the command on.
7778
// The functions below handle this use case.
7879

7980
/**

dev/src/microclimate/project/ProjectContextID.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const SEPARATOR = ".";
1414
enum ContextOptions {
1515
// (en|dis)abled are mutex
1616
ENABLED = "enabled",
17-
// debuggable implies (enabled and not disabled)
17+
// debuggable implies enabled
1818
DISABLED = "disabled",
1919

2020
DEBUGGABLE = "debuggable",

dev/todo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Important:
1414
- Restarting again fixes it
1515
- Should give user a way to remove project logs from output view
1616
- Add a debug init script to generator https://github.com/ibm-developer/generator-ibm-core-node-express/blob/develop/app/templates/package.json
17+
- Periods at the ends of popup messages
1718

1819
Annoying Release Stuff:
1920
- Icons

0 commit comments

Comments
 (0)