Skip to content

Commit 45bb041

Browse files
committed
update UI to handle multiple compile commands files
1 parent 6aa66f6 commit 45bb041

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Extension/src/LanguageServer/settingsPanel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ export class SettingsPanel {
337337
this.configValues.macFrameworkPath = splitEntries(message.value);
338338
break;
339339
case elementId.compileCommands:
340-
this.configValues.compileCommands = message.value || undefined;
340+
this.configValues.compileCommands = splitEntries(message.value);
341341
break;
342342
case elementId.dotConfig:
343343
this.configValues.dotConfig = message.value || undefined;

Extension/ui/settings.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,12 @@
672672
<div class="section">
673673
<div class="section-title" data-loc-id="compile.commands">Compile commands</div>
674674
<div class="section-text">
675-
<span data-loc-id="compile.commands.description">The full path to the <code>compile_commands.json</code> file for the workspace. The include paths and defines discovered in this file will be used instead of the values set for <code>includePath</code> and <code>defines</code> settings. If the compile commands database does not contain an entry for the translation unit that corresponds to the file you opened in the editor, then a warning message will appear and the extension will use the <code>includePath</code> and <code>defines</code> settings instead.</span>
675+
<span data-loc-id="compile.commands.description">A list of paths to <code>compile_commands.json</code> files for the workspace. The include paths and defines discovered in these files will be used instead of the values set for <code>includePath</code> and <code>defines</code> settings. If the compile commands database does not contain an entry for the translation unit that corresponds to the file you opened in the editor, then a warning message will appear and the extension will use the <code>includePath</code> and <code>defines</code> settings instead.</span>
676676
</div>
677677
<div>
678-
<input name="inputValue" id="compileCommands" style="width: 798px"></input>
679-
<div id="compileCommandsInvalid" class="error" style="width: 800px"></div>
678+
<div class="section-note" data-loc-id="one.compile.commands.path.per.line">One compile commands path per line.</div>
679+
<textarea name="inputValue" id="compileCommands" rows="4" cols="93" style="width: 800px"></textarea>
680+
<div id="compileCommandsInvalid" class="error" style="margin-top: -4px; width: 794px"></div>
680681
</div>
681682
</div>
682683

Extension/ui/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class SettingsApp {
295295
// Advanced settings
296296
(<HTMLInputElement>document.getElementById(elementId.windowsSdkVersion)).value = config.windowsSdkVersion ? config.windowsSdkVersion : "";
297297
(<HTMLInputElement>document.getElementById(elementId.macFrameworkPath)).value = joinEntries(config.macFrameworkPath);
298-
(<HTMLInputElement>document.getElementById(elementId.compileCommands)).value = config.compileCommands ? config.compileCommands : "";
298+
(<HTMLInputElement>document.getElementById(elementId.compileCommands)).value = joinEntries(config.compileCommands);
299299
(<HTMLInputElement>document.getElementById(elementId.mergeConfigurations)).checked = config.mergeConfigurations;
300300
(<HTMLInputElement>document.getElementById(elementId.configurationProvider)).value = config.configurationProvider ? config.configurationProvider : "";
301301
(<HTMLInputElement>document.getElementById(elementId.forcedInclude)).value = joinEntries(config.forcedInclude);

0 commit comments

Comments
 (0)