Skip to content

Commit f443ebb

Browse files
committed
Add new proposal for setting name
1 parent ea868ec commit f443ebb

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,10 @@
430430
"default": true,
431431
"description": "Display the radix prefix (e.g., '0x' for hexadecimal, '0b' for binary) before memory addresses."
432432
},
433-
"memory-inspector.allowSettingsExtension": {
433+
"memory-inspector.allowDebuggerOverwriteSettings": {
434434
"type": "boolean",
435435
"default": true,
436-
"description": "Allow other extensions to overwrite the default memory display settings."
436+
"description": "Allow debuggers to overwrite the default memory display settings."
437437
}
438438
}
439439
}

src/common/manifest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ export const CONFIG_SHOW_ASCII_COLUMN = 'ascii';
7979
export const DEFAULT_VISIBLE_COLUMNS = [CONFIG_SHOW_VARIABLES_COLUMN, CONFIG_SHOW_ASCII_COLUMN];
8080

8181
// Extension Settings
82-
export const CONFIG_ALLOW_SETTINGS_EXTENSION = 'allowSettingsExtension';
82+
export const CONFIG_ALLOW_DEBUGGER_OVERWRITE_SETTINGS = 'allowDebuggerOverwriteSettings';

src/plugin/memory-webview-main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ export class MemoryWebview implements vscode.CustomReadonlyEditorProvider {
269269

270270
protected async getMemoryDisplaySettingsContribution(): Promise<MemoryDisplaySettingsContribution> {
271271
const memoryInspectorSettings = vscode.workspace.getConfiguration(manifest.PACKAGE_NAME);
272-
const allowSettingsExtension = memoryInspectorSettings.get<boolean>(manifest.CONFIG_ALLOW_SETTINGS_EXTENSION, true);
273-
if (allowSettingsExtension) {
272+
const allowDebuggerOverwriteSettings = memoryInspectorSettings.get<boolean>(manifest.CONFIG_ALLOW_DEBUGGER_OVERWRITE_SETTINGS, true);
273+
if (allowDebuggerOverwriteSettings) {
274274
return this.memoryProvider.getMemoryDisplaySettingsContribution();
275275
}
276276
return { settings: {}, message: undefined };

src/webview/components/options-widget.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ export class OptionsWidget extends React.Component<OptionsWidgetProps, OptionsWi
310310
ref={this.extendedOptions}
311311
{...this.advancedOptionsContext}>
312312
<h2 className='advanced-options-header'>Advanced Options</h2>
313+
{this.props.settingsContributionMessage && (
314+
<p className='settings-contribution-message'>{this.props.settingsContributionMessage}</p>
315+
)}
313316
<Button
314317
{...this.moreActionsOverlayMenuContext}
315318
icon='codicon codicon-ellipsis'
@@ -482,10 +485,6 @@ export class OptionsWidget extends React.Component<OptionsWidgetProps, OptionsWi
482485
</AccordionTab>
483486

484487
</Accordion>
485-
486-
{this.props.settingsContributionMessage && (
487-
<p className='settings-contribution-message'>{this.props.settingsContributionMessage}</p>
488-
)}
489488
</OverlayPanel>
490489
</div >
491490
</div >

0 commit comments

Comments
 (0)