mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
debt - string editor => text resource editor
This commit is contained in:
@@ -14,7 +14,7 @@ import { StatusbarItemDescriptor, StatusbarAlignment, IStatusbarRegistry, Extens
|
||||
import { EditorDescriptor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
||||
import { EditorInput, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory, SideBySideEditorInput } from 'vs/workbench/common/editor';
|
||||
import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput';
|
||||
import { StringEditor } from 'vs/workbench/browser/parts/editor/stringEditor';
|
||||
import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor';
|
||||
import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor';
|
||||
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
|
||||
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
|
||||
@@ -44,10 +44,10 @@ import * as editorCommands from 'vs/workbench/browser/parts/editor/editorCommand
|
||||
// Register String Editor
|
||||
Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
|
||||
new EditorDescriptor(
|
||||
StringEditor.ID,
|
||||
TextResourceEditor.ID,
|
||||
nls.localize('textEditor', "Text Editor"),
|
||||
'vs/workbench/browser/parts/editor/stringEditor',
|
||||
'StringEditor'
|
||||
'vs/workbench/browser/parts/editor/textResourceEditor',
|
||||
'TextResourceEditor'
|
||||
),
|
||||
[
|
||||
new SyncDescriptor(StringEditorInput),
|
||||
|
||||
@@ -24,12 +24,12 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile
|
||||
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
|
||||
|
||||
/**
|
||||
* An editor implementation that is capable of showing string inputs or promise inputs that resolve to a string.
|
||||
* Uses the TextEditor widget to show the contents.
|
||||
* An editor implementation that is capable of showing the contents of resource inputs. Uses
|
||||
* the TextEditor widget to show the contents.
|
||||
*/
|
||||
export class StringEditor extends BaseTextEditor {
|
||||
export class TextResourceEditor extends BaseTextEditor {
|
||||
|
||||
public static ID = 'workbench.editors.stringEditor';
|
||||
public static ID = 'workbench.editors.textResourceEditor';
|
||||
|
||||
constructor(
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@@ -41,7 +41,7 @@ export class StringEditor extends BaseTextEditor {
|
||||
@IEditorGroupService private editorGroupService: IEditorGroupService,
|
||||
@ITextFileService textFileService: ITextFileService
|
||||
) {
|
||||
super(StringEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService);
|
||||
super(TextResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService);
|
||||
|
||||
this.toUnbind.push(this.untitledEditorService.onDidChangeDirty(e => this.onUntitledDirtyChange(e)));
|
||||
}
|
||||
Reference in New Issue
Block a user