提交 df5ec01b 编写于 作者: J Johannes Rieken

rename changeLanguage to setTextDocumentLanguage, #1800

上级 67ba6a4c
...@@ -11,14 +11,18 @@ declare module 'vscode' { ...@@ -11,14 +11,18 @@ declare module 'vscode' {
export function sampleFunction(): Thenable<any>; export function sampleFunction(): Thenable<any>;
} }
//#region Joh - https://github.com/Microsoft/vscode/issues/1800
export namespace languages { export namespace languages {
/** /**
* *
*/ */
export function changeLanguage(document: TextDocument, languageId: string): Thenable<TextDocument>; export function setTextDocumentLanguage(document: TextDocument, languageId: string): Thenable<TextDocument>;
} }
//#endregion
//#region Joh - read/write in chunks //#region Joh - read/write in chunks
export interface FileSystemProvider { export interface FileSystemProvider {
......
...@@ -269,7 +269,7 @@ export function createApiFactory( ...@@ -269,7 +269,7 @@ export function createApiFactory(
getLanguages(): Thenable<string[]> { getLanguages(): Thenable<string[]> {
return extHostLanguages.getLanguages(); return extHostLanguages.getLanguages();
}, },
changeLanguage(document: vscode.TextDocument, languageId: string): Thenable<vscode.TextDocument> { setTextDocumentLanguage(document: vscode.TextDocument, languageId: string): Thenable<vscode.TextDocument> {
checkProposedApiEnabled(extension); checkProposedApiEnabled(extension);
return extHostLanguages.changeLanguage(document.uri, languageId); return extHostLanguages.changeLanguage(document.uri, languageId);
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册