Skip to content

Commit a7fdbbe

Browse files
authored
Resolved Issue #70 & Issue #90 (#119)
Resolved Issue #70 & Issue #90 (#119)
1 parent 84a9db9 commit a7fdbbe

19 files changed

+60
-20
lines changed

extension/src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class ContextManager{
2929
get ExtPath(): string {
3030
return this._ctx ? this._ctx.extensionPath : "";
3131
}
32-
get Data() {
32+
get Resources() {
3333
return Resources;
3434
}
3535

extension/src/debug.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { calculateABSPathForDAP } from './platform';
1010
import { existsSync } from 'fs';
1111
import { ProcessPathCache } from './process/processCache';
1212
import { DiagnosticsCtrl } from './diagnosticsCtrl';
13+
import { getExtensionSettingString } from './resources';
1314

1415
let strNoADPerr: string = localize("autolispext.debug.nodap", "doesn’t exist. Verify that the file exists in the same folder as that for the product specified in the launch.json file.");
1516
let strNoACADerr: string = localize("autolispext.debug.noacad", "doesn’t exist. Verify and correct the folder path to the product executable.");
@@ -239,17 +240,6 @@ class LispAttachConfigurationProvider implements vscode.DebugConfigurationProvid
239240
}
240241
}
241242

242-
function getExtensionSettingString(settingName: string): string {
243-
let settingGroup = vscode.workspace.getConfiguration('autolispext');
244-
if (!settingGroup)
245-
return null;
246-
247-
let setting = settingGroup.get(settingName);
248-
if (!setting)
249-
return null;
250-
251-
return setting.toString().trim();
252-
}
253243

254244
function rememberLaunchPath(path: string) {
255245
if (existsSync(path) == false)

extension/src/format/sexpression.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,6 @@ export class LispContainer extends LispAtom {
247247
}
248248

249249

250-
// Returns true if this LispContainer encapsulates the provided Position
251-
contains(position: Position): boolean {
252-
return this.getRange().contains(position);
253-
}
254-
255250

256251
// This version was necessary to properly alternate over SETQ Name vs Value
257252
private isValidForSetq(atom: ILispFragment): boolean {
@@ -1105,7 +1100,7 @@ export class Sexpression extends LispAtom {
11051100
else if (opName == "setq") {
11061101
return exp.formatSetq(startColumn);
11071102
}
1108-
else if (opName == "foreach") {
1103+
else if (opName === "foreach" || opName === "vlax-for") {
11091104
return exp.formatForeach(startColumn);
11101105
}
11111106
else if (opName == "defun" || opName == "defun-q") {

extension/src/help/openWebHelp.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as vscode from 'vscode';
2+
import { getExtensionSettingString } from '../resources';
23
import { IJsonLoadable, webHelpContainer } from "../resources";
34

45

@@ -26,11 +27,23 @@ export class WebHelpLibrary implements IJsonLoadable {
2627
functions: Dictionary<WebHelpFunction> = {};
2728
ambiguousFunctions: Dictionary<WebHelpFunction[]> = {};
2829
enumerators: Dictionary<string> = {};
29-
year: string;
30+
_jsonYear: string = '';
3031

32+
get year(): string {
33+
return getExtensionSettingString('help.TargetYear');
34+
}
35+
36+
get jsonCreatedWithVersionYear(): string {
37+
return this._jsonYear;
38+
}
39+
40+
3141
// consumes a JSON converted object into the WebHelpLibrary
3242
loadFromJsonObject(obj: object): void{
33-
this.year = obj['year'] ?? '2021';
43+
// Issue #70, A user configured extension setting was requested by Issue #70 and deprecated the use of the embedded json year
44+
// However, this was left available in case we would like to setup a unit test that insures the JSON isn't stale.
45+
this._jsonYear = obj['year'] ?? '2021';
46+
3447
Object.keys(obj["dclAttributes"]).forEach(key => {
3548
let newObj = new WebHelpDclAtt(obj["dclAttributes"][key]);
3649
this.dclAttributes[key] = newObj;

extension/src/resources.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as path from 'path';
22
import { WebHelpLibrary } from "./help/openWebHelp";
3+
import * as vscode from 'vscode';
34

45

56
export let internalLispFuncs: Array<string> = [];
@@ -79,3 +80,19 @@ function readDataFileByDelimiter(datafile: string, delimiter: string, action: (i
7980
}
8081
});
8182
}
83+
84+
85+
86+
export function getExtensionSettingString(settingName: string): string {
87+
let settingGroup = vscode.workspace.getConfiguration('autolispext');
88+
if (!settingGroup) {
89+
return null;
90+
}
91+
92+
let setting = settingGroup.get(settingName);
93+
if (!setting) {
94+
return null;
95+
}
96+
97+
return setting.toString().trim();
98+
}

i18n/chs/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "函数参数的窄格式样式中使用的缩进值。值必须在 1 和 6 之间。",
99
"autolispext.configuration.closeparenstyle.desc": "控制右括号的样式。右括号与函数位于同一行或与函数的左括号对齐。",
1010
"autolispext.configuration.longlistformatstyle": "控制长列表的格式样式。函数的每个参数或多个参数都放置在单独的行上。",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "要针对“调试附加”过滤的进程名称。",
1213
"autolispext.configuration.launchprogram.desc": "AutoCAD 可执行文件的绝对路径。",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD 命令行启动开关。",

i18n/cht/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "函數引數的窄格式型式使用的縮排值。值必須在 1 到 6 的範圍內。",
99
"autolispext.configuration.closeparenstyle.desc": "控制右圓括號的型式。右圓括號會放在與函數同一行的位置,或與函數的左圓括號對齊。",
1010
"autolispext.configuration.longlistformatstyle": "控制長清單的格式型式。函數的每個參數或多個參數都會放在單獨的一行。",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "要篩選以用於「偵錯連接」的程序名稱。",
1213
"autolispext.configuration.launchprogram.desc": "AutoCAD 可執行檔的絕對路徑。",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD 指令行啟動參數。",

i18n/deu/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Einrückungswert für den schmalen Formatierungsstil der Funktionsargumente. Wert muss zwischen 1 und 6 liegen.",
99
"autolispext.configuration.closeparenstyle.desc": "Steuert den Stil schließender Klammern. Die schließende Klammer wird auf derselben Zeile platziert wie die Funktion oder an der öffnenden Klammer der Funktion ausgerichtet.",
1010
"autolispext.configuration.longlistformatstyle": "Steuert den Formatstil von langen Listen. Jeder oder mehrere Parameter einer Funktion werden in separaten Zeilen platziert.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Prozessname, nach dem für Debug Attach gefiltert werden soll.",
1213
"autolispext.configuration.launchprogram.desc": "Absoluter Pfad zur ausführbaren AutoCAD-Datei.",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD-Befehlszeilenstartoptionen.",

i18n/enu/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Indentation value used in the Narrow Formatting Style of function arguments. Value must be in the range of 1 and 6.",
99
"autolispext.configuration.closeparenstyle.desc": "Controls the style of closing parenthesis. Closing parenthesis is placed on the same line as the function or aligned with the function’s opening parenthesis.",
1010
"autolispext.configuration.longlistformatstyle": "Controls the format style of long lists. Each or multiple parameters of a function are placed on separate lines.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Process name to filter on for Debug Attach.",
1213
"autolispext.configuration.launchprogram.desc": "Absolute path to the AutoCAD executable.",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD command line startup switches.",

i18n/esp/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Valor de sangría utilizado en el estilo de formato estrecho de los argumentos de función. El valor debe encontrarse en el intervalo entre 1 y 6.",
99
"autolispext.configuration.closeparenstyle.desc": "Controla el estilo del paréntesis de cierre. El paréntesis de cierre se coloca en la misma línea que la función o se alinea con el paréntesis de apertura de la función.",
1010
"autolispext.configuration.longlistformatstyle": "Controla el estilo de formato de las listas largas. Uno o varios parámetros de una función se colocan en líneas independientes.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Nombre del proceso por el que filtrar para Debug Attach.",
1213
"autolispext.configuration.launchprogram.desc": "Ruta absoluta al archivo ejecutable de AutoCAD.",
1314
"autolispext.configuration.launchparameters.desc": "Conmutadores de inicio de la línea de comando de AutoCAD.",

i18n/fra/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Valeur de retrait utilisée dans les arguments de la fonction Style de formatage étroit. La valeur doit être comprise entre 1 et 6.",
99
"autolispext.configuration.closeparenstyle.desc": "Contrôle le style de parenthèse fermante. La parenthèse fermante est placée sur la même ligne que la fonction ou alignée sur la parenthèse ouvrante de la fonction.",
1010
"autolispext.configuration.longlistformatstyle": "Contrôle le style de format des listes longues. Chaque paramètre, ou plusieurs paramètres, d'une fonction sont placés sur des lignes distinctes.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Nom du processus sur lequel filtrer pour Debug Attach.",
1213
"autolispext.configuration.launchprogram.desc": "Chemin absolu de l'exécutable d'AutoCAD.",
1314
"autolispext.configuration.launchparameters.desc": "Commutateurs de démarrage de ligne de commande d'AutoCAD.",

i18n/hun/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "A függvényargumentumok keskeny formázási stílusában használt behúzási érték. Az értéknek 1 és 6 között kell lennie.",
99
"autolispext.configuration.closeparenstyle.desc": "A záró zárójel stílusát szabályozza. A záró zárójel a függvénnyel azonos sorba kerül, vagy a függvény nyitó zárójeléhez van igazítva.",
1010
"autolispext.configuration.longlistformatstyle": "A hosszú listák formátumstílusát szabályozza. A függvények minden vagy több paramétere külön sorba kerül.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Folyamatnév a szűréshez a Debug Attach konfiguráció esetében.",
1213
"autolispext.configuration.launchprogram.desc": "Az AutoCAD futtatható fájljának abszolút elérési útvonala.",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD parancssori indítási kapcsolók.",

i18n/ita/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Valore di rientro utilizzato nello stile di formattazione stretto degli argomenti di funzione. Il valore deve essere compreso nell'intervallo 1-6.",
99
"autolispext.configuration.closeparenstyle.desc": "Controlla lo stile della parentesi di chiusura. La parentesi di chiusura viene inserita sulla stessa riga della funzione o allineata con la parentesi di apertura della funzione.",
1010
"autolispext.configuration.longlistformatstyle": "Controlla lo stile del formato degli elenchi lunghi. Ogni parametro o più parametri di una funzione vengono posizionati su righe separate.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Nome del processo in base al quale filtrare per Debug Attach.",
1213
"autolispext.configuration.launchprogram.desc": "Percorso assoluto del file eseguibile di AutoCAD.",
1314
"autolispext.configuration.launchparameters.desc": "Opzioni di avvio dalla riga di comando di AutoCAD.",

i18n/jpn/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "関数の引数の幅狭整形スタイルで使用されるインデント値。値は 1 ~ 6 の範囲でなければなりません。",
99
"autolispext.configuration.closeparenstyle.desc": "右括弧のスタイルをコントロールします。右括弧は、関数と同じ行に配置されるか、関数の左括弧に位置合わせて配置されます。",
1010
"autolispext.configuration.longlistformatstyle": "長いリストの整形スタイルをコントロールします。関数の各パラメータまたは複数のパラメータは、別々の行に配置されます。",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "デバッグ アタッチ用にフィルタするプロセス名。",
1213
"autolispext.configuration.launchprogram.desc": "AutoCAD 実行ファイルへの絶対パス。",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD コマンド ライン起動スイッチ。",

i18n/kor/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "함수 인수의 좁은 형식 스타일에 사용되는 들여쓰기 값입니다. 값은 1과 6 범위 내에 있어야 합니다.",
99
"autolispext.configuration.closeparenstyle.desc": "닫는 괄호의 스타일을 조정합니다. 닫는 괄호는 함수와 같은 행에 배치되거나 함수의 여는 괄호에 정렬됩니다.",
1010
"autolispext.configuration.longlistformatstyle": "긴 리스트의 형식 스타일을 조정합니다. 함수의 각 또는 여러 매개변수는 별도의 행에 배치됩니다.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Debug Attach에 대해 필터링할 프로세스 이름입니다.",
1213
"autolispext.configuration.launchprogram.desc": "AutoCAD 실행 파일의 절대 경로입니다.",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD 명령행 시작 스위치입니다.",

i18n/ptb/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Valor de recuo usado no Estilo de formatação estreito dos argumentos de função. O valor deve estar na faixa de 1 e 6.",
99
"autolispext.configuration.closeparenstyle.desc": "Controla o estilo de parênteses de fechamento. O parêntese de fechamento é colocado na mesma linha que a função ou alinhado com o parêntese de abertura da função.",
1010
"autolispext.configuration.longlistformatstyle": "Controla o estilo de formato de listas longas. Cada parâmetro ou vários parâmetros de uma função são inseridos em linhas separadas.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Nome do processo a ser filtrado para anexar a depuração.",
1213
"autolispext.configuration.launchprogram.desc": "Caminho absoluto para o executável do AutoCAD.",
1314
"autolispext.configuration.launchparameters.desc": "Botões de inicialização da linha de comando do AutoCAD.",

i18n/rus/package.i18n.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Значение отступа, используемое в узком стиле форматирования аргументов функции. Значение должно находиться в диапазоне от 1 до 6.",
99
"autolispext.configuration.closeparenstyle.desc": "Управление стилем закрывающей скобки. Закрывающая скобка помещается на той же строке, что и функция, или выравнивается по открывающей скобке функции.",
1010
"autolispext.configuration.longlistformatstyle": "Управление стилем форматирования длинных списков. Каждый или несколько параметров функции размещаются на отдельных строках.",
11+
"autolispext.configuration.helptargetyear": "",
1112
"autolispext.configuration.attachprocess.desc": "Имя процесса для фильтрации в Debug Attach.",
1213
"autolispext.configuration.launchprogram.desc": "Абсолютный путь к исполняемому файлу AutoCAD.",
1314
"autolispext.configuration.launchparameters.desc": "Переключатели запуска командной строки AutoCAD.",

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,18 @@
221221
"type": "string",
222222
"default": "",
223223
"description": "%autolispext.configuration.launchparameters.desc%"
224+
},
225+
"autolispext.help.TargetYear": {
226+
"type": "string",
227+
"enum": [
228+
"2018",
229+
"2019",
230+
"2020",
231+
"2021",
232+
"2022"
233+
],
234+
"default": "2022",
235+
"description": "%autolispext.configuration.helptargetyear%"
224236
}
225237
}
226238
},

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"autolispext.configuration.narrowstyleindent.desc": "Indentation value used in the Narrow Formatting Style of function arguments. Value must be in the range of 1 and 6.",
99
"autolispext.configuration.closeparenstyle.desc": "Controls the style of closing parenthesis. Closing parenthesis is placed on the same line as the function or aligned with the function’s opening parenthesis.",
1010
"autolispext.configuration.longlistformatstyle": "Controls the format style of long lists. Each or multiple parameters of a function are placed on separate lines.",
11+
"autolispext.configuration.helptargetyear": "Determines the targeted AutoCAD year version of the 'Open Online Help' command.",
1112
"autolispext.configuration.attachprocess.desc": "Process name to filter on for Debug Attach.",
1213
"autolispext.configuration.launchprogram.desc": "Absolute path to the AutoCAD executable.",
1314
"autolispext.configuration.launchparameters.desc": "AutoCAD command line startup switches.",

0 commit comments

Comments
 (0)