提交 7a7e566e 编写于 作者: M Matt Bierner

Mark ids readonly

上级 7f2cdefd
......@@ -22,7 +22,7 @@ import { IModelDecorationsChangeAccessor } from 'vs/editor/common/model';
export class CodeLensContribution implements editorCommon.IEditorContribution {
private static ID: string = 'css.editor.codeLens';
private static readonly ID: string = 'css.editor.codeLens';
private _isEnabled: boolean;
......
......@@ -21,7 +21,7 @@ const MAX_DECORATORS = 500;
export class ColorDetector implements IEditorContribution {
private static ID: string = 'editor.contrib.colorDetector';
private static readonly ID: string = 'editor.contrib.colorDetector';
static RECOMPUTE_TIME = 1000; // ms
......
......@@ -130,7 +130,7 @@ class LinkOccurrence {
class LinkDetector implements editorCommon.IEditorContribution {
private static ID: string = 'editor.linkDetector';
private static readonly ID: string = 'editor.linkDetector';
public static get(editor: ICodeEditor): LinkDetector {
return editor.getContribution<LinkDetector>(LinkDetector.ID);
......
......@@ -77,7 +77,7 @@ class AcceptOnCharacterOracle {
export class SuggestController implements IEditorContribution {
private static ID: string = 'editor.contrib.suggestController';
private static readonly ID: string = 'editor.contrib.suggestController';
public static get(editor: ICodeEditor): SuggestController {
return editor.getContribution<SuggestController>(SuggestController.ID);
......
......@@ -343,7 +343,7 @@ export interface ISelectedSuggestion {
export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>, IDisposable {
private static ID: string = 'editor.widget.suggestWidget';
private static readonly ID: string = 'editor.widget.suggestWidget';
static LOADING_MESSAGE: string = nls.localize('suggestWidget.loading', "Loading...");
static NO_SUGGESTIONS_MESSAGE: string = nls.localize('suggestWidget.noSuggestions', "No suggestions.");
......
......@@ -21,7 +21,7 @@ import { IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/br
export class SideBySideEditor extends BaseEditor {
public static ID: string = 'workbench.editor.sidebysideEditor';
public static readonly ID: string = 'workbench.editor.sidebysideEditor';
private dimension: Dimension;
......
......@@ -355,7 +355,7 @@ export interface IFileEditorInput extends IEditorInput, IEncodingSupport {
*/
export class SideBySideEditorInput extends EditorInput {
public static ID: string = 'workbench.editorinputs.sidebysideEditorInput';
public static readonly ID: string = 'workbench.editorinputs.sidebysideEditorInput';
private _toUnbind: IDisposable[];
......
......@@ -18,7 +18,7 @@ import { DataUri } from 'vs/workbench/common/resources';
*/
export class DataUriEditorInput extends EditorInput {
static ID: string = 'workbench.editors.dataUriEditorInput';
static readonly ID: string = 'workbench.editors.dataUriEditorInput';
private resource: URI;
private name: string;
......
......@@ -19,7 +19,7 @@ import { IHashService } from 'vs/workbench/services/hash/common/hashService';
*/
export class ResourceEditorInput extends EditorInput {
static ID: string = 'workbench.editors.resourceEditorInput';
static readonly ID: string = 'workbench.editors.resourceEditorInput';
private modelReference: TPromise<IReference<ITextEditorModel>>;
private resource: URI;
......
......@@ -29,7 +29,7 @@ import { IHashService } from 'vs/workbench/services/hash/common/hashService';
*/
export class UntitledEditorInput extends EditorInput implements IEncodingSupport {
public static ID: string = 'workbench.editors.untitledEditorInput';
public static readonly ID: string = 'workbench.editors.untitledEditorInput';
private _hasAssociatedFilePath: boolean;
private cachedModel: UntitledEditorModel;
......
......@@ -150,7 +150,7 @@ interface ILayoutParticipant {
export class ExtensionEditor extends BaseEditor {
static ID: string = 'workbench.editor.extension';
static readonly ID: string = 'workbench.editor.extension';
private icon: HTMLImageElement;
private name: HTMLElement;
......
......@@ -88,7 +88,7 @@ interface IRuntimeExtension {
export class RuntimeExtensionsEditor extends BaseEditor {
static ID: string = 'workbench.editor.runtimeExtensions';
static readonly ID: string = 'workbench.editor.runtimeExtensions';
private _list: WorkbenchList<IRuntimeExtension>;
private _profileInfo: IExtensionHostProfile;
......
......@@ -25,7 +25,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
export class EmptyView extends ViewsViewletPanel {
public static ID: string = 'workbench.explorer.emptyView';
public static readonly ID: string = 'workbench.explorer.emptyView';
public static readonly NAME = nls.localize('noWorkspace', "No Folder Opened");
private button: Button;
......
......@@ -51,7 +51,7 @@ export interface IExplorerViewOptions extends IViewletViewOptions {
export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView {
public static ID: string = 'workbench.explorer.fileView';
public static readonly ID: string = 'workbench.explorer.fileView';
private static readonly EXPLORER_FILE_CHANGES_REACT_DELAY = 500; // delay in ms to react to file changes to give our internal events a chance to react first
private static readonly EXPLORER_FILE_CHANGES_REFRESH_DELAY = 100; // delay in ms to refresh the explorer from disk file changes
......
......@@ -34,7 +34,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace
*/
export class HtmlPreviewPart extends WebviewEditor {
static ID: string = 'workbench.editor.htmlPreviewPart';
static readonly ID: string = 'workbench.editor.htmlPreviewPart';
static class: string = 'htmlPreviewPart';
private _webviewDisposables: IDisposable[];
......
......@@ -64,7 +64,7 @@ export class CollapseAllAction extends TreeCollapseAction {
export class FilterAction extends Action {
public static ID: string = 'workbench.actions.problems.filter';
public static readonly ID: string = 'workbench.actions.problems.filter';
constructor() {
super(FilterAction.ID, Messages.MARKERS_PANEL_ACTION_TOOLTIP_FILTER, 'markers-panel-action-filter', true);
......
......@@ -46,7 +46,7 @@ let $ = DOM.$;
export class KeybindingsEditorInput extends EditorInput {
public static ID: string = 'workbench.input.keybindings';
public static readonly ID: string = 'workbench.input.keybindings';
public readonly keybindingsModel: KeybindingsEditorModel;
constructor( @IInstantiationService instantiationService: IInstantiationService) {
......@@ -73,7 +73,7 @@ export class KeybindingsEditorInput extends EditorInput {
export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor {
public static ID: string = 'workbench.editor.keybindings';
public static readonly ID: string = 'workbench.editor.keybindings';
private keybindingsEditorModel: KeybindingsEditorModel;
......
......@@ -64,7 +64,7 @@ import { IProgressService } from 'vs/platform/progress/common/progress';
import { ILogService } from 'vs/platform/log/common/log';
export class PreferencesEditorInput extends SideBySideEditorInput {
public static ID: string = 'workbench.editorinputs.preferencesEditorInput';
public static readonly ID: string = 'workbench.editorinputs.preferencesEditorInput';
getTypeId(): string {
return PreferencesEditorInput.ID;
......@@ -105,7 +105,7 @@ export class DefaultPreferencesEditorInput extends ResourceEditorInput {
export class PreferencesEditor extends BaseEditor {
public static ID: string = 'workbench.editor.preferencesEditor';
public static readonly ID: string = 'workbench.editor.preferencesEditor';
private defaultSettingsEditorContextKey: IContextKey<boolean>;
private focusSettingsContextKey: IContextKey<boolean>;
......@@ -974,7 +974,7 @@ class SideBySidePreferencesWidget extends Widget {
export class DefaultPreferencesEditor extends BaseTextEditor {
public static ID: string = 'workbench.editor.defaultPreferences';
public static readonly ID: string = 'workbench.editor.defaultPreferences';
constructor(
@ITelemetryService telemetryService: ITelemetryService,
......@@ -1150,7 +1150,7 @@ abstract class AbstractSettingsEditorContribution extends Disposable implements
class DefaultSettingsEditorContribution extends AbstractSettingsEditorContribution implements ISettingsEditorContribution {
static ID: string = 'editor.contrib.defaultsettings';
static readonly ID: string = 'editor.contrib.defaultsettings';
getId(): string {
return DefaultSettingsEditorContribution.ID;
......@@ -1171,7 +1171,7 @@ class DefaultSettingsEditorContribution extends AbstractSettingsEditorContributi
class SettingsEditorContribution extends AbstractSettingsEditorContribution implements ISettingsEditorContribution {
static ID: string = 'editor.contrib.settings';
static readonly ID: string = 'editor.contrib.settings';
constructor(editor: ICodeEditor,
@IInstantiationService instantiationService: IInstantiationService,
......
......@@ -297,7 +297,7 @@ export abstract class SearchAction extends Action {
export class RefreshAction extends SearchAction {
static ID: string = 'search.action.refreshSearchResults';
static readonly ID: string = 'search.action.refreshSearchResults';
static LABEL: string = nls.localize('RefreshAction.label', "Refresh");
constructor(id: string, label: string, @IViewletService viewletService: IViewletService) {
......@@ -322,7 +322,7 @@ export class RefreshAction extends SearchAction {
export class CollapseDeepestExpandedLevelAction extends SearchAction {
static ID: string = 'search.action.collapseSearchResults';
static readonly ID: string = 'search.action.collapseSearchResults';
static LABEL: string = nls.localize('CollapseDeepestExpandedLevelAction.label', "Collapse All");
constructor(id: string, label: string, @IViewletService viewletService: IViewletService) {
......@@ -356,7 +356,7 @@ export class CollapseDeepestExpandedLevelAction extends SearchAction {
export class ClearSearchResultsAction extends SearchAction {
static ID: string = 'search.action.clearSearchResults';
static readonly ID: string = 'search.action.clearSearchResults';
static LABEL: string = nls.localize('ClearSearchResultsAction.label', "Clear");
constructor(id: string, label: string, @IViewletService viewletService: IViewletService) {
......@@ -381,7 +381,7 @@ export class ClearSearchResultsAction extends SearchAction {
export class CancelSearchAction extends SearchAction {
static ID: string = 'search.action.cancelSearch';
static readonly ID: string = 'search.action.cancelSearch';
static LABEL: string = nls.localize('CancelSearchAction.label', "Cancel Search");
constructor(id: string, label: string, @IViewletService viewletService: IViewletService) {
......
......@@ -44,7 +44,7 @@ export interface ISearchWidgetOptions {
class ReplaceAllAction extends Action {
private static fgInstance: ReplaceAllAction = null;
public static ID: string = 'search.action.replaceAll';
public static readonly ID: string = 'search.action.replaceAll';
static get INSTANCE(): ReplaceAllAction {
if (ReplaceAllAction.fgInstance === null) {
......
......@@ -50,7 +50,7 @@ function renderBody(
export class ReleaseNotesEditor extends WebviewEditor {
static ID: string = 'workbench.editor.releaseNotes';
static readonly ID: string = 'workbench.editor.releaseNotes';
private contentDisposables: IDisposable[] = [];
private scrollYPercentage: number = 0;
......
......@@ -83,7 +83,7 @@ class WalkThroughCodeEditor extends CodeEditor {
export class WalkThroughPart extends BaseEditor {
static ID: string = 'workbench.editor.walkThroughPart';
static readonly ID: string = 'workbench.editor.walkThroughPart';
private disposables: IDisposable[] = [];
private contentDisposables: IDisposable[] = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册