From 447252631e15ddc81f36519c5f758e3932ccfb45 Mon Sep 17 00:00:00 2001 From: hikerpig Date: Sat, 12 Aug 2017 23:45:48 +0800 Subject: [PATCH 1/2] fix spelling of 'iff' and 'idenifier' --- src/vs/base/common/glob.ts | 2 +- src/vs/editor/common/editorCommon.ts | 4 ++-- src/vs/monaco.d.ts | 2 +- src/vs/platform/files/common/files.ts | 2 +- src/vs/platform/registry/common/platform.ts | 6 +++--- src/vs/platform/workspace/common/workspace.ts | 8 ++++---- .../workbench/api/node/extHostDocumentSaveParticipant.ts | 2 +- src/vs/workbench/common/actionRegistry.ts | 4 ++-- .../parts/snippets/electron-browser/snippetsTracker.ts | 2 +- src/vs/workbench/services/editor/common/editorService.ts | 4 ++-- src/vs/workbench/services/part/common/partService.ts | 2 +- src/vs/workbench/services/textfile/common/textfiles.ts | 4 ++-- .../services/untitled/common/untitledEditorService.ts | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index cc14eea9d51ab..8cead0c7d3515 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -229,7 +229,7 @@ const T5 = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/; // something/else export type ParsedPattern = (path: string, basename?: string) => boolean; -// The ParsedExpression returns a Promise iff siblingsFn returns a Promise. +// The ParsedExpression returns a Promise if siblingsFn returns a Promise. export type ParsedExpression = (path: string, basename?: string, siblingsFn?: () => string[] | TPromise) => string | TPromise /* the matching pattern */; export interface IGlobOptions { diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 2dec6f66b9cb0..2f394e6dee4f8 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -684,7 +684,7 @@ export interface ITextModel { getFullModelRange(): Range; /** - * Returns iff the model was disposed or not. + * Returns if the model was disposed or not. */ isDisposed(): boolean; @@ -1175,7 +1175,7 @@ export interface IModel extends IReadOnlyModel, IEditableTextModel, ITextModelWi onBeforeDetached(): void; /** - * Returns iff this model is attached to an editor or not. + * Returns if this model is attached to an editor or not. * @internal */ isAttachedToEditor(): boolean; diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 9bedc8ea4084e..8fff0f3d3501c 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1559,7 +1559,7 @@ declare module monaco.editor { */ getFullModelRange(): Range; /** - * Returns iff the model was disposed or not. + * Returns if the model was disposed or not. */ isDisposed(): boolean; /** diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index f49a8fe98acbd..e9db502067222 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -368,7 +368,7 @@ export interface IBaseStat { export interface IFileStat extends IBaseStat { /** - * The resource is a directory. Iff {{true}} + * The resource is a directory. if {{true}} * {{encoding}} has no meaning. */ isDirectory: boolean; diff --git a/src/vs/platform/registry/common/platform.ts b/src/vs/platform/registry/common/platform.ts index 718f886a3de13..af1f25fec71d0 100644 --- a/src/vs/platform/registry/common/platform.ts +++ b/src/vs/platform/registry/common/platform.ts @@ -19,14 +19,14 @@ export interface IRegistry { add(id: string, data: any): void; /** - * Returns true iff there is an extension with the provided id. - * @param id an extension idenifier + * Returns true if there is an extension with the provided id. + * @param id an extension identifier */ knows(id: string): boolean; /** * Returns the extension functions and properties defined by the specified key or null. - * @param id an extension idenifier + * @param id an extension identifier */ as(id: string): any; as(id: string): T; diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 843041b36463d..473099f12b811 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -17,17 +17,17 @@ export interface IWorkspaceContextService { _serviceBrand: any; /** - * Returns iff the application was opened with a workspace or not. + * Returns if the application was opened with a workspace or not. */ hasWorkspace(): boolean; /** - * Returns iff the application was opened with a folder. + * Returns if the application was opened with a folder. */ hasFolderWorkspace(): boolean; /** - * Returns iff the application was opened with a workspace that can have one or more folders. + * Returns if the application was opened with a workspace that can have one or more folders. */ hasMultiFolderWorkspace(): boolean; @@ -65,7 +65,7 @@ export interface IWorkspaceContextService { getRoot(resource: URI): URI; /** - * Returns iff the provided resource is inside the workspace or not. + * Returns if the provided resource is inside the workspace or not. */ isInsideWorkspace(resource: URI): boolean; diff --git a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts index 8ee95f6ad0a31..94a82a1a272fc 100644 --- a/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts @@ -149,7 +149,7 @@ export class ExtHostDocumentSaveParticipant extends ExtHostDocumentSaveParticipa } } - // apply edits iff any and iff document + // apply edits if any and if document // didn't change somehow in the meantime if (edits.length === 0) { return undefined; diff --git a/src/vs/workbench/common/actionRegistry.ts b/src/vs/workbench/common/actionRegistry.ts index 640dba79e8237..a0bf5f60f84fb 100644 --- a/src/vs/workbench/common/actionRegistry.ts +++ b/src/vs/workbench/common/actionRegistry.ts @@ -49,12 +49,12 @@ export interface IWorkbenchActionRegistry { getWorkbenchActions(): SyncActionDescriptor[]; /** - * Returns the alias associated with the given action or null iff none. + * Returns the alias associated with the given action or null if none. */ getAlias(actionId: string): string; /** - * Returns the category for the given action or null iff none. + * Returns the category for the given action or null if none. */ getCategory(actionId: string): string; } diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts index 2ecbc3150fb58..beb5ba5dea2b4 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts @@ -32,7 +32,7 @@ export class SnippetsTracker implements IWorkbenchContribution { this._toDispose = []; // Whenever a mode is being created check if a snippet file exists - // and iff so read all snippets from it. + // and if so read all snippets from it. this._toDispose.push(modeService.onDidCreateMode(mode => { const snippetPath = join(this._snippetFolder, `${mode.getId()}.json`); fileExists(snippetPath) diff --git a/src/vs/workbench/services/editor/common/editorService.ts b/src/vs/workbench/services/editor/common/editorService.ts index 5381c9de4e793..05f2ae36cc29f 100644 --- a/src/vs/workbench/services/editor/common/editorService.ts +++ b/src/vs/workbench/services/editor/common/editorService.ts @@ -36,9 +36,9 @@ export interface IWorkbenchEditorService extends IEditorService { getVisibleEditors(): IEditor[]; /** - * Returns iff the provided input is currently visible. + * Returns if the provided input is currently visible. * - * @param includeDiff iff set to true, will also consider diff editors to find out if the provided + * @param includeDiff if set to true, will also consider diff editors to find out if the provided * input is opened either on the left or right hand side of the diff editor. */ isVisible(input: IEditorInput, includeDiff: boolean): boolean; diff --git a/src/vs/workbench/services/part/common/partService.ts b/src/vs/workbench/services/part/common/partService.ts index c1fd22b2dc7d4..4e41c5df51c4f 100644 --- a/src/vs/workbench/services/part/common/partService.ts +++ b/src/vs/workbench/services/part/common/partService.ts @@ -67,7 +67,7 @@ export interface IPartService { getContainer(part: Parts): HTMLElement; /** - * Returns iff the part is visible. + * Returns if the part is visible. */ isVisible(part: Parts): boolean; diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index 29933972ac85f..dc892cb33b0ef 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -266,7 +266,7 @@ export interface ITextFileService extends IDisposable { * Saves the resource. * * @param resource the resource to save - * @return true iff the resource was saved. + * @return true if the resource was saved. */ save(resource: URI, options?: ISaveOptions): TPromise; @@ -274,7 +274,7 @@ export interface ITextFileService extends IDisposable { * Saves the provided resource asking the user for a file name. * * @param resource the resource to save as. - * @return true iff the file was saved. + * @return true if the file was saved. */ saveAs(resource: URI, targetResource?: URI): TPromise; diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index ab49aacd62d8f..ae215cb923f05 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -62,7 +62,7 @@ export interface IUntitledEditorService { getDirty(resources?: URI[]): URI[]; /** - * Returns true iff the provided resource is dirty. + * Returns true if the provided resource is dirty. */ isDirty(resource: URI): boolean; From 990d86057a24c905ef4e2fc6f656dab0219895c2 Mon Sep 17 00:00:00 2001 From: hikerpig Date: Mon, 14 Aug 2017 16:41:34 +0800 Subject: [PATCH 2/2] Keep 'iff' in comment if it means *if and only if* --- src/vs/base/common/glob.ts | 2 +- src/vs/platform/registry/common/platform.ts | 2 +- .../parts/snippets/electron-browser/snippetsTracker.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index 8cead0c7d3515..cc14eea9d51ab 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -229,7 +229,7 @@ const T5 = /^([\w\.-]+(\/[\w\.-]+)*)\/?$/; // something/else export type ParsedPattern = (path: string, basename?: string) => boolean; -// The ParsedExpression returns a Promise if siblingsFn returns a Promise. +// The ParsedExpression returns a Promise iff siblingsFn returns a Promise. export type ParsedExpression = (path: string, basename?: string, siblingsFn?: () => string[] | TPromise) => string | TPromise /* the matching pattern */; export interface IGlobOptions { diff --git a/src/vs/platform/registry/common/platform.ts b/src/vs/platform/registry/common/platform.ts index af1f25fec71d0..5ddc3f336bc0f 100644 --- a/src/vs/platform/registry/common/platform.ts +++ b/src/vs/platform/registry/common/platform.ts @@ -19,7 +19,7 @@ export interface IRegistry { add(id: string, data: any): void; /** - * Returns true if there is an extension with the provided id. + * Returns true iff there is an extension with the provided id. * @param id an extension identifier */ knows(id: string): boolean; diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts index beb5ba5dea2b4..2ecbc3150fb58 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts @@ -32,7 +32,7 @@ export class SnippetsTracker implements IWorkbenchContribution { this._toDispose = []; // Whenever a mode is being created check if a snippet file exists - // and if so read all snippets from it. + // and iff so read all snippets from it. this._toDispose.push(modeService.onDidCreateMode(mode => { const snippetPath = join(this._snippetFolder, `${mode.getId()}.json`); fileExists(snippetPath)