Cannot distinguish editor in output pane from the other editors (fixes #2368)

This commit is contained in:
Benjamin Pasero 2016-01-28 15:44:20 +01:00
parent 11f7b14e98
commit 90a863de88
4 changed files with 24 additions and 2 deletions

View file

@ -137,6 +137,12 @@ export class StringEditor extends BaseTextEditor {
options.readOnly = isReadonly;
if (isReadonly) {
options.ariaLabel = nls.localize('readonlyEditorAriaLabel', "Readonly text editor");
} else {
options.ariaLabel = nls.localize('untitledFileEditorAriaLabel', "Untitled file text editor");
}
return options;
}

View file

@ -209,6 +209,12 @@ export class TextDiffEditor extends BaseTextEditor {
let readOnly = modifiedInput instanceof StringEditorInput || modifiedInput instanceof ResourceEditorInput;
options.readOnly = readOnly;
if (readOnly) {
options.ariaLabel = nls.localize('readonlyEditorAriaLabel', "Readonly text diff editor");
} else {
options.ariaLabel = nls.localize('editableEditorAriaLabel', "Text diff editor");
}
}
return options;

View file

@ -12,6 +12,7 @@ import labels = require('vs/base/common/labels');
import types = require('vs/base/common/types');
import paths = require('vs/base/common/paths');
import {Action} from 'vs/base/common/actions';
import {IEditorOptions} from 'vs/editor/common/editorCommon';
import {VIEWLET_ID, TEXT_FILE_EDITOR_ID, ITextFileService} from 'vs/workbench/parts/files/common/files';
import {SaveErrorHandler} from 'vs/workbench/parts/files/browser/saveErrorHandler';
import {BaseTextEditor} from 'vs/workbench/browser/parts/editor/textEditor';
@ -253,6 +254,13 @@ export class TextFileEditor extends BaseTextEditor {
return true; // in any case we handled it
}
protected getCodeEditorOptions(): IEditorOptions {
let options = super.getCodeEditorOptions();
options.ariaLabel = nls.localize('fileEditorAriaLabel', "Text file editor");
return options;
}
public supportsSplitEditor(): boolean {
return true; // yes, we can!
}

View file

@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import nls = require('vs/nls');
import lifecycle = require('vs/base/common/lifecycle');
import {TPromise} from 'vs/base/common/winjs.base';
import {Action, IAction} from 'vs/base/common/actions';
@ -75,10 +76,11 @@ export class OutputPanel extends StringEditor {
protected getCodeEditorOptions(): IEditorOptions {
const options = super.getCodeEditorOptions();
options.wrappingColumn = 0; // all log editors wrap
options.lineNumbers = false; // all log editors hide line numbers
options.wrappingColumn = 0; // all output editors wrap
options.lineNumbers = false; // all output editors hide line numbers
options.glyphMargin = false;
options.lineDecorationsWidth = 20;
options.ariaLabel = nls.localize('outputEditorAriaLabel', "Output panel");
return options;
}