Remove model.getModeId()

This commit is contained in:
Alex Dima
2017-01-05 14:56:14 +01:00
parent bb49af3316
commit badd8d1877
19 changed files with 21 additions and 51 deletions

View File

@@ -215,7 +215,7 @@ function getConfiguredLangId(modelService: IModelService, resource: uri): string
if (resource) {
const model = modelService.getModel(resource);
if (model) {
const modeId = model.getModeId();
const modeId = model.getLanguageIdentifier().language;
if (modeId && modeId !== PLAINTEXT_MODE_ID) {
configuredLangId = modeId; // only take if the mode is specific (aka no just plain text)
}

View File

@@ -526,7 +526,7 @@ export class EditorStatus implements IStatusbarItem {
const textModel = getTextModel(editorWidget);
if (textModel) {
// Compute mode
const modeId = textModel.getModeId();
const modeId = textModel.getLanguageIdentifier().language;
info = { mode: this.modeService.getLanguageName(modeId) };
}
}
@@ -736,7 +736,7 @@ export class ChangeModeAction extends Action {
// Compute mode
let currentModeId: string;
if (textModel) {
const modeId = textModel.getModeId();
const modeId = textModel.getLanguageIdentifier().language;
currentModeId = this.modeService.getLanguageName(modeId);
}