mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Rename modeId -> languageId
This commit is contained in:
@@ -1213,7 +1213,7 @@ export interface IModelAddedData {
|
||||
versionId: number;
|
||||
lines: string[];
|
||||
EOL: string;
|
||||
modeId: string;
|
||||
languageId: string;
|
||||
isDirty: boolean;
|
||||
}
|
||||
export interface ExtHostDocumentsShape {
|
||||
@@ -2082,7 +2082,7 @@ export interface ExtHostNotebookKernelsShape {
|
||||
}
|
||||
|
||||
export interface ExtHostInteractiveShape {
|
||||
$willAddInteractiveDocument(uri: UriComponents, eol: string, modeId: string, notebookUri: UriComponents): void;
|
||||
$willAddInteractiveDocument(uri: UriComponents, eol: string, languageId: string, notebookUri: UriComponents): void;
|
||||
$willRemoveInteractiveDocument(uri: UriComponents, notebookUri: UriComponents): void;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,16 +15,16 @@ import type * as vscode from 'vscode';
|
||||
import { equals } from 'vs/base/common/arrays';
|
||||
|
||||
const _modeId2WordDefinition = new Map<string, RegExp>();
|
||||
export function setWordDefinitionFor(modeId: string, wordDefinition: RegExp | undefined): void {
|
||||
export function setWordDefinitionFor(languageId: string, wordDefinition: RegExp | undefined): void {
|
||||
if (!wordDefinition) {
|
||||
_modeId2WordDefinition.delete(modeId);
|
||||
_modeId2WordDefinition.delete(languageId);
|
||||
} else {
|
||||
_modeId2WordDefinition.set(modeId, wordDefinition);
|
||||
_modeId2WordDefinition.set(languageId, wordDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
export function getWordDefinitionFor(modeId: string): RegExp | undefined {
|
||||
return _modeId2WordDefinition.get(modeId);
|
||||
export function getWordDefinitionFor(languageId: string): RegExp | undefined {
|
||||
return _modeId2WordDefinition.get(languageId);
|
||||
}
|
||||
|
||||
export class ExtHostDocumentData extends MirrorTextModel {
|
||||
|
||||
@@ -170,7 +170,7 @@ export class ExtHostDocuments implements ExtHostDocumentsShape {
|
||||
}));
|
||||
}
|
||||
|
||||
public setWordDefinitionFor(modeId: string, wordDefinition: RegExp | undefined): void {
|
||||
setWordDefinitionFor(modeId, wordDefinition);
|
||||
public setWordDefinitionFor(languageId: string, wordDefinition: RegExp | undefined): void {
|
||||
setWordDefinitionFor(languageId, wordDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
|
||||
data.lines,
|
||||
data.EOL,
|
||||
data.versionId,
|
||||
data.modeId,
|
||||
data.languageId,
|
||||
data.isDirty,
|
||||
data.notebook
|
||||
));
|
||||
|
||||
@@ -38,12 +38,12 @@ export class ExtHostInteractive implements ExtHostInteractiveShape {
|
||||
this._commands.registerApiCommand(openApiCommand);
|
||||
}
|
||||
|
||||
$willAddInteractiveDocument(uri: UriComponents, eol: string, modeId: string, notebookUri: UriComponents) {
|
||||
$willAddInteractiveDocument(uri: UriComponents, eol: string, languageId: string, notebookUri: UriComponents) {
|
||||
this._textDocumentsAndEditors.acceptDocumentsAndEditorsDelta({
|
||||
addedDocuments: [{
|
||||
EOL: eol,
|
||||
lines: [''],
|
||||
modeId: modeId,
|
||||
languageId: languageId,
|
||||
uri: uri,
|
||||
isDirty: false,
|
||||
versionId: 1,
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ExtHostCell {
|
||||
return {
|
||||
EOL: cell.eol,
|
||||
lines: cell.source,
|
||||
modeId: cell.language,
|
||||
languageId: cell.language,
|
||||
uri: cell.uri,
|
||||
isDirty: false,
|
||||
versionId: 1,
|
||||
|
||||
Reference in New Issue
Block a user