Skip to content

Commit 8056dea

Browse files
committed
update
1 parent f6d9a75 commit 8056dea

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"category": "LeetCode"
9595
},
9696
{
97-
"command": "lcpr.SetBricksType",
97+
"command": "lcpr.setBricksType",
9898
"title": "设置提交几天后出现在工地",
9999
"category": "LeetCode"
100100
},
@@ -224,6 +224,11 @@
224224
"when": "view == QuestionExplorer && viewItem =~ /problem*/",
225225
"group": "leetcode@3"
226226
},
227+
{
228+
"command": "lcpr.setBricksType",
229+
"when": "view == QuestionExplorer && viewItem =~ /problem*/",
230+
"group": "leetcode@4"
231+
},
227232
{
228233
"command": "lcpr.addFavorite",
229234
"when": "view == QuestionExplorer && viewItem == problem",
@@ -248,6 +253,11 @@
248253
"command": "lcpr.showSolution",
249254
"when": "view == BricksExplorer && viewItem == bricks",
250255
"group": "leetcode@3"
256+
},
257+
{
258+
"command": "lcpr.setBricksType",
259+
"when": "view == BricksExplorer && viewItem == bricks",
260+
"group": "leetcode@4"
251261
}
252262
],
253263
"commandPalette": [

src/controller/TreeViewController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class TreeViewController implements Disposable {
263263
* @param {boolean} [allCase] - Whether to submit all cases.
264264
* @returns a promise that resolves to void.
265265
*/
266-
public async testSolutionDefault(uri?: vscode.Uri, allCase?: boolean): Promise<void> {
266+
public async testCaseDef(uri?: vscode.Uri, allCase?: boolean): Promise<void> {
267267
try {
268268
if (statusBarService.getStatus() === UserStatus.SignedOut) {
269269
return;
@@ -294,7 +294,7 @@ class TreeViewController implements Disposable {
294294
* be randomly selected.
295295
* @returns a promise that resolves to void.
296296
*/
297-
public async testSolutionArea(uri?: vscode.Uri, testcase?: string): Promise<void> {
297+
public async tesCaseArea(uri?: vscode.Uri, testcase?: string): Promise<void> {
298298
try {
299299
if (statusBarService.getStatus() === UserStatus.SignedOut) {
300300
return;

src/extension.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,8 @@ export async function activate(context: ExtensionContext): Promise<void> {
6969
commands.registerCommand("lcpr.showSolution", (input: NodeModel | Uri) => treeViewController.showSolution(input)),
7070
commands.registerCommand("lcpr.refreshExplorer", () => treeDataService.refresh()),
7171
commands.registerCommand("lcpr.testSolution", (uri?: Uri) => treeViewController.testSolution(uri)),
72-
commands.registerCommand("lcpr.testSolutionDefault", (uri?: Uri, allCase?: boolean) =>
73-
treeViewController.testSolutionDefault(uri, allCase)
74-
),
75-
commands.registerCommand("lcpr.testSolutionArea", (uri?: Uri, testCase?: string) =>
76-
treeViewController.testSolutionArea(uri, testCase)
77-
),
72+
commands.registerCommand("lcpr.testCaseDef", (uri?, allCase?) => treeViewController.testCaseDef(uri, allCase)),
73+
commands.registerCommand("lcpr.tesCaseArea", (uri, testCase?) => treeViewController.tesCaseArea(uri, testCase)),
7874
commands.registerCommand("lcpr.submitSolution", (uri?: Uri) => treeViewController.submitSolution(uri)),
7975
commands.registerCommand("lcpr.setDefaultLanguage", () => treeViewController.setDefaultLanguage()),
8076
commands.registerCommand("lcpr.addFavorite", (node: NodeModel) => treeViewController.addFavorite(node)),

src/service/FileButtonService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class FileButtonService implements vscode.CodeLensProvider {
4747
temp_result.push(
4848
new vscode.CodeLens(range, {
4949
title: "case",
50-
command: "lcpr.testSolutionDefault",
50+
command: "lcpr.testCaseDef",
5151
arguments: [document.uri, false],
5252
})
5353
);
@@ -56,7 +56,7 @@ export class FileButtonService implements vscode.CodeLensProvider {
5656
temp_result.push(
5757
new vscode.CodeLens(range, {
5858
title: "allcase",
59-
command: "lcpr.testSolutionDefault",
59+
command: "lcpr.testCaseDef",
6060
arguments: [document.uri, true],
6161
})
6262
);
@@ -112,7 +112,7 @@ export class FileButtonService implements vscode.CodeLensProvider {
112112

113113
return new vscode.CodeLens(range, {
114114
title: "case",
115-
command: "lcpr.testSolutionArea",
115+
command: "lcpr.tesCaseArea",
116116
arguments: [document.uri, testCase],
117117
});
118118
}

0 commit comments

Comments
 (0)