Skip to content

Commit d48a05f

Browse files
committed
Displays a message when the workspace is about to be validated but the validation setting is disabled
1 parent ec70cc8 commit d48a05f

File tree

9 files changed

+28
-18
lines changed

9 files changed

+28
-18
lines changed

.vscode/launch.json

-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"name": "Launch Client",
99
"runtimeExecutable": "${execPath}",
1010
"args": ["--extensionDevelopmentPath=${workspaceFolder}" ],
11-
"stopOnEntry": false,
1211
"sourceMaps": true,
1312
"outFiles": ["${workspaceFolder}/client/out/**/*.js"],
1413
"preLaunchTask": "npm: watch"
@@ -18,7 +17,6 @@
1817
"request": "attach",
1918
"name": "Attach to Server",
2019
"address": "localhost",
21-
"protocol": "inspector",
2220
"port": 6011,
2321
"sourceMaps": true,
2422
"outFiles": ["${workspaceFolder}/server/out/**/*.js"]
@@ -39,7 +37,6 @@
3937
"type": "node",
4038
"request": "launch",
4139
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
42-
"stopOnEntry": false,
4340
"args": [
4441
"--timeout",
4542
"999999",

i18n/chs/package.i18n.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"macro.setControlType": "选择NC系统类型",
88
"macro.action.addsequeces": "添加缺失的顺序号",
99
"macro.action.refactorsequeces": "重排顺序号",
10-
"macro.action.validate" : "Validate Workspace",
10+
"macro.action.validate" : "检查项目文件夹",
1111
"macro.callFunctions.description": "子程序调用",
1212
"macro.lint.description": "Lint设置",
1313
"macro.sequence.base.description": "顺序起始号",
1414
"macro.sequence.increment.description": "顺序号增量",
1515
"macro.validate.enable.description": "代码校验",
16-
"macro.validate.workspace.description": "环境校验",
17-
"macro.validate.onBuild.description": "Enables or disables the workspace validation when building the project",
16+
"macro.validate.workspace.description": "检查项目文件夹仅在 `#macro.validate.enable#` 设为`真`时有效",
17+
"macro.validate.onBuild.description": "在编译项目的时候启用或者禁用检查项目文件夹。仅在 `#macro.validate.enable#` 设为`真`时有效",
1818
"macro.build.compiler.description": "选择宏编译器",
1919
"macro.build.controlType.description": "选择NC系统类型",
2020
"macro.build.compilerParams.description": "附加其他编译参数 -NR -L1 -L2 -L3 -PR",

i18n/chs/server/out/server.i18n.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"message.refactorsequeces.success": "重排顺序号完成",
3-
"message.addsequeces.success": "添加顺序号完成"
3+
"message.addsequeces.success": "添加顺序号完成",
4+
"message.validationdisabled" : "项目文件夹验证未启用"
45
}

i18n/deu/package.i18n.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"macro.sequence.base.description": "Startnummer der Sequenzen für das Refactoring",
1414
"macro.sequence.increment.description": "Inkrement der Sequenzen für Refactoring",
1515
"macro.validate.enable.description": "Aktiviert oder deaktiviert alle Überprüfungen",
16-
"macro.validate.workspace.description": "Aktiviert oder deaktiviert die Überprüfung des gesamten Arbeitsbereichs",
17-
"macro.validate.onBuild.description": "Aktiviert oder deaktiviert die Überprüfung des gesamten Arbeitsbereichs beim Erstellen des Projekts",
16+
"macro.validate.workspace.description": "Aktiviert oder deaktiviert die Überprüfung des gesamten Arbeitsbereichs. Gilt nur wenn `#macro.validate.enable#` auf `true` gesetzt ist.",
17+
"macro.validate.onBuild.description": "Aktiviert oder deaktiviert die Überprüfung des gesamten Arbeitsbereichs beim Erstellen des Projekts. Gilt nur wenn `#macro.validate.enable#` auf `true` gesetzt ist.",
1818
"macro.build.compiler.description": "Auswahl des Macro-Compilers",
1919
"macro.build.controlType.description": "Auswahl des Steuerungstyps",
2020
"macro.build.compilerParams.description": "Zusätzliche Compilerparameter: -NR, -L1, -L2, -L3, -PR",

i18n/deu/server/out/server.i18n.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"message.refactorsequeces.success": "Sequenznummern erfolgreich geändert",
3-
"message.addsequeces.success": "Sequenznummern erfolgreich hinzugefügt"
3+
"message.addsequeces.success": "Sequenznummern erfolgreich hinzugefügt",
4+
"message.validationdisabled" : "Die Validierung ist deaktiviert"
45
}

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,13 +429,13 @@
429429
"scope": "resource",
430430
"type": "boolean",
431431
"default": true,
432-
"description": "%macro.validate.workspace.description%"
432+
"markdownDescription": "%macro.validate.workspace.description%"
433433
},
434434
"macro.validate.onBuild": {
435435
"scope": "resource",
436436
"type": "boolean",
437437
"default": false,
438-
"description": "%macro.validate.onBuild.description%"
438+
"markdownDescription": "%macro.validate.onBuild.description%"
439439
},
440440
"macro.build.compiler": {
441441
"type": "string",

package.nls.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"macro.sequence.base.description": "Sequences start number for refactoring",
1414
"macro.sequence.increment.description": "Sequences increment for refactoring",
1515
"macro.validate.enable.description": "Enables or disables the validation",
16-
"macro.validate.workspace.description": "Enables or disables the workspace validation",
17-
"macro.validate.onBuild.description": "Enables or disables the workspace validation when building the project",
16+
"macro.validate.workspace.description": "Enables or disables the workspace validation. Only applies when `#macro.validate.enable#` is set to `true`.",
17+
"macro.validate.onBuild.description": "Enables or disables the workspace validation when building the project. Only applies when `#macro.validate.enable#` is set to `true`.",
1818
"macro.build.compiler.description": "Selection of the macro compiler",
1919
"macro.build.controlType.description": "Selection of the control type",
2020
"macro.build.compilerParams.description": "Additional compiler parameters: -NR, -L1, -L2, -L3, -PR",

server/src/server.ts

+13-2
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,19 @@ connection.onExecuteCommand(params => {
279279
}
280280

281281
if (params.command === 'macro.action.validate') {
282-
const workspaceUri = params.arguments[0];
283-
validateWorkspace(workspaceUri, true);
282+
283+
const workspaceUri = params.arguments[0];
284+
285+
getSettings(workspaceUri).then(settings => {
286+
287+
if (!settings.validate?.enable) {
288+
connection.window.showInformationMessage(localize('message.validationdisabled', 'The validation is disabled'));
289+
return;
290+
}
291+
292+
validateWorkspace(workspaceUri, true);
293+
});
294+
284295
return;
285296
}
286297

0 commit comments

Comments
 (0)