提交 3fa400aa 编写于 作者: S Sandeep Somavarapu

Use a different id for log viewer editor

上级 280ca1dc
......@@ -22,6 +22,8 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService';
import { IHashService } from 'vs/workbench/services/hash/common/hashService';
import { LOG_SCHEME } from 'vs/workbench/parts/output/common/output';
export const LOG_VIEWER_EDITOR_ID = 'workbench.editors.logViewer';
export class LogViewerInput extends ResourceEditorInput {
public static readonly ID = 'workbench.editorinputs.output';
......@@ -57,6 +59,10 @@ export class LogViewer extends TextResourceEditor {
super(telemetryService, instantiationService, storageService, textResourceConfigurationService, themeService, editorGroupService, textFileService);
}
public getId(): string {
return LOG_VIEWER_EDITOR_ID;
}
protected getConfigurationOverrides(): IEditorOptions {
const options = super.getConfigurationOverrides();
options.wordWrap = 'off'; // all log viewers do not wrap
......
......@@ -19,7 +19,7 @@ import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/c
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { OutputPanel } from 'vs/workbench/parts/output/browser/outputPanel';
import { IEditorRegistry, Extensions as EditorExtensions, EditorDescriptor } from 'vs/workbench/browser/editor';
import { LogViewer, LogViewerInput } from 'vs/workbench/parts/output/browser/logViewer';
import { LogViewer, LogViewerInput, LOG_VIEWER_EDITOR_ID } from 'vs/workbench/parts/output/browser/logViewer';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
......@@ -52,7 +52,7 @@ Registry.as<PanelRegistry>(Extensions.Panels).registerPanel(new PanelDescriptor(
Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
new EditorDescriptor(
LogViewer,
LogViewer.ID,
LOG_VIEWER_EDITOR_ID,
nls.localize('logViewer', "Log Viewer")
),
[
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册