Skip to content

Commit

Permalink
Add deprecated support to SuggestDataDto
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranayub committed Jul 24, 2019
1 parent 895d632 commit 87ae3a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,13 @@ declare module 'vscode' {

//#region Deprecated support

export interface CompletionItem {
/**
* Indicates if this item is deprecated.
*/
deprecated?: boolean;
}

export enum DiagnosticTag {
/**
* Deprecated or obsolete code
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
commitCharacters: data.k,
additionalTextEdits: data.l,
command: data.m,
deprecated: data.n,
// not-standard
_id: data.x,
};
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/common/extHost.protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ export interface SuggestDataDto {
k/* commitCharacters */?: string[];
l/* additionalTextEdits */?: ISingleEditOperation[];
m/* command */?: modes.Command;
n/* deprecated */?: boolean;
// not-standard
x?: ChainedCacheId;
}
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/api/common/extHostLanguageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ class SuggestAdapter {
k: item.commitCharacters,
l: item.additionalTextEdits && item.additionalTextEdits.map(typeConvert.TextEdit.from),
m: this._commands.toInternal(item.command, disposables),
n: item.deprecated
};

// 'insertText'-logic
Expand Down

0 comments on commit 87ae3a3

Please sign in to comment.