From 835ef75cc8b0feff94f4fbb0ebb42b6ae1e2e2bf Mon Sep 17 00:00:00 2001 From: Philip Langer Date: Wed, 24 Apr 2024 09:09:46 +0200 Subject: [PATCH] Fix a few typos --- src/plugin/adapter-registry/adapter-capabilities.ts | 4 ++-- src/plugin/memory-provider.ts | 6 +++--- src/webview/columns/column-contribution-service.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugin/adapter-registry/adapter-capabilities.ts b/src/plugin/adapter-registry/adapter-capabilities.ts index cd35d0e..0afd107 100644 --- a/src/plugin/adapter-registry/adapter-capabilities.ts +++ b/src/plugin/adapter-registry/adapter-capabilities.ts @@ -26,7 +26,7 @@ export interface AdapterCapabilities { getVariables?(session: vscode.DebugSession): Promise; /** Resolve symbols resident in the memory at the specified range. Will be preferred to {@link getVariables} if present. */ getResidents?(session: vscode.DebugSession, params: DebugProtocol.ReadMemoryArguments): Promise; - /** Resolves the address of a given variable in bytes withthe current context. */ + /** Resolves the address of a given variable in bytes with the current context. */ getAddressOfVariable?(session: vscode.DebugSession, variableName: string): Promise; /** Resolves the size of a given variable in bytes within the current context. */ getSizeOfVariable?(session: vscode.DebugSession, variableName: string): Promise; @@ -48,7 +48,7 @@ export function extractDecimalAddress(text?: string): string | undefined { } export function extractAddress(text?: string): string | undefined { - // search for hex address first as a hex adress (0x12345678) also matches an integer address (12345678) + // search for hex address first as a hex address (0x12345678) also matches an integer address (12345678) return text ? extractHexAddress(text) ?? extractDecimalAddress(text) : undefined; } diff --git a/src/plugin/memory-provider.ts b/src/plugin/memory-provider.ts index 0f122d6..7a77996 100644 --- a/src/plugin/memory-provider.ts +++ b/src/plugin/memory-provider.ts @@ -122,17 +122,17 @@ export class MemoryProvider { /** Returns the session if the capability is present, otherwise throws. */ protected assertCapability(capability: keyof DebugProtocol.Capabilities, action: string): vscode.DebugSession { const session = this.assertActiveSession(action); - if (!this.hasDebugCapabilitiy(session, capability)) { + if (!this.hasDebugCapability(session, capability)) { throw new Error(`Cannot ${action}. Session does not have capability ${capability}.`); } return session; } - protected hasDebugCapabilitiy(session: vscode.DebugSession, capability: keyof DebugProtocol.Capabilities): boolean { + protected hasDebugCapability(session: vscode.DebugSession, capability: keyof DebugProtocol.Capabilities): boolean { return !!this.sessionDebugCapabilities.get(session.id)?.[capability]; } - protected hasClientCapabilitiy(session: vscode.DebugSession, capability: keyof DebugProtocol.InitializeRequestArguments): boolean { + protected hasClientCapability(session: vscode.DebugSession, capability: keyof DebugProtocol.InitializeRequestArguments): boolean { return !!this.sessionClientCapabilities.get(session.id)?.[capability]; } diff --git a/src/webview/columns/column-contribution-service.ts b/src/webview/columns/column-contribution-service.ts index f837b34..e94579f 100644 --- a/src/webview/columns/column-contribution-service.ts +++ b/src/webview/columns/column-contribution-service.ts @@ -28,7 +28,7 @@ export interface ColumnContribution { readonly label: string; /** Depending on the supported fitting mode, the column will be rendered differently */ fittingType?: ColumnFittingType; - /** Sorted low to high. If ommitted, sorted alphabetically by ID after all contributions with numbers. */ + /** Sorted low to high. If omitted, sorted alphabetically by ID after all contributions with numbers. */ priority?: number; render(range: BigIntMemoryRange, memory: Memory, options: TableRenderOptions): React.ReactNode /** Called when fetching new memory or when activating the column. */ @@ -54,7 +54,7 @@ class ColumnContributionService { protected columnArray = new Array(); protected registeredColumns = new Map; /** - * @param configurable - if `false`, the column will always be dispayled. + * @param configurable - if `false`, the column will always be displayed. * @param defaultActive if {@link configurable} is `false`, this field will default to `true` and be ignored. Otherwise defaults to `false`. */ register(contribution: ColumnContribution, configurable = true, defaultActive?: boolean): Disposable {