mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-21 03:36:14 +01:00
Marking a bunch of static variables as readonly
Readonly helps out with TS's type guards and is also a good best practice. Specifically, readonly strings/numbers have their literal type instead of a generic `string` | `number` type, which can help catch dead code and some common programming mistakes
This commit is contained in:
@@ -67,7 +67,7 @@ export class Gesture extends Disposable {
|
||||
|
||||
private static readonly SCROLL_FRICTION = -0.005;
|
||||
private static INSTANCE: Gesture;
|
||||
private static HOLD_DELAY = 700;
|
||||
private static readonly HOLD_DELAY = 700;
|
||||
|
||||
private dispatched = false;
|
||||
private targets: HTMLElement[];
|
||||
|
||||
@@ -238,7 +238,7 @@ class EventCollection<T> implements Collection<T> {
|
||||
|
||||
class TreeRenderer<T, TFilterData, TRef, TTemplateData> implements IListRenderer<ITreeNode<T, TFilterData>, ITreeListTemplateData<TTemplateData>> {
|
||||
|
||||
private static DefaultIndent = 8;
|
||||
private static readonly DefaultIndent = 8;
|
||||
|
||||
readonly templateId: string;
|
||||
private renderedElements = new Map<T, ITreeNode<T, TFilterData>>();
|
||||
|
||||
@@ -138,7 +138,7 @@ export class DisposableStore implements IDisposable {
|
||||
|
||||
export abstract class Disposable implements IDisposable {
|
||||
|
||||
static None = Object.freeze<IDisposable>({ dispose() { } });
|
||||
static readonly None = Object.freeze<IDisposable>({ dispose() { } });
|
||||
|
||||
private readonly _store = new DisposableStore();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ function createScopedOnMessageEvent(senderId: number, eventName: string): Event<
|
||||
|
||||
export class Server extends IPCServer {
|
||||
|
||||
private static Clients = new Map<number, IDisposable>();
|
||||
private static readonly Clients = new Map<number, IDisposable>();
|
||||
|
||||
private static getOnDidClientConnect(): Event<ClientConnectionEvent> {
|
||||
const onHello = Event.fromNodeEventEmitter<WebContents>(ipcMain, 'ipc:hello', ({ sender }) => sender);
|
||||
|
||||
@@ -32,12 +32,12 @@ export interface ISQLiteStorageDatabaseLoggingOptions {
|
||||
|
||||
export class SQLiteStorageDatabase implements IStorageDatabase {
|
||||
|
||||
static IN_MEMORY_PATH = ':memory:';
|
||||
static readonly IN_MEMORY_PATH = ':memory:';
|
||||
|
||||
get onDidChangeItemsExternal(): Event<IStorageItemsChangeEvent> { return Event.None; } // since we are the only client, there can be no external changes
|
||||
|
||||
private static BUSY_OPEN_TIMEOUT = 2000; // timeout in ms to retry when opening DB fails with SQLITE_BUSY
|
||||
private static MAX_HOST_PARAMETERS = 256; // maximum number of parameters within a statement
|
||||
private static readonly BUSY_OPEN_TIMEOUT = 2000; // timeout in ms to retry when opening DB fails with SQLITE_BUSY
|
||||
private static readonly MAX_HOST_PARAMETERS = 256; // maximum number of parameters within a statement
|
||||
|
||||
private path: string;
|
||||
private name: string;
|
||||
|
||||
@@ -398,8 +398,8 @@ function reactionEquals(one: _.IDragOverReaction, other: _.IDragOverReaction | n
|
||||
|
||||
export class TreeView extends HeightMap {
|
||||
|
||||
static BINDING = 'monaco-tree-row';
|
||||
static LOADING_DECORATION_DELAY = 800;
|
||||
static readonly BINDING = 'monaco-tree-row';
|
||||
static readonly LOADING_DECORATION_DELAY = 800;
|
||||
|
||||
private static counter: number = 0;
|
||||
private instance: number;
|
||||
|
||||
@@ -103,10 +103,10 @@ class LocalStorageCredentialsProvider implements ICredentialsProvider {
|
||||
|
||||
class PollingURLCallbackProvider extends Disposable implements IURLCallbackProvider {
|
||||
|
||||
static FETCH_INTERVAL = 500; // fetch every 500ms
|
||||
static FETCH_TIMEOUT = 5 * 60 * 1000; // ...but stop after 5min
|
||||
static readonly FETCH_INTERVAL = 500; // fetch every 500ms
|
||||
static readonly FETCH_TIMEOUT = 5 * 60 * 1000; // ...but stop after 5min
|
||||
|
||||
static QUERY_KEYS = {
|
||||
static readonly QUERY_KEYS = {
|
||||
REQUEST_ID: 'vscode-requestId',
|
||||
SCHEME: 'vscode-scheme',
|
||||
AUTHORITY: 'vscode-authority',
|
||||
|
||||
@@ -13,7 +13,7 @@ import { IBackupWorkspacesFormat } from 'vs/platform/backup/node/backup';
|
||||
export class StorageDataCleaner extends Disposable {
|
||||
|
||||
// Workspace/Folder storage names are MD5 hashes (128bits / 4 due to hex presentation)
|
||||
private static NON_EMPTY_WORKSPACE_ID_LENGTH = 128 / 4;
|
||||
private static readonly NON_EMPTY_WORKSPACE_ID_LENGTH = 128 / 4;
|
||||
|
||||
constructor(
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService
|
||||
|
||||
@@ -65,7 +65,7 @@ export interface IPointerHandlerHelper {
|
||||
|
||||
export class MouseHandler extends ViewEventHandler {
|
||||
|
||||
static MOUSE_MOVE_MINIMUM_TIME = 100; // ms
|
||||
static readonly MOUSE_MOVE_MINIMUM_TIME = 100; // ms
|
||||
|
||||
protected _context: ViewContext;
|
||||
protected viewController: ViewController;
|
||||
|
||||
@@ -66,7 +66,7 @@ interface LocalClipboardMetadata {
|
||||
* we can fetch the previous metadata.
|
||||
*/
|
||||
class LocalClipboardMetadataManager {
|
||||
public static INSTANCE = new LocalClipboardMetadataManager();
|
||||
public static readonly INSTANCE = new LocalClipboardMetadataManager();
|
||||
|
||||
private _lastState: LocalClipboardMetadata | null;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic
|
||||
|
||||
export class ViewCursors extends ViewPart {
|
||||
|
||||
static BLINK_INTERVAL = 500;
|
||||
static readonly BLINK_INTERVAL = 500;
|
||||
|
||||
private _readOnly: boolean;
|
||||
private _cursorBlinking: TextEditorCursorBlinkingStyle;
|
||||
|
||||
@@ -1562,7 +1562,7 @@ const DECORATIONS = {
|
||||
|
||||
class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEditorWidgetStyle, IVerticalSashLayoutProvider {
|
||||
|
||||
static MINIMUM_EDITOR_WIDTH = 100;
|
||||
static readonly MINIMUM_EDITOR_WIDTH = 100;
|
||||
|
||||
private _disableSash: boolean;
|
||||
private readonly _sash: Sash;
|
||||
|
||||
@@ -141,7 +141,7 @@ class AutoClosedAction {
|
||||
|
||||
export class Cursor extends viewEvents.ViewEventEmitter implements ICursors {
|
||||
|
||||
public static MAX_CURSOR_COUNT = 10000;
|
||||
public static readonly MAX_CURSOR_COUNT = 10000;
|
||||
|
||||
private readonly _onDidReachMaxCursorCount: Emitter<void> = this._register(new Emitter<void>());
|
||||
public readonly onDidReachMaxCursorCount: Event<void> = this._onDidReachMaxCursorCount.event;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
export class RGBA8 {
|
||||
_rgba8Brand: void;
|
||||
|
||||
static Empty = new RGBA8(0, 0, 0, 0);
|
||||
static readonly Empty = new RGBA8(0, 0, 0, 0);
|
||||
|
||||
/**
|
||||
* Red: integer in [0-255]
|
||||
|
||||
@@ -27,7 +27,7 @@ export class ColorDetector extends Disposable implements IEditorContribution {
|
||||
|
||||
private static readonly ID: string = 'editor.contrib.colorDetector';
|
||||
|
||||
static RECOMPUTE_TIME = 1000; // ms
|
||||
static readonly RECOMPUTE_TIME = 1000; // ms
|
||||
|
||||
private readonly _localToDispose = this._register(new DisposableStore());
|
||||
private _computePromise: CancelablePromise<IColorData[]> | null;
|
||||
|
||||
@@ -38,7 +38,7 @@ export class DragAndDropController extends Disposable implements editorCommon.IE
|
||||
private _dndDecorationIds: string[];
|
||||
private _mouseDown: boolean;
|
||||
private _modifierPressed: boolean;
|
||||
static TRIGGER_KEY_VALUE = isMacintosh ? KeyCode.Alt : KeyCode.Ctrl;
|
||||
static readonly TRIGGER_KEY_VALUE = isMacintosh ? KeyCode.Alt : KeyCode.Ctrl;
|
||||
|
||||
static get(editor: ICodeEditor): DragAndDropController {
|
||||
return editor.getContribution<DragAndDropController>(DragAndDropController.ID);
|
||||
|
||||
@@ -44,7 +44,7 @@ export class OutlineIdentityProvider implements IIdentityProvider<OutlineItem> {
|
||||
}
|
||||
|
||||
export class OutlineGroupTemplate {
|
||||
static id = 'OutlineGroupTemplate';
|
||||
static readonly id = 'OutlineGroupTemplate';
|
||||
constructor(
|
||||
readonly labelContainer: HTMLElement,
|
||||
readonly label: HighlightedLabel,
|
||||
@@ -52,7 +52,7 @@ export class OutlineGroupTemplate {
|
||||
}
|
||||
|
||||
export class OutlineElementTemplate {
|
||||
static id = 'OutlineElementTemplate';
|
||||
static readonly id = 'OutlineElementTemplate';
|
||||
constructor(
|
||||
readonly container: HTMLElement,
|
||||
readonly iconLabel: IconLabel,
|
||||
|
||||
@@ -50,7 +50,7 @@ interface FoldingStateMemento {
|
||||
|
||||
export class FoldingController extends Disposable implements IEditorContribution {
|
||||
|
||||
static MAX_FOLDING_REGIONS = 5000;
|
||||
static readonly MAX_FOLDING_REGIONS = 5000;
|
||||
|
||||
|
||||
public static get(editor: ICodeEditor): FoldingController {
|
||||
|
||||
@@ -10,18 +10,18 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
|
||||
export class FoldingDecorationProvider implements IDecorationProvider {
|
||||
|
||||
private static COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({
|
||||
private static readonly COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
||||
afterContentClassName: 'inline-folded',
|
||||
linesDecorationsClassName: 'codicon codicon-chevron-right'
|
||||
});
|
||||
|
||||
private static EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({
|
||||
private static readonly EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
||||
linesDecorationsClassName: 'codicon codicon-chevron-down'
|
||||
});
|
||||
|
||||
private static EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({
|
||||
private static readonly EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({
|
||||
stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
|
||||
linesDecorationsClassName: 'codicon codicon-chevron-down alwaysShowFoldIcons'
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution {
|
||||
|
||||
private static readonly ID = 'editor.contrib.gotodefinitionwithmouse';
|
||||
static MAX_SOURCE_PREVIEW_LINES = 8;
|
||||
static readonly MAX_SOURCE_PREVIEW_LINES = 8;
|
||||
|
||||
private readonly editor: ICodeEditor;
|
||||
private readonly toUnhook = new DisposableStore();
|
||||
|
||||
@@ -106,7 +106,7 @@ class LinkDetector implements editorCommon.IEditorContribution {
|
||||
return editor.getContribution<LinkDetector>(LinkDetector.ID);
|
||||
}
|
||||
|
||||
static RECOMPUTE_TIME = 1000; // ms
|
||||
static readonly RECOMPUTE_TIME = 1000; // ms
|
||||
|
||||
private readonly editor: ICodeEditor;
|
||||
private enabled: boolean;
|
||||
|
||||
@@ -23,7 +23,7 @@ export class MessageController extends Disposable implements editorCommon.IEdito
|
||||
|
||||
private static readonly _id = 'editor.contrib.messageController';
|
||||
|
||||
static MESSAGE_VISIBLE = new RawContextKey<boolean>('messageVisible', false);
|
||||
static readonly MESSAGE_VISIBLE = new RawContextKey<boolean>('messageVisible', false);
|
||||
|
||||
static get(editor: ICodeEditor): MessageController {
|
||||
return editor.getContribution<MessageController>(MessageController._id);
|
||||
|
||||
@@ -44,9 +44,9 @@ export class SnippetController2 implements IEditorContribution {
|
||||
return editor.getContribution<SnippetController2>('snippetController2');
|
||||
}
|
||||
|
||||
static InSnippetMode = new RawContextKey('inSnippetMode', false);
|
||||
static HasNextTabstop = new RawContextKey('hasNextTabstop', false);
|
||||
static HasPrevTabstop = new RawContextKey('hasPrevTabstop', false);
|
||||
static readonly InSnippetMode = new RawContextKey('inSnippetMode', false);
|
||||
static readonly HasNextTabstop = new RawContextKey('hasNextTabstop', false);
|
||||
static readonly HasPrevTabstop = new RawContextKey('hasPrevTabstop', false);
|
||||
|
||||
private readonly _inSnippet: IContextKey<boolean>;
|
||||
private readonly _hasNextTabstop: IContextKey<boolean>;
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ISelectedSuggestion } from './suggestWidget';
|
||||
|
||||
export class SuggestAlternatives {
|
||||
|
||||
static OtherSuggestions = new RawContextKey<boolean>('hasOtherSuggestions', false);
|
||||
static readonly OtherSuggestions = new RawContextKey<boolean>('hasOtherSuggestions', false);
|
||||
|
||||
private readonly _ckOtherSuggestions: IContextKey<boolean>;
|
||||
|
||||
|
||||
@@ -551,7 +551,7 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService {
|
||||
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private static SCHEME = 'inmemory';
|
||||
private static readonly SCHEME = 'inmemory';
|
||||
|
||||
private readonly _onDidChangeWorkspaceName = new Emitter<void>();
|
||||
public readonly onDidChangeWorkspaceName: Event<void> = this._onDidChangeWorkspaceName.event;
|
||||
|
||||
@@ -87,7 +87,7 @@ class NullContext extends Context {
|
||||
|
||||
class ConfigAwareContextValuesContainer extends Context {
|
||||
|
||||
private static _keyPrefix = 'config.';
|
||||
private static readonly _keyPrefix = 'config.';
|
||||
|
||||
private readonly _values = new Map<string, any>();
|
||||
private readonly _listener: IDisposable;
|
||||
|
||||
@@ -241,7 +241,7 @@ const enum TraceType {
|
||||
|
||||
class Trace {
|
||||
|
||||
private static _None = new class extends Trace {
|
||||
private static readonly _None = new class extends Trace {
|
||||
constructor() { super(-1, null); }
|
||||
stop() { }
|
||||
branch() { return this; }
|
||||
|
||||
@@ -127,7 +127,7 @@ export class StateService implements IStateService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private static STATE_FILE = 'storage.json';
|
||||
private static readonly STATE_FILE = 'storage.json';
|
||||
|
||||
private fileStorage: FileStorage;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ interface ISerializableItemsChangeEvent {
|
||||
|
||||
export class GlobalStorageDatabaseChannel extends Disposable implements IServerChannel {
|
||||
|
||||
private static STORAGE_CHANGE_DEBOUNCE_TIME = 100;
|
||||
private static readonly STORAGE_CHANGE_DEBOUNCE_TIME = 100;
|
||||
|
||||
private readonly _onDidChangeItems: Emitter<ISerializableItemsChangeEvent> = this._register(new Emitter<ISerializableItemsChangeEvent>());
|
||||
readonly onDidChangeItems: Event<ISerializableItemsChangeEvent> = this._onDidChangeItems.event;
|
||||
|
||||
@@ -87,7 +87,7 @@ export class StorageMainService extends Disposable implements IStorageMainServic
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private static STORAGE_NAME = 'state.vscdb';
|
||||
private static readonly STORAGE_NAME = 'state.vscdb';
|
||||
|
||||
private readonly _onDidChangeStorage: Emitter<IStorageChangeEvent> = this._register(new Emitter<IStorageChangeEvent>());
|
||||
readonly onDidChangeStorage: Event<IStorageChangeEvent> = this._onDidChangeStorage.event;
|
||||
|
||||
@@ -21,8 +21,8 @@ export class NativeStorageService extends Disposable implements IStorageService
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private static WORKSPACE_STORAGE_NAME = 'state.vscdb';
|
||||
private static WORKSPACE_META_NAME = 'workspace.json';
|
||||
private static readonly WORKSPACE_STORAGE_NAME = 'state.vscdb';
|
||||
private static readonly WORKSPACE_META_NAME = 'workspace.json';
|
||||
|
||||
private readonly _onDidChangeStorage: Emitter<IWorkspaceStorageChangeEvent> = this._register(new Emitter<IWorkspaceStorageChangeEvent>());
|
||||
readonly onDidChangeStorage: Event<IWorkspaceStorageChangeEvent> = this._onDidChangeStorage.event;
|
||||
|
||||
@@ -24,8 +24,8 @@ export interface ITelemetryServiceConfig {
|
||||
|
||||
export class TelemetryService implements ITelemetryService {
|
||||
|
||||
static IDLE_START_EVENT_NAME = 'UserIdleStart';
|
||||
static IDLE_STOP_EVENT_NAME = 'UserIdleStop';
|
||||
static readonly IDLE_START_EVENT_NAME = 'UserIdleStart';
|
||||
static readonly IDLE_STOP_EVENT_NAME = 'UserIdleStop';
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ interface IOpenFolderAPICommandOptions {
|
||||
}
|
||||
|
||||
export class OpenFolderAPICommand {
|
||||
public static ID = 'vscode.openFolder';
|
||||
public static readonly ID = 'vscode.openFolder';
|
||||
public static execute(executor: ICommandsExecutor, uri?: URI, forceNewWindow?: boolean): Promise<any>;
|
||||
public static execute(executor: ICommandsExecutor, uri?: URI, options?: IOpenFolderAPICommandOptions): Promise<any>;
|
||||
public static execute(executor: ICommandsExecutor, uri?: URI, arg: boolean | IOpenFolderAPICommandOptions = {}): Promise<any> {
|
||||
@@ -73,7 +73,7 @@ interface INewWindowAPICommandOptions {
|
||||
}
|
||||
|
||||
export class NewWindowAPICommand {
|
||||
public static ID = 'vscode.newWindow';
|
||||
public static readonly ID = 'vscode.newWindow';
|
||||
public static execute(executor: ICommandsExecutor, options?: INewWindowAPICommandOptions): Promise<any> {
|
||||
const commandOptions: IOpenEmptyWindowOptions = {
|
||||
forceReuseWindow: options && options.reuseWindow,
|
||||
@@ -94,7 +94,7 @@ CommandsRegistry.registerCommand({
|
||||
});
|
||||
|
||||
export class DiffAPICommand {
|
||||
public static ID = 'vscode.diff';
|
||||
public static readonly ID = 'vscode.diff';
|
||||
public static execute(executor: ICommandsExecutor, left: URI, right: URI, label: string, options?: vscode.TextDocumentShowOptions): Promise<any> {
|
||||
return executor.executeCommand('_workbench.diff', [
|
||||
left, right,
|
||||
@@ -108,7 +108,7 @@ export class DiffAPICommand {
|
||||
CommandsRegistry.registerCommand(DiffAPICommand.ID, adjustHandler(DiffAPICommand.execute));
|
||||
|
||||
export class OpenAPICommand {
|
||||
public static ID = 'vscode.open';
|
||||
public static readonly ID = 'vscode.open';
|
||||
public static execute(executor: ICommandsExecutor, resource: URI, columnOrOptions?: vscode.ViewColumn | vscode.TextDocumentShowOptions, label?: string): Promise<any> {
|
||||
let options: ITextEditorOptions | undefined;
|
||||
let position: EditorViewColumn | undefined;
|
||||
@@ -138,7 +138,7 @@ CommandsRegistry.registerCommand('_workbench.removeFromRecentlyOpened', function
|
||||
});
|
||||
|
||||
export class RemoveFromRecentlyOpenedAPICommand {
|
||||
public static ID = 'vscode.removeFromRecentlyOpened';
|
||||
public static readonly ID = 'vscode.removeFromRecentlyOpened';
|
||||
public static execute(executor: ICommandsExecutor, path: string | URI): Promise<any> {
|
||||
if (typeof path === 'string') {
|
||||
path = path.match(/^[^:/?#]+:\/\//) ? URI.parse(path) : URI.file(path);
|
||||
@@ -151,7 +151,7 @@ export class RemoveFromRecentlyOpenedAPICommand {
|
||||
CommandsRegistry.registerCommand(RemoveFromRecentlyOpenedAPICommand.ID, adjustHandler(RemoveFromRecentlyOpenedAPICommand.execute));
|
||||
|
||||
export class OpenIssueReporter {
|
||||
public static ID = 'vscode.openIssueReporter';
|
||||
public static readonly ID = 'vscode.openIssueReporter';
|
||||
public static execute(executor: ICommandsExecutor, extensionId: string): Promise<void> {
|
||||
return executor.executeCommand('workbench.action.openIssueReporter', [extensionId]);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ CommandsRegistry.registerCommand('_workbench.getRecentlyOpened', async function
|
||||
});
|
||||
|
||||
export class SetEditorLayoutAPICommand {
|
||||
public static ID = 'vscode.setEditorLayout';
|
||||
public static readonly ID = 'vscode.setEditorLayout';
|
||||
public static execute(executor: ICommandsExecutor, layout: EditorGroupLayout): Promise<any> {
|
||||
return executor.executeCommand('layoutEditorGroups', layout);
|
||||
}
|
||||
|
||||
@@ -166,8 +166,8 @@ interface TreeNode extends IDisposable {
|
||||
|
||||
class ExtHostTreeView<T> extends Disposable {
|
||||
|
||||
private static LABEL_HANDLE_PREFIX = '0';
|
||||
private static ID_HANDLE_PREFIX = '1';
|
||||
private static readonly LABEL_HANDLE_PREFIX = '0';
|
||||
private static readonly ID_HANDLE_PREFIX = '1';
|
||||
|
||||
private readonly dataProvider: vscode.TreeDataProvider<T>;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v
|
||||
class InspectContextKeysAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.inspectContextKeys';
|
||||
static LABEL = nls.localize('inspect context keys', "Inspect Context Keys");
|
||||
static readonly LABEL = nls.localize('inspect context keys', "Inspect Context Keys");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -91,7 +91,7 @@ class InspectContextKeysAction extends Action {
|
||||
class ToggleScreencastModeAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.toggleScreencastMode';
|
||||
static LABEL = nls.localize('toggle screencast mode', "Toggle Screencast Mode");
|
||||
static readonly LABEL = nls.localize('toggle screencast mode', "Toggle Screencast Mode");
|
||||
|
||||
static disposable: IDisposable | undefined;
|
||||
|
||||
@@ -195,7 +195,7 @@ class ToggleScreencastModeAction extends Action {
|
||||
class LogStorageAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.logStorage';
|
||||
static LABEL = nls.localize({ key: 'logStorage', comment: ['A developer only action to log the contents of the storage for the current window.'] }, "Log Storage Database Contents");
|
||||
static readonly LABEL = nls.localize({ key: 'logStorage', comment: ['A developer only action to log the contents of the storage for the current window.'] }, "Log Storage Database Contents");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -396,7 +396,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
export class ToggleMenuBarAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.toggleMenuBar';
|
||||
static LABEL = nls.localize('toggleMenuBar', "Toggle Menu Bar");
|
||||
static readonly LABEL = nls.localize('toggleMenuBar', "Toggle Menu Bar");
|
||||
|
||||
private static readonly menuBarVisibilityKey = 'window.menuBarVisibility';
|
||||
|
||||
@@ -446,7 +446,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
|
||||
|
||||
export abstract class BaseResizeViewAction extends Action {
|
||||
|
||||
protected static RESIZE_INCREMENT = 6.5; // This is a media-size percentage
|
||||
protected static readonly RESIZE_INCREMENT = 6.5; // This is a media-size percentage
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -193,7 +193,7 @@ class QuickOpenRecentAction extends BaseOpenRecentAction {
|
||||
class ToggleFullScreenAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.toggleFullScreen';
|
||||
static LABEL = nls.localize('toggleFullScreen', "Toggle Full Screen");
|
||||
static readonly LABEL = nls.localize('toggleFullScreen', "Toggle Full Screen");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -211,7 +211,7 @@ class ToggleFullScreenAction extends Action {
|
||||
export class ReloadWindowAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.reloadWindow';
|
||||
static LABEL = nls.localize('reloadWindow', "Reload Window");
|
||||
static readonly LABEL = nls.localize('reloadWindow', "Reload Window");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -249,7 +249,7 @@ class ShowAboutDialogAction extends Action {
|
||||
export class NewWindowAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.newWindow';
|
||||
static LABEL = nls.localize('newWindow', "New Window");
|
||||
static readonly LABEL = nls.localize('newWindow', "New Window");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -26,7 +26,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/
|
||||
export class OpenFileAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.files.openFile';
|
||||
static LABEL = nls.localize('openFile', "Open File...");
|
||||
static readonly LABEL = nls.localize('openFile', "Open File...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -44,7 +44,7 @@ export class OpenFileAction extends Action {
|
||||
export class OpenFolderAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.files.openFolder';
|
||||
static LABEL = nls.localize('openFolder', "Open Folder...");
|
||||
static readonly LABEL = nls.localize('openFolder', "Open Folder...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -62,7 +62,7 @@ export class OpenFolderAction extends Action {
|
||||
export class OpenFileFolderAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.files.openFileFolder';
|
||||
static LABEL = nls.localize('openFileFolder', "Open...");
|
||||
static readonly LABEL = nls.localize('openFileFolder', "Open...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -80,7 +80,7 @@ export class OpenFileFolderAction extends Action {
|
||||
export class OpenWorkspaceAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.openWorkspace';
|
||||
static LABEL = nls.localize('openWorkspaceAction', "Open Workspace...");
|
||||
static readonly LABEL = nls.localize('openWorkspaceAction', "Open Workspace...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -98,7 +98,7 @@ export class OpenWorkspaceAction extends Action {
|
||||
export class CloseWorkspaceAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.closeFolder';
|
||||
static LABEL = nls.localize('closeWorkspace', "Close Workspace");
|
||||
static readonly LABEL = nls.localize('closeWorkspace', "Close Workspace");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -150,7 +150,7 @@ export class OpenWorkspaceConfigFileAction extends Action {
|
||||
export class AddRootFolderAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.addRootFolder';
|
||||
static LABEL = ADD_ROOT_FOLDER_LABEL;
|
||||
static readonly LABEL = ADD_ROOT_FOLDER_LABEL;
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -168,7 +168,7 @@ export class AddRootFolderAction extends Action {
|
||||
export class GlobalRemoveRootFolderAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.removeRootFolder';
|
||||
static LABEL = nls.localize('globalRemoveFolderFromWorkspace', "Remove Folder from Workspace...");
|
||||
static readonly LABEL = nls.localize('globalRemoveFolderFromWorkspace', "Remove Folder from Workspace...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -226,7 +226,7 @@ class SwitchSideBarViewAction extends Action {
|
||||
export class PreviousSideBarViewAction extends SwitchSideBarViewAction {
|
||||
|
||||
static readonly ID = 'workbench.action.previousSideBarView';
|
||||
static LABEL = nls.localize('previousSideBarView', 'Previous Side Bar View');
|
||||
static readonly LABEL = nls.localize('previousSideBarView', 'Previous Side Bar View');
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -245,7 +245,7 @@ export class PreviousSideBarViewAction extends SwitchSideBarViewAction {
|
||||
export class NextSideBarViewAction extends SwitchSideBarViewAction {
|
||||
|
||||
static readonly ID = 'workbench.action.nextSideBarView';
|
||||
static LABEL = nls.localize('nextSideBarView', 'Next Side Bar View');
|
||||
static readonly LABEL = nls.localize('nextSideBarView', 'Next Side Bar View');
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -66,14 +66,14 @@ export abstract class BreadcrumbsConfig<T> {
|
||||
// internal
|
||||
}
|
||||
|
||||
static IsEnabled = BreadcrumbsConfig._stub<boolean>('breadcrumbs.enabled');
|
||||
static UseQuickPick = BreadcrumbsConfig._stub<boolean>('breadcrumbs.useQuickPick');
|
||||
static FilePath = BreadcrumbsConfig._stub<'on' | 'off' | 'last'>('breadcrumbs.filePath');
|
||||
static SymbolPath = BreadcrumbsConfig._stub<'on' | 'off' | 'last'>('breadcrumbs.symbolPath');
|
||||
static SymbolSortOrder = BreadcrumbsConfig._stub<'position' | 'name' | 'type'>('breadcrumbs.symbolSortOrder');
|
||||
static Icons = BreadcrumbsConfig._stub<boolean>('breadcrumbs.icons');
|
||||
static readonly IsEnabled = BreadcrumbsConfig._stub<boolean>('breadcrumbs.enabled');
|
||||
static readonly UseQuickPick = BreadcrumbsConfig._stub<boolean>('breadcrumbs.useQuickPick');
|
||||
static readonly FilePath = BreadcrumbsConfig._stub<'on' | 'off' | 'last'>('breadcrumbs.filePath');
|
||||
static readonly SymbolPath = BreadcrumbsConfig._stub<'on' | 'off' | 'last'>('breadcrumbs.symbolPath');
|
||||
static readonly SymbolSortOrder = BreadcrumbsConfig._stub<'position' | 'name' | 'type'>('breadcrumbs.symbolSortOrder');
|
||||
static readonly Icons = BreadcrumbsConfig._stub<boolean>('breadcrumbs.icons');
|
||||
|
||||
static FileExcludes = BreadcrumbsConfig._stub<glob.IExpression>('files.exclude');
|
||||
static readonly FileExcludes = BreadcrumbsConfig._stub<glob.IExpression>('files.exclude');
|
||||
|
||||
private static _stub<T>(name: string): { bindTo(service: IConfigurationService): BreadcrumbsConfig<T> } {
|
||||
return {
|
||||
|
||||
@@ -130,15 +130,15 @@ export interface IBreadcrumbsControlOptions {
|
||||
|
||||
export class BreadcrumbsControl {
|
||||
|
||||
static HEIGHT = 22;
|
||||
static readonly HEIGHT = 22;
|
||||
|
||||
static readonly Payload_Reveal = {};
|
||||
static readonly Payload_RevealAside = {};
|
||||
static readonly Payload_Pick = {};
|
||||
|
||||
static CK_BreadcrumbsPossible = new RawContextKey('breadcrumbsPossible', false);
|
||||
static CK_BreadcrumbsVisible = new RawContextKey('breadcrumbsVisible', false);
|
||||
static CK_BreadcrumbsActive = new RawContextKey('breadcrumbsActive', false);
|
||||
static readonly CK_BreadcrumbsPossible = new RawContextKey('breadcrumbsPossible', false);
|
||||
static readonly CK_BreadcrumbsVisible = new RawContextKey('breadcrumbsVisible', false);
|
||||
static readonly CK_BreadcrumbsActive = new RawContextKey('breadcrumbsActive', false);
|
||||
|
||||
private readonly _ckBreadcrumbsPossible: IContextKey<boolean>;
|
||||
private readonly _ckBreadcrumbsVisible: IContextKey<boolean>;
|
||||
|
||||
@@ -24,7 +24,7 @@ interface IDropOperation {
|
||||
|
||||
class DropOverlay extends Themable {
|
||||
|
||||
private static OVERLAY_ID = 'monaco-workbench-editor-drop-overlay';
|
||||
private static readonly OVERLAY_ID = 'monaco-workbench-editor-drop-overlay';
|
||||
|
||||
private container!: HTMLElement;
|
||||
private overlay!: HTMLElement;
|
||||
|
||||
@@ -26,7 +26,7 @@ import { assertAllDefined, assertIsDefined } from 'vs/base/common/types';
|
||||
|
||||
export class NotificationsCenter extends Themable {
|
||||
|
||||
private static MAX_DIMENSIONS = new Dimension(450, 400);
|
||||
private static readonly MAX_DIMENSIONS = new Dimension(450, 400);
|
||||
|
||||
private readonly _onDidChangeVisibility: Emitter<void> = this._register(new Emitter<void>());
|
||||
readonly onDidChangeVisibility: Event<void> = this._onDidChangeVisibility.event;
|
||||
|
||||
@@ -41,8 +41,8 @@ enum ToastVisibility {
|
||||
|
||||
export class NotificationsToasts extends Themable {
|
||||
|
||||
private static MAX_WIDTH = 450;
|
||||
private static MAX_NOTIFICATIONS = 3;
|
||||
private static readonly MAX_WIDTH = 450;
|
||||
private static readonly MAX_NOTIFICATIONS = 3;
|
||||
|
||||
private static PURGE_TIMEOUT: { [severity: number]: number } = (() => {
|
||||
const intervals = Object.create(null);
|
||||
|
||||
@@ -21,7 +21,7 @@ import { ActivePanelContext, PanelPositionContext } from 'vs/workbench/common/pa
|
||||
export class ClosePanelAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.closePanel';
|
||||
static LABEL = nls.localize('closePanel', "Close Panel");
|
||||
static readonly LABEL = nls.localize('closePanel', "Close Panel");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -40,7 +40,7 @@ export class ClosePanelAction extends Action {
|
||||
export class TogglePanelAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.togglePanel';
|
||||
static LABEL = nls.localize('togglePanel', "Toggle Panel");
|
||||
static readonly LABEL = nls.localize('togglePanel', "Toggle Panel");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -209,7 +209,7 @@ export class SwitchPanelViewAction extends Action {
|
||||
export class PreviousPanelViewAction extends SwitchPanelViewAction {
|
||||
|
||||
static readonly ID = 'workbench.action.previousPanelView';
|
||||
static LABEL = nls.localize('previousPanelView', 'Previous Panel View');
|
||||
static readonly LABEL = nls.localize('previousPanelView', 'Previous Panel View');
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -227,7 +227,7 @@ export class PreviousPanelViewAction extends SwitchPanelViewAction {
|
||||
export class NextPanelViewAction extends SwitchPanelViewAction {
|
||||
|
||||
static readonly ID = 'workbench.action.nextPanelView';
|
||||
static LABEL = nls.localize('nextPanelView', 'Next Panel View');
|
||||
static readonly LABEL = nls.localize('nextPanelView', 'Next Panel View');
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -323,7 +323,7 @@ class QuickInput extends Disposable implements IQuickInput {
|
||||
|
||||
class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPick<T> {
|
||||
|
||||
private static INPUT_BOX_ARIA_LABEL = localize('quickInputBox.ariaLabel', "Type to narrow down results.");
|
||||
private static readonly INPUT_BOX_ARIA_LABEL = localize('quickInputBox.ariaLabel', "Type to narrow down results.");
|
||||
|
||||
private _value = '';
|
||||
private _placeholder: string;
|
||||
@@ -762,7 +762,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
|
||||
|
||||
class InputBox extends QuickInput implements IInputBox {
|
||||
|
||||
private static noPromptMessage = localize('inputModeEntry', "Press 'Enter' to confirm your input or 'Escape' to cancel");
|
||||
private static readonly noPromptMessage = localize('inputModeEntry', "Press 'Enter' to confirm your input or 'Escape' to cancel");
|
||||
|
||||
private _value = '';
|
||||
private _valueSelection: Readonly<[number, number]>;
|
||||
|
||||
@@ -81,7 +81,7 @@ export abstract class MenubarControl extends Disposable {
|
||||
|
||||
protected menuUpdater: RunOnceScheduler;
|
||||
|
||||
protected static MAX_MENU_RECENT_ENTRIES = 10;
|
||||
protected static readonly MAX_MENU_RECENT_ENTRIES = 10;
|
||||
|
||||
constructor(
|
||||
protected readonly menuService: IMenuService,
|
||||
|
||||
@@ -46,7 +46,7 @@ export interface IViewletPanelOptions extends IPanelOptions {
|
||||
|
||||
export abstract class ViewletPanel extends Panel implements IView {
|
||||
|
||||
private static AlwaysShowActionsConfig = 'workbench.view.alwaysShowHeaderActions';
|
||||
private static readonly AlwaysShowActionsConfig = 'workbench.view.alwaysShowHeaderActions';
|
||||
|
||||
private _onDidFocus = this._register(new Emitter<void>());
|
||||
readonly onDidFocus: Event<void> = this._onDidFocus.event;
|
||||
|
||||
@@ -124,7 +124,7 @@ export class NotificationHandle implements INotificationHandle {
|
||||
|
||||
export class NotificationsModel extends Disposable implements INotificationsModel {
|
||||
|
||||
private static NO_OP_NOTIFICATION = new NoOpNotification();
|
||||
private static readonly NO_OP_NOTIFICATION = new NoOpNotification();
|
||||
|
||||
private readonly _onDidNotificationChange: Emitter<INotificationChangeEvent> = this._register(new Emitter<INotificationChangeEvent>());
|
||||
readonly onDidNotificationChange: Event<INotificationChangeEvent> = this._onDidNotificationChange.event;
|
||||
@@ -380,11 +380,11 @@ export interface INotificationMessage {
|
||||
|
||||
export class NotificationViewItem extends Disposable implements INotificationViewItem {
|
||||
|
||||
private static MAX_MESSAGE_LENGTH = 1000;
|
||||
private static readonly MAX_MESSAGE_LENGTH = 1000;
|
||||
|
||||
// Example link: "Some message with [link text](http://link.href)."
|
||||
// RegEx: [, anything not ], ], (, http://|https://|command:, no whitespace)
|
||||
private static LINK_REGEX = /\[([^\]]+)\]\(((?:https?:\/\/|command:)[^\)\s]+)(?: "([^"]+)")?\)/gi;
|
||||
private static readonly LINK_REGEX = /\[([^\]]+)\]\(((?:https?:\/\/|command:)[^\)\s]+)(?: "([^"]+)")?\)/gi;
|
||||
|
||||
private _expanded: boolean | undefined;
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
|
||||
export class ResourceContextKey extends Disposable implements IContextKey<URI> {
|
||||
|
||||
static Scheme = new RawContextKey<string>('resourceScheme', undefined);
|
||||
static Filename = new RawContextKey<string>('resourceFilename', undefined);
|
||||
static LangId = new RawContextKey<string>('resourceLangId', undefined);
|
||||
static Resource = new RawContextKey<URI>('resource', undefined);
|
||||
static Extension = new RawContextKey<string>('resourceExtname', undefined);
|
||||
static HasResource = new RawContextKey<boolean>('resourceSet', false);
|
||||
static IsFileSystemResource = new RawContextKey<boolean>('isFileSystemResource', false);
|
||||
static readonly Scheme = new RawContextKey<string>('resourceScheme', undefined);
|
||||
static readonly Filename = new RawContextKey<string>('resourceFilename', undefined);
|
||||
static readonly LangId = new RawContextKey<string>('resourceLangId', undefined);
|
||||
static readonly Resource = new RawContextKey<URI>('resource', undefined);
|
||||
static readonly Extension = new RawContextKey<string>('resourceExtname', undefined);
|
||||
static readonly HasResource = new RawContextKey<boolean>('resourceSet', false);
|
||||
static readonly IsFileSystemResource = new RawContextKey<boolean>('isFileSystemResource', false);
|
||||
|
||||
private readonly _resourceKey: IContextKey<URI | null>;
|
||||
private readonly _schemeKey: IContextKey<string | null>;
|
||||
|
||||
@@ -26,13 +26,13 @@ const _ctxCallHierarchyVisible = new RawContextKey<boolean>('callHierarchyVisibl
|
||||
|
||||
class CallHierarchyController implements IEditorContribution {
|
||||
|
||||
static Id = 'callHierarchy';
|
||||
static readonly Id = 'callHierarchy';
|
||||
|
||||
static get(editor: ICodeEditor): CallHierarchyController {
|
||||
return editor.getContribution<CallHierarchyController>(CallHierarchyController.Id);
|
||||
}
|
||||
|
||||
private static _StorageDirection = 'callHierarchy/defaultDirection';
|
||||
private static readonly _StorageDirection = 'callHierarchy/defaultDirection';
|
||||
|
||||
private readonly _ctxHasProvider: IContextKey<boolean>;
|
||||
private readonly _ctxIsVisible: IContextKey<boolean>;
|
||||
|
||||
@@ -122,7 +122,7 @@ class CallRenderingTemplate {
|
||||
|
||||
export class CallRenderer implements ITreeRenderer<Call, FuzzyScore, CallRenderingTemplate> {
|
||||
|
||||
static id = 'CallRenderer';
|
||||
static readonly id = 'CallRenderer';
|
||||
|
||||
templateId: string = CallRenderer.id;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ function isAvailable(): Promise<boolean> {
|
||||
class InstallAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.installCommandLine';
|
||||
static LABEL = nls.localize('install', "Install '{0}' command in PATH", product.applicationName);
|
||||
static readonly LABEL = nls.localize('install', "Install '{0}' command in PATH", product.applicationName);
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -122,7 +122,7 @@ class InstallAction extends Action {
|
||||
class UninstallAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.uninstallCommandLine';
|
||||
static LABEL = nls.localize('uninstall', "Uninstall '{0}' command from PATH", product.applicationName);
|
||||
static readonly LABEL = nls.localize('uninstall', "Uninstall '{0}' command from PATH", product.applicationName);
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -17,7 +17,7 @@ import { EndOfLinePreference } from 'vs/editor/common/model';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
|
||||
export class SelectionClipboard extends Disposable implements IEditorContribution {
|
||||
private static SELECTION_LENGTH_LIMIT = 65536;
|
||||
private static readonly SELECTION_LENGTH_LIMIT = 65536;
|
||||
private static readonly ID = 'editor.contrib.selectionClipboard';
|
||||
|
||||
constructor(editor: ICodeEditor, @IClipboardService clipboardService: IClipboardService) {
|
||||
|
||||
@@ -56,8 +56,8 @@ interface ICommentThreadTemplateData {
|
||||
}
|
||||
|
||||
export class CommentsModelVirualDelegate implements IListVirtualDelegate<any> {
|
||||
private static RESOURCE_ID = 'resource-with-comments';
|
||||
private static COMMENT_ID = 'comment-node';
|
||||
private static readonly RESOURCE_ID = 'resource-with-comments';
|
||||
private static readonly COMMENT_ID = 'comment-node';
|
||||
|
||||
|
||||
getHeight(element: any): number {
|
||||
|
||||
@@ -56,7 +56,7 @@ export abstract class AbstractDebugAction extends Action {
|
||||
|
||||
export class ConfigureAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.action.debug.configure';
|
||||
static LABEL = nls.localize('openLaunchJson', "Open {0}", 'launch.json');
|
||||
static readonly LABEL = nls.localize('openLaunchJson', "Open {0}", 'launch.json');
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IDebugService debugService: IDebugService,
|
||||
@@ -156,7 +156,7 @@ export class RunAction extends StartAction {
|
||||
|
||||
export class SelectAndStartAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.action.debug.selectandstart';
|
||||
static LABEL = nls.localize('selectAndStartDebugging', "Select and Start Debugging");
|
||||
static readonly LABEL = nls.localize('selectAndStartDebugging', "Select and Start Debugging");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IDebugService debugService: IDebugService,
|
||||
@@ -173,7 +173,7 @@ export class SelectAndStartAction extends AbstractDebugAction {
|
||||
|
||||
export class RemoveBreakpointAction extends Action {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.removeBreakpoint';
|
||||
static LABEL = nls.localize('removeBreakpoint', "Remove Breakpoint");
|
||||
static readonly LABEL = nls.localize('removeBreakpoint', "Remove Breakpoint");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService private readonly debugService: IDebugService) {
|
||||
super(id, label, 'debug-action remove');
|
||||
@@ -187,7 +187,7 @@ export class RemoveBreakpointAction extends Action {
|
||||
|
||||
export class RemoveAllBreakpointsAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.removeAllBreakpoints';
|
||||
static LABEL = nls.localize('removeAllBreakpoints', "Remove All Breakpoints");
|
||||
static readonly LABEL = nls.localize('removeAllBreakpoints', "Remove All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService);
|
||||
@@ -206,7 +206,7 @@ export class RemoveAllBreakpointsAction extends AbstractDebugAction {
|
||||
|
||||
export class EnableAllBreakpointsAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.enableAllBreakpoints';
|
||||
static LABEL = nls.localize('enableAllBreakpoints', "Enable All Breakpoints");
|
||||
static readonly LABEL = nls.localize('enableAllBreakpoints', "Enable All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action enable-all-breakpoints', debugService, keybindingService);
|
||||
@@ -225,7 +225,7 @@ export class EnableAllBreakpointsAction extends AbstractDebugAction {
|
||||
|
||||
export class DisableAllBreakpointsAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.disableAllBreakpoints';
|
||||
static LABEL = nls.localize('disableAllBreakpoints', "Disable All Breakpoints");
|
||||
static readonly LABEL = nls.localize('disableAllBreakpoints', "Disable All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action disable-all-breakpoints', debugService, keybindingService);
|
||||
@@ -244,8 +244,8 @@ export class DisableAllBreakpointsAction extends AbstractDebugAction {
|
||||
|
||||
export class ToggleBreakpointsActivatedAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.toggleBreakpointsActivatedAction';
|
||||
static ACTIVATE_LABEL = nls.localize('activateBreakpoints', "Activate Breakpoints");
|
||||
static DEACTIVATE_LABEL = nls.localize('deactivateBreakpoints', "Deactivate Breakpoints");
|
||||
static readonly ACTIVATE_LABEL = nls.localize('activateBreakpoints', "Activate Breakpoints");
|
||||
static readonly DEACTIVATE_LABEL = nls.localize('deactivateBreakpoints', "Deactivate Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action breakpoints-activate', debugService, keybindingService);
|
||||
@@ -268,7 +268,7 @@ export class ToggleBreakpointsActivatedAction extends AbstractDebugAction {
|
||||
|
||||
export class ReapplyBreakpointsAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.reapplyBreakpointsAction';
|
||||
static LABEL = nls.localize('reapplyAllBreakpoints', "Reapply All Breakpoints");
|
||||
static readonly LABEL = nls.localize('reapplyAllBreakpoints', "Reapply All Breakpoints");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, '', debugService, keybindingService);
|
||||
@@ -288,7 +288,7 @@ export class ReapplyBreakpointsAction extends AbstractDebugAction {
|
||||
|
||||
export class AddFunctionBreakpointAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.addFunctionBreakpointAction';
|
||||
static LABEL = nls.localize('addFunctionBreakpoint', "Add Function Breakpoint");
|
||||
static readonly LABEL = nls.localize('addFunctionBreakpoint', "Add Function Breakpoint");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action add-function-breakpoint', debugService, keybindingService);
|
||||
@@ -308,7 +308,7 @@ export class AddFunctionBreakpointAction extends AbstractDebugAction {
|
||||
|
||||
export class AddWatchExpressionAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.addWatchExpression';
|
||||
static LABEL = nls.localize('addWatchExpression', "Add Expression");
|
||||
static readonly LABEL = nls.localize('addWatchExpression', "Add Expression");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action add-watch-expression', debugService, keybindingService);
|
||||
@@ -329,7 +329,7 @@ export class AddWatchExpressionAction extends AbstractDebugAction {
|
||||
|
||||
export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.removeAllWatchExpressions';
|
||||
static LABEL = nls.localize('removeAllWatchExpressions', "Remove All Expressions");
|
||||
static readonly LABEL = nls.localize('removeAllWatchExpressions', "Remove All Expressions");
|
||||
|
||||
constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService) {
|
||||
super(id, label, 'debug-action remove-all', debugService, keybindingService);
|
||||
@@ -348,7 +348,7 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
|
||||
|
||||
export class FocusSessionAction extends AbstractDebugAction {
|
||||
static readonly ID = 'workbench.action.debug.focusProcess';
|
||||
static LABEL = nls.localize('focusSession', "Focus Session");
|
||||
static readonly LABEL = nls.localize('focusSession', "Focus Session");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IDebugService debugService: IDebugService,
|
||||
@@ -371,7 +371,7 @@ export class FocusSessionAction extends AbstractDebugAction {
|
||||
|
||||
export class CopyValueAction extends Action {
|
||||
static readonly ID = 'workbench.debug.viewlet.action.copyValue';
|
||||
static LABEL = nls.localize('copyValue', "Copy Value");
|
||||
static readonly LABEL = nls.localize('copyValue', "Copy Value");
|
||||
|
||||
constructor(
|
||||
id: string, label: string, private value: any, private context: string,
|
||||
|
||||
@@ -104,8 +104,8 @@ class LogPointAction extends EditorAction {
|
||||
|
||||
export class RunToCursorAction extends EditorAction {
|
||||
|
||||
public static ID = 'editor.debug.action.runToCursor';
|
||||
public static LABEL = nls.localize('runToCursor', "Run to Cursor");
|
||||
public static readonly ID = 'editor.debug.action.runToCursor';
|
||||
public static readonly LABEL = nls.localize('runToCursor', "Run to Cursor");
|
||||
|
||||
constructor() {
|
||||
super({
|
||||
|
||||
@@ -174,7 +174,7 @@ export class DebugHoverWidget implements IContentWidget {
|
||||
return this.doShow(pos, expression, focus);
|
||||
}
|
||||
|
||||
private static _HOVER_HIGHLIGHT_DECORATION_OPTIONS = ModelDecorationOptions.register({
|
||||
private static readonly _HOVER_HIGHLIGHT_DECORATION_OPTIONS = ModelDecorationOptions.register({
|
||||
className: 'hoverHighlight'
|
||||
});
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ export class DebugViewlet extends ViewContainerViewlet {
|
||||
|
||||
class ToggleReplAction extends TogglePanelAction {
|
||||
static readonly ID = 'debug.toggleRepl';
|
||||
static LABEL = nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugConsoleAction' }, 'Debug Console');
|
||||
static readonly LABEL = nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugConsoleAction' }, 'Debug Console');
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
|
||||
@@ -240,7 +240,7 @@ class RootTreeItem extends BaseTreeItem {
|
||||
|
||||
class SessionTreeItem extends BaseTreeItem {
|
||||
|
||||
private static URL_REGEXP = /^(https?:\/\/[^/]+)(\/.*)$/;
|
||||
private static readonly URL_REGEXP = /^(https?:\/\/[^/]+)(\/.*)$/;
|
||||
|
||||
private _session: IDebugSession;
|
||||
private _initialized: boolean;
|
||||
|
||||
@@ -982,7 +982,7 @@ class SelectReplActionViewItem extends FocusSessionActionViewItem {
|
||||
class SelectReplAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.debug.selectRepl';
|
||||
static LABEL = nls.localize('selectRepl', "Select Debug Console");
|
||||
static readonly LABEL = nls.localize('selectRepl', "Select Debug Console");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@@ -1005,7 +1005,7 @@ class SelectReplAction extends Action {
|
||||
|
||||
export class ClearReplAction extends Action {
|
||||
static readonly ID = 'workbench.debug.panel.action.clearReplAction';
|
||||
static LABEL = nls.localize('clearRepl', "Clear Console");
|
||||
static readonly LABEL = nls.localize('clearRepl', "Clear Console");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IPanelService private readonly panelService: IPanelService
|
||||
|
||||
@@ -27,7 +27,7 @@ import { mixin } from 'vs/base/common/objects';
|
||||
|
||||
export class ExpressionContainer implements IExpressionContainer {
|
||||
|
||||
public static allValues = new Map<string, string>();
|
||||
public static readonly allValues = new Map<string, string>();
|
||||
// Use chunks to support variable paging #9537
|
||||
private static readonly BASE_CHUNK_SIZE = 100;
|
||||
|
||||
@@ -172,7 +172,7 @@ export class ExpressionContainer implements IExpressionContainer {
|
||||
}
|
||||
|
||||
export class Expression extends ExpressionContainer implements IExpression {
|
||||
static DEFAULT_VALUE = nls.localize('notAvailable', "not available");
|
||||
static readonly DEFAULT_VALUE = nls.localize('notAvailable', "not available");
|
||||
|
||||
public available: boolean;
|
||||
|
||||
|
||||
@@ -143,8 +143,8 @@ export abstract class ExtensionAction extends Action implements IExtensionContai
|
||||
|
||||
export class InstallAction extends ExtensionAction {
|
||||
|
||||
private static INSTALL_LABEL = localize('install', "Install");
|
||||
private static INSTALLING_LABEL = localize('installing', "Installing");
|
||||
private static readonly INSTALL_LABEL = localize('install', "Install");
|
||||
private static readonly INSTALLING_LABEL = localize('installing', "Installing");
|
||||
|
||||
private static readonly Class = 'extension-action prominent install';
|
||||
private static readonly InstallingClass = 'extension-action install installing';
|
||||
@@ -277,8 +277,8 @@ export class InstallAction extends ExtensionAction {
|
||||
|
||||
export abstract class InstallInOtherServerAction extends ExtensionAction {
|
||||
|
||||
protected static INSTALL_LABEL = localize('install', "Install");
|
||||
protected static INSTALLING_LABEL = localize('installing', "Installing");
|
||||
protected static readonly INSTALL_LABEL = localize('install', "Install");
|
||||
protected static readonly INSTALLING_LABEL = localize('installing', "Installing");
|
||||
|
||||
private static readonly Class = 'extension-action prominent install';
|
||||
private static readonly InstallingClass = 'extension-action install installing';
|
||||
@@ -726,7 +726,7 @@ export class ManageExtensionAction extends ExtensionDropDownAction {
|
||||
export class InstallAnotherVersionAction extends ExtensionAction {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.install.anotherVersion';
|
||||
static LABEL = localize('install another version', "Install Another Version...");
|
||||
static readonly LABEL = localize('install another version', "Install Another Version...");
|
||||
|
||||
constructor(
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@@ -832,7 +832,7 @@ export class ExtensionSettingsAction extends ExtensionAction {
|
||||
export class EnableForWorkspaceAction extends ExtensionAction {
|
||||
|
||||
static readonly ID = 'extensions.enableForWorkspace';
|
||||
static LABEL = localize('enableForWorkspaceAction', "Enable (Workspace)");
|
||||
static readonly LABEL = localize('enableForWorkspaceAction', "Enable (Workspace)");
|
||||
|
||||
constructor(
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@@ -859,7 +859,7 @@ export class EnableForWorkspaceAction extends ExtensionAction {
|
||||
export class EnableGloballyAction extends ExtensionAction {
|
||||
|
||||
static readonly ID = 'extensions.enableGlobally';
|
||||
static LABEL = localize('enableGloballyAction', "Enable");
|
||||
static readonly LABEL = localize('enableGloballyAction', "Enable");
|
||||
|
||||
constructor(
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@@ -886,7 +886,7 @@ export class EnableGloballyAction extends ExtensionAction {
|
||||
export class DisableForWorkspaceAction extends ExtensionAction {
|
||||
|
||||
static readonly ID = 'extensions.disableForWorkspace';
|
||||
static LABEL = localize('disableForWorkspaceAction', "Disable (Workspace)");
|
||||
static readonly LABEL = localize('disableForWorkspaceAction', "Disable (Workspace)");
|
||||
|
||||
constructor(readonly runningExtensions: IExtensionDescription[],
|
||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||
@@ -914,7 +914,7 @@ export class DisableForWorkspaceAction extends ExtensionAction {
|
||||
export class DisableGloballyAction extends ExtensionAction {
|
||||
|
||||
static readonly ID = 'extensions.disableGlobally';
|
||||
static LABEL = localize('disableGloballyAction', "Disable");
|
||||
static readonly LABEL = localize('disableGloballyAction', "Disable");
|
||||
|
||||
constructor(readonly runningExtensions: IExtensionDescription[],
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@@ -1010,7 +1010,7 @@ export class DisableDropDownAction extends ExtensionEditorDropDownAction {
|
||||
export class CheckForUpdatesAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.checkForUpdates';
|
||||
static LABEL = localize('checkForUpdates', "Check for Extension Updates");
|
||||
static readonly LABEL = localize('checkForUpdates', "Check for Extension Updates");
|
||||
|
||||
constructor(
|
||||
id = CheckForUpdatesAction.ID,
|
||||
@@ -1082,7 +1082,7 @@ export class ToggleAutoUpdateAction extends Action {
|
||||
export class EnableAutoUpdateAction extends ToggleAutoUpdateAction {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.enableAutoUpdate';
|
||||
static LABEL = localize('enableAutoUpdate', "Enable Auto Updating Extensions");
|
||||
static readonly LABEL = localize('enableAutoUpdate', "Enable Auto Updating Extensions");
|
||||
|
||||
constructor(
|
||||
id = EnableAutoUpdateAction.ID,
|
||||
@@ -1096,7 +1096,7 @@ export class EnableAutoUpdateAction extends ToggleAutoUpdateAction {
|
||||
export class DisableAutoUpdateAction extends ToggleAutoUpdateAction {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.disableAutoUpdate';
|
||||
static LABEL = localize('disableAutoUpdate', "Disable Auto Updating Extensions");
|
||||
static readonly LABEL = localize('disableAutoUpdate', "Disable Auto Updating Extensions");
|
||||
|
||||
constructor(
|
||||
id = EnableAutoUpdateAction.ID,
|
||||
@@ -1110,7 +1110,7 @@ export class DisableAutoUpdateAction extends ToggleAutoUpdateAction {
|
||||
export class UpdateAllAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.updateAllExtensions';
|
||||
static LABEL = localize('updateAll', "Update All Extensions");
|
||||
static readonly LABEL = localize('updateAll', "Update All Extensions");
|
||||
|
||||
constructor(
|
||||
id = UpdateAllAction.ID,
|
||||
@@ -1417,7 +1417,7 @@ export class InstallExtensionsAction extends OpenExtensionsViewletAction {
|
||||
export class ShowEnabledExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showEnabledExtensions';
|
||||
static LABEL = localize('showEnabledExtensions', "Show Enabled Extensions");
|
||||
static readonly LABEL = localize('showEnabledExtensions', "Show Enabled Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1440,7 +1440,7 @@ export class ShowEnabledExtensionsAction extends Action {
|
||||
export class ShowInstalledExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showInstalledExtensions';
|
||||
static LABEL = localize('showInstalledExtensions', "Show Installed Extensions");
|
||||
static readonly LABEL = localize('showInstalledExtensions', "Show Installed Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1463,7 +1463,7 @@ export class ShowInstalledExtensionsAction extends Action {
|
||||
export class ShowDisabledExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showDisabledExtensions';
|
||||
static LABEL = localize('showDisabledExtensions', "Show Disabled Extensions");
|
||||
static readonly LABEL = localize('showDisabledExtensions', "Show Disabled Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1486,7 +1486,7 @@ export class ShowDisabledExtensionsAction extends Action {
|
||||
export class ClearExtensionsInputAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.clearExtensionsInput';
|
||||
static LABEL = localize('clearExtensionsInput', "Clear Extensions Input");
|
||||
static readonly LABEL = localize('clearExtensionsInput', "Clear Extensions Input");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1517,7 +1517,7 @@ export class ClearExtensionsInputAction extends Action {
|
||||
export class ShowBuiltInExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.listBuiltInExtensions';
|
||||
static LABEL = localize('showBuiltInExtensions', "Show Built-in Extensions");
|
||||
static readonly LABEL = localize('showBuiltInExtensions', "Show Built-in Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1540,7 +1540,7 @@ export class ShowBuiltInExtensionsAction extends Action {
|
||||
export class ShowOutdatedExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.listOutdatedExtensions';
|
||||
static LABEL = localize('showOutdatedExtensions', "Show Outdated Extensions");
|
||||
static readonly LABEL = localize('showOutdatedExtensions', "Show Outdated Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1563,7 +1563,7 @@ export class ShowOutdatedExtensionsAction extends Action {
|
||||
export class ShowPopularExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showPopularExtensions';
|
||||
static LABEL = localize('showPopularExtensions', "Show Popular Extensions");
|
||||
static readonly LABEL = localize('showPopularExtensions', "Show Popular Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1586,7 +1586,7 @@ export class ShowPopularExtensionsAction extends Action {
|
||||
export class ShowRecommendedExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showRecommendedExtensions';
|
||||
static LABEL = localize('showRecommendedExtensions', "Show Recommended Extensions");
|
||||
static readonly LABEL = localize('showRecommendedExtensions', "Show Recommended Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1609,7 +1609,7 @@ export class ShowRecommendedExtensionsAction extends Action {
|
||||
export class InstallWorkspaceRecommendedExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.installWorkspaceRecommendedExtensions';
|
||||
static LABEL = localize('installWorkspaceRecommendedExtensions', "Install All Workspace Recommended Extensions");
|
||||
static readonly LABEL = localize('installWorkspaceRecommendedExtensions', "Install All Workspace Recommended Extensions");
|
||||
|
||||
private _recommendations: IExtensionRecommendation[] = [];
|
||||
get recommendations(): IExtensionRecommendation[] { return this._recommendations; }
|
||||
@@ -1674,7 +1674,7 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action {
|
||||
export class InstallRecommendedExtensionAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.installRecommendedExtension';
|
||||
static LABEL = localize('installRecommendedExtension', "Install Recommended Extension");
|
||||
static readonly LABEL = localize('installRecommendedExtension', "Install Recommended Extension");
|
||||
|
||||
private extensionId: string;
|
||||
|
||||
@@ -1765,7 +1765,7 @@ export class UndoIgnoreExtensionRecommendationAction extends Action {
|
||||
export class ShowRecommendedKeymapExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showRecommendedKeymapExtensions';
|
||||
static SHORT_LABEL = localize('showRecommendedKeymapExtensionsShort', "Keymaps");
|
||||
static readonly SHORT_LABEL = localize('showRecommendedKeymapExtensionsShort', "Keymaps");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1788,7 +1788,7 @@ export class ShowRecommendedKeymapExtensionsAction extends Action {
|
||||
export class ShowLanguageExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showLanguageExtensions';
|
||||
static SHORT_LABEL = localize('showLanguageExtensionsShort', "Language Extensions");
|
||||
static readonly SHORT_LABEL = localize('showLanguageExtensionsShort', "Language Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -1811,7 +1811,7 @@ export class ShowLanguageExtensionsAction extends Action {
|
||||
export class ShowAzureExtensionsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.showAzureExtensions';
|
||||
static SHORT_LABEL = localize('showAzureExtensionsShort', "Azure Extensions");
|
||||
static readonly SHORT_LABEL = localize('showAzureExtensionsShort', "Azure Extensions");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -2153,7 +2153,7 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio
|
||||
export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfigureRecommendedExtensionsAction {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.configureWorkspaceRecommendedExtensions';
|
||||
static LABEL = localize('configureWorkspaceRecommendedExtensions', "Configure Recommended Extensions (Workspace)");
|
||||
static readonly LABEL = localize('configureWorkspaceRecommendedExtensions', "Configure Recommended Extensions (Workspace)");
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -2189,7 +2189,7 @@ export class ConfigureWorkspaceRecommendedExtensionsAction extends AbstractConfi
|
||||
export class ConfigureWorkspaceFolderRecommendedExtensionsAction extends AbstractConfigureRecommendedExtensionsAction {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.configureWorkspaceFolderRecommendedExtensions';
|
||||
static LABEL = localize('configureWorkspaceFolderRecommendedExtensions', "Configure Recommended Extensions (Workspace Folder)");
|
||||
static readonly LABEL = localize('configureWorkspaceFolderRecommendedExtensions', "Configure Recommended Extensions (Workspace Folder)");
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -2662,7 +2662,7 @@ export class SystemDisabledWarningAction extends ExtensionAction {
|
||||
export class DisableAllAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.disableAll';
|
||||
static LABEL = localize('disableAll', "Disable All Installed Extensions");
|
||||
static readonly LABEL = localize('disableAll', "Disable All Installed Extensions");
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -2687,7 +2687,7 @@ export class DisableAllAction extends Action {
|
||||
export class DisableAllWorkspaceAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.disableAllWorkspace';
|
||||
static LABEL = localize('disableAllWorkspace', "Disable All Installed Extensions for this Workspace");
|
||||
static readonly LABEL = localize('disableAllWorkspace', "Disable All Installed Extensions for this Workspace");
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -2714,7 +2714,7 @@ export class DisableAllWorkspaceAction extends Action {
|
||||
export class EnableAllAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.enableAll';
|
||||
static LABEL = localize('enableAll', "Enable All Extensions");
|
||||
static readonly LABEL = localize('enableAll', "Enable All Extensions");
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -2739,7 +2739,7 @@ export class EnableAllAction extends Action {
|
||||
export class EnableAllWorkspaceAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.enableAllWorkspace';
|
||||
static LABEL = localize('enableAllWorkspace', "Enable All Extensions for this Workspace");
|
||||
static readonly LABEL = localize('enableAllWorkspace', "Enable All Extensions for this Workspace");
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -2766,7 +2766,7 @@ export class EnableAllWorkspaceAction extends Action {
|
||||
export class InstallVSIXAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.installVSIX';
|
||||
static LABEL = localize('installVSIX', "Install from VSIX...");
|
||||
static readonly LABEL = localize('installVSIX', "Install from VSIX...");
|
||||
|
||||
constructor(
|
||||
id = InstallVSIXAction.ID,
|
||||
@@ -2818,7 +2818,7 @@ export class InstallVSIXAction extends Action {
|
||||
export class ReinstallAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.reinstall';
|
||||
static LABEL = localize('reinstall', "Reinstall Extension...");
|
||||
static readonly LABEL = localize('reinstall', "Reinstall Extension...");
|
||||
|
||||
constructor(
|
||||
id: string = ReinstallAction.ID, label: string = ReinstallAction.LABEL,
|
||||
@@ -2884,7 +2884,7 @@ export class ReinstallAction extends Action {
|
||||
export class InstallSpecificVersionOfExtensionAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.install.specificVersion';
|
||||
static LABEL = localize('install previous version', "Install Specific Version of Extension...");
|
||||
static readonly LABEL = localize('install previous version', "Install Specific Version of Extension...");
|
||||
|
||||
constructor(
|
||||
id: string = InstallSpecificVersionOfExtensionAction.ID, label: string = InstallSpecificVersionOfExtensionAction.LABEL,
|
||||
|
||||
@@ -14,7 +14,7 @@ import { Schemas } from 'vs/base/common/network';
|
||||
export class OpenExtensionsFolderAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.openExtensionsFolder';
|
||||
static LABEL = localize('openExtensionsFolder', "Open Extensions Folder");
|
||||
static readonly LABEL = localize('openExtensionsFolder', "Open Extensions Folder");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -459,7 +459,7 @@ export class RuntimeExtensionsEditor extends BaseEditor {
|
||||
|
||||
export class ShowRuntimeExtensionsAction extends Action {
|
||||
static readonly ID = 'workbench.action.showRuntimeExtensions';
|
||||
static LABEL = nls.localize('showRuntimeExtensions', "Show Running Extensions");
|
||||
static readonly LABEL = nls.localize('showRuntimeExtensions', "Show Running Extensions");
|
||||
|
||||
constructor(
|
||||
id: string, label: string,
|
||||
@@ -477,7 +477,7 @@ export class ShowRuntimeExtensionsAction extends Action {
|
||||
export class ReportExtensionIssueAction extends Action {
|
||||
|
||||
private static readonly _id = 'workbench.extensions.action.reportExtensionIssue';
|
||||
private static _label = nls.localize('reportExtensionIssue', "Report Issue");
|
||||
private static readonly _label = nls.localize('reportExtensionIssue', "Report Issue");
|
||||
|
||||
private readonly _url: string;
|
||||
|
||||
@@ -533,8 +533,8 @@ export class ReportExtensionIssueAction extends Action {
|
||||
|
||||
export class DebugExtensionHostAction extends Action {
|
||||
static readonly ID = 'workbench.extensions.action.debugExtensionHost';
|
||||
static LABEL = nls.localize('debugExtensionHost', "Start Debugging Extension Host");
|
||||
static CSS_CLASS = 'debug-extension-host';
|
||||
static readonly LABEL = nls.localize('debugExtensionHost', "Start Debugging Extension Host");
|
||||
static readonly CSS_CLASS = 'debug-extension-host';
|
||||
|
||||
constructor(
|
||||
@IDebugService private readonly _debugService: IDebugService,
|
||||
@@ -572,7 +572,7 @@ export class DebugExtensionHostAction extends Action {
|
||||
|
||||
export class StartExtensionHostProfileAction extends Action {
|
||||
static readonly ID = 'workbench.extensions.action.extensionHostProfile';
|
||||
static LABEL = nls.localize('extensionHostProfileStart', "Start Extension Host Profile");
|
||||
static readonly LABEL = nls.localize('extensionHostProfileStart', "Start Extension Host Profile");
|
||||
|
||||
constructor(
|
||||
id: string = StartExtensionHostProfileAction.ID, label: string = StartExtensionHostProfileAction.LABEL,
|
||||
@@ -589,7 +589,7 @@ export class StartExtensionHostProfileAction extends Action {
|
||||
|
||||
export class StopExtensionHostProfileAction extends Action {
|
||||
static readonly ID = 'workbench.extensions.action.stopExtensionHostProfile';
|
||||
static LABEL = nls.localize('stopExtensionHostProfileStart', "Stop Extension Host Profile");
|
||||
static readonly LABEL = nls.localize('stopExtensionHostProfileStart', "Stop Extension Host Profile");
|
||||
|
||||
constructor(
|
||||
id: string = StartExtensionHostProfileAction.ID, label: string = StartExtensionHostProfileAction.LABEL,
|
||||
@@ -606,7 +606,7 @@ export class StopExtensionHostProfileAction extends Action {
|
||||
|
||||
export class SaveExtensionHostProfileAction extends Action {
|
||||
|
||||
static LABEL = nls.localize('saveExtensionHostProfile', "Save Extension Host Profile");
|
||||
static readonly LABEL = nls.localize('saveExtensionHostProfile', "Save Extension Host Profile");
|
||||
static readonly ID = 'workbench.extensions.action.saveExtensionHostProfile';
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -49,7 +49,7 @@ export class OpenEditorsView extends ViewletPanel {
|
||||
|
||||
private static readonly DEFAULT_VISIBLE_OPEN_EDITORS = 9;
|
||||
static readonly ID = 'workbench.explorer.openEditorsView';
|
||||
static NAME = nls.localize({ key: 'openEditors', comment: ['Open is an adjective'] }, "Open Editors");
|
||||
static readonly NAME = nls.localize({ key: 'openEditors', comment: ['Open is an adjective'] }, "Open Editors");
|
||||
|
||||
private dirtyCountElement!: HTMLElement;
|
||||
private listRefreshScheduler: RunOnceScheduler;
|
||||
|
||||
@@ -33,7 +33,7 @@ type FormattingEditProvider = DocumentFormattingEditProvider | DocumentRangeForm
|
||||
|
||||
class DefaultFormatter extends Disposable implements IWorkbenchContribution {
|
||||
|
||||
static configName = 'editor.defaultFormatter';
|
||||
static readonly configName = 'editor.defaultFormatter';
|
||||
|
||||
static extensionIds: (string | null)[] = [];
|
||||
static extensionDescriptions: string[] = [];
|
||||
|
||||
@@ -15,8 +15,8 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
|
||||
|
||||
export class SetLogLevelAction extends Action {
|
||||
|
||||
static ID = 'workbench.action.setLogLevel';
|
||||
static LABEL = nls.localize('setLogLevel', "Set Log Level...");
|
||||
static readonly ID = 'workbench.action.setLogLevel';
|
||||
static readonly LABEL = nls.localize('setLogLevel', "Set Log Level...");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IQuickInputService private readonly quickInputService: IQuickInputService,
|
||||
@@ -60,8 +60,8 @@ export class SetLogLevelAction extends Action {
|
||||
|
||||
export class OpenWindowSessionLogFileAction extends Action {
|
||||
|
||||
static ID = 'workbench.action.openSessionLogFile';
|
||||
static LABEL = nls.localize('openSessionLogFile', "Open Window Log File (Session)...");
|
||||
static readonly ID = 'workbench.action.openSessionLogFile';
|
||||
static readonly LABEL = nls.localize('openSessionLogFile', "Open Window Log File (Session)...");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
|
||||
|
||||
@@ -12,8 +12,8 @@ import { IElectronService } from 'vs/platform/electron/node/electron';
|
||||
|
||||
export class OpenLogsFolderAction extends Action {
|
||||
|
||||
static ID = 'workbench.action.openLogsFolder';
|
||||
static LABEL = nls.localize('openLogsFolder', "Open Logs Folder");
|
||||
static readonly ID = 'workbench.action.openLogsFolder';
|
||||
static readonly LABEL = nls.localize('openLogsFolder', "Open Logs Folder");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
|
||||
@@ -213,8 +213,8 @@ export class OpenLogOutputFile extends Action {
|
||||
|
||||
export class ShowLogsOutputChannelAction extends Action {
|
||||
|
||||
static ID = 'workbench.action.showLogs';
|
||||
static LABEL = nls.localize('showLogs', "Show Logs...");
|
||||
static readonly ID = 'workbench.action.showLogs';
|
||||
static readonly LABEL = nls.localize('showLogs', "Show Logs...");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IQuickInputService private readonly quickInputService: IQuickInputService,
|
||||
@@ -243,8 +243,8 @@ interface IOutputChannelQuickPickItem extends IQuickPickItem {
|
||||
|
||||
export class OpenOutputLogFileAction extends Action {
|
||||
|
||||
static ID = 'workbench.action.openLogFile';
|
||||
static LABEL = nls.localize('openLogFile', "Open Log File...");
|
||||
static readonly ID = 'workbench.action.openLogFile';
|
||||
static readonly LABEL = nls.localize('openLogFile', "Open Log File...");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IQuickInputService private readonly quickInputService: IQuickInputService,
|
||||
|
||||
@@ -90,7 +90,7 @@ export class SettingsTreeNewExtensionsElement extends SettingsTreeElement {
|
||||
}
|
||||
|
||||
export class SettingsTreeSettingElement extends SettingsTreeElement {
|
||||
private static MAX_DESC_LINES = 20;
|
||||
private static readonly MAX_DESC_LINES = 20;
|
||||
|
||||
setting: ISetting;
|
||||
|
||||
|
||||
@@ -468,7 +468,7 @@ Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets).registerViewlet(new Vie
|
||||
class OpenRemoteViewletAction extends ShowViewletAction {
|
||||
|
||||
static readonly ID = VIEWLET_ID;
|
||||
static LABEL = nls.localize('toggleRemoteViewlet', "Show Remote Explorer");
|
||||
static readonly LABEL = nls.localize('toggleRemoteViewlet', "Show Remote Explorer");
|
||||
|
||||
constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IEditorGroupsService editorGroupService: IEditorGroupsService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService) {
|
||||
super(id, label, VIEWLET_ID, viewletService, editorGroupService, layoutService);
|
||||
|
||||
@@ -64,7 +64,7 @@ interface ResourceGroupTemplate {
|
||||
|
||||
class ResourceGroupRenderer implements ICompressibleTreeRenderer<ISCMResourceGroup, FuzzyScore, ResourceGroupTemplate> {
|
||||
|
||||
static TEMPLATE_ID = 'resource group';
|
||||
static readonly TEMPLATE_ID = 'resource group';
|
||||
get templateId(): string { return ResourceGroupRenderer.TEMPLATE_ID; }
|
||||
|
||||
constructor(
|
||||
@@ -150,7 +150,7 @@ class MultipleSelectionActionRunner extends ActionRunner {
|
||||
|
||||
class ResourceRenderer implements ICompressibleTreeRenderer<ISCMResource | IBranchNode<ISCMResource, ISCMResourceGroup>, FuzzyScore, ResourceTemplate> {
|
||||
|
||||
static TEMPLATE_ID = 'resource';
|
||||
static readonly TEMPLATE_ID = 'resource';
|
||||
get templateId(): string { return ResourceRenderer.TEMPLATE_ID; }
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -28,7 +28,7 @@ import { SCMService } from 'vs/workbench/contrib/scm/common/scmService';
|
||||
class OpenSCMViewletAction extends ShowViewletAction {
|
||||
|
||||
static readonly ID = VIEWLET_ID;
|
||||
static LABEL = localize('toggleGitViewlet', "Show Git");
|
||||
static readonly LABEL = localize('toggleGitViewlet', "Show Git");
|
||||
|
||||
constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IEditorGroupsService editorGroupService: IEditorGroupsService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService) {
|
||||
super(id, label, VIEWLET_ID, viewletService, editorGroupService, layoutService);
|
||||
|
||||
@@ -494,7 +494,7 @@ export abstract class AbstractSearchAndReplaceAction extends Action {
|
||||
|
||||
export class RemoveAction extends AbstractSearchAndReplaceAction {
|
||||
|
||||
static LABEL = nls.localize('RemoveAction.label', "Dismiss");
|
||||
static readonly LABEL = nls.localize('RemoveAction.label', "Dismiss");
|
||||
|
||||
constructor(
|
||||
private viewer: WorkbenchObjectTree<RenderableMatch>,
|
||||
|
||||
@@ -24,7 +24,7 @@ import { EditorOption } from 'vs/editor/common/config/editorOptions';
|
||||
export class TabCompletionController implements editorCommon.IEditorContribution {
|
||||
|
||||
private static readonly ID = 'editor.tabCompletionController';
|
||||
static ContextKey = new RawContextKey<boolean>('hasSnippetCompletions', undefined);
|
||||
static readonly ContextKey = new RawContextKey<boolean>('hasSnippetCompletions', undefined);
|
||||
|
||||
public static get(editor: ICodeEditor): TabCompletionController {
|
||||
return editor.getContribution<TabCompletionController>(TabCompletionController.ID);
|
||||
|
||||
@@ -113,7 +113,7 @@ export class TerminalTaskSystem implements ITaskSystem {
|
||||
|
||||
public static TelemetryEventName: string = 'taskService';
|
||||
|
||||
private static ProcessVarName = '__process__';
|
||||
private static readonly ProcessVarName = '__process__';
|
||||
|
||||
private static shellQuotes: IStringDictionary<ShellQuotingOptions> = {
|
||||
'cmd': {
|
||||
|
||||
@@ -27,7 +27,7 @@ import { IQuickInputService, QuickPickInput } from 'vs/platform/quickinput/commo
|
||||
export class SelectColorThemeAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.selectTheme';
|
||||
static LABEL = localize('selectTheme.label', "Color Theme");
|
||||
static readonly LABEL = localize('selectTheme.label', "Color Theme");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -90,7 +90,7 @@ export class SelectColorThemeAction extends Action {
|
||||
class SelectIconThemeAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.selectIconTheme';
|
||||
static LABEL = localize('selectIconTheme.label', "File Icon Theme");
|
||||
static readonly LABEL = localize('selectIconTheme.label', "File Icon Theme");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -197,7 +197,7 @@ function toEntries(themes: Array<IColorTheme | IFileIconTheme>, label?: string):
|
||||
class GenerateColorThemeAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.generateColorTheme';
|
||||
static LABEL = localize('generateColorTheme.label', "Generate Color Theme From Current Settings");
|
||||
static readonly LABEL = localize('generateColorTheme.label', "Generate Color Theme From Current Settings");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -288,4 +288,4 @@ MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
title: localize('themes.selectIconTheme.label', "File Icon Theme")
|
||||
},
|
||||
order: 2
|
||||
});
|
||||
});
|
||||
|
||||
@@ -103,7 +103,7 @@ export class ShowReleaseNotesAction extends AbstractShowReleaseNotesAction {
|
||||
export class ShowCurrentReleaseNotesAction extends AbstractShowReleaseNotesAction {
|
||||
|
||||
static readonly ID = ShowCurrentReleaseNotesActionId;
|
||||
static LABEL = nls.localize('showReleaseNotes', "Show Release Notes");
|
||||
static readonly LABEL = nls.localize('showReleaseNotes', "Show Release Notes");
|
||||
|
||||
constructor(
|
||||
id = ShowCurrentReleaseNotesAction.ID,
|
||||
|
||||
@@ -21,7 +21,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
|
||||
|
||||
export class WebviewEditor extends BaseEditor {
|
||||
|
||||
public static ID = 'WebviewEditor';
|
||||
public static readonly ID = 'WebviewEditor';
|
||||
|
||||
private readonly _scopedContextKeyService = this._register(new MutableDisposable<IContextKeyService>());
|
||||
private _findWidgetVisible: IContextKey<boolean>;
|
||||
|
||||
@@ -20,7 +20,7 @@ import { IHostService } from 'vs/workbench/services/host/browser/host';
|
||||
|
||||
export abstract class AbstractTelemetryOptOut implements IWorkbenchContribution {
|
||||
|
||||
private static TELEMETRY_OPT_OUT_SHOWN = 'workbench.telemetryOptOutShown';
|
||||
private static readonly TELEMETRY_OPT_OUT_SHOWN = 'workbench.telemetryOptOutShown';
|
||||
private privacyUrl: string | undefined;
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedPr
|
||||
export class ToggleDevToolsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.toggleDevTools';
|
||||
static LABEL = nls.localize('toggleDevTools', "Toggle Developer Tools");
|
||||
static readonly LABEL = nls.localize('toggleDevTools', "Toggle Developer Tools");
|
||||
|
||||
constructor(id: string, label: string, @IElectronService private readonly electronService: IElectronService) {
|
||||
super(id, label);
|
||||
@@ -25,7 +25,7 @@ export class ToggleDevToolsAction extends Action {
|
||||
export class ToggleSharedProcessAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.toggleSharedProcess';
|
||||
static LABEL = nls.localize('toggleSharedProcess', "Toggle Shared Process");
|
||||
static readonly LABEL = nls.localize('toggleSharedProcess', "Toggle Shared Process");
|
||||
|
||||
constructor(id: string, label: string, @ISharedProcessService private readonly sharedProcessService: ISharedProcessService) {
|
||||
super(id, label);
|
||||
|
||||
@@ -140,7 +140,7 @@ export class ZoomResetAction extends BaseZoomAction {
|
||||
export class ReloadWindowWithExtensionsDisabledAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.reloadWindowWithExtensionsDisabled';
|
||||
static LABEL = nls.localize('reloadWindowWithExtensionsDisabled', "Reload With Extensions Disabled");
|
||||
static readonly LABEL = nls.localize('reloadWindowWithExtensionsDisabled', "Reload With Extensions Disabled");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -217,7 +217,7 @@ export abstract class BaseSwitchWindow extends Action {
|
||||
export class SwitchWindow extends BaseSwitchWindow {
|
||||
|
||||
static readonly ID = 'workbench.action.switchWindow';
|
||||
static LABEL = nls.localize('switchWindow', "Switch Window...");
|
||||
static readonly LABEL = nls.localize('switchWindow', "Switch Window...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -240,7 +240,7 @@ export class SwitchWindow extends BaseSwitchWindow {
|
||||
export class QuickSwitchWindow extends BaseSwitchWindow {
|
||||
|
||||
static readonly ID = 'workbench.action.quickSwitchWindow';
|
||||
static LABEL = nls.localize('quickSwitchWindow', "Quick Switch Window...");
|
||||
static readonly LABEL = nls.localize('quickSwitchWindow', "Quick Switch Window...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -14,7 +14,7 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/
|
||||
export class SaveWorkspaceAsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.saveWorkspaceAs';
|
||||
static LABEL = nls.localize('saveWorkspaceAsAction', "Save Workspace As...");
|
||||
static readonly LABEL = nls.localize('saveWorkspaceAsAction', "Save Workspace As...");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
||||
@@ -11,7 +11,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
|
||||
export class NativeClipboardService implements IClipboardService {
|
||||
|
||||
private static FILE_FORMAT = 'code/file-list'; // Clipboard format for files
|
||||
private static readonly FILE_FORMAT = 'code/file-list'; // Clipboard format for files
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
|
||||
export abstract class BaseConfigurationResolverService extends AbstractVariableResolverService {
|
||||
|
||||
static INPUT_OR_COMMAND_VARIABLES_PATTERN = /\${((input|command):(.*?))}/g;
|
||||
static readonly INPUT_OR_COMMAND_VARIABLES_PATTERN = /\${((input|command):(.*?))}/g;
|
||||
|
||||
constructor(
|
||||
envVariables: IProcessEnvironment,
|
||||
|
||||
@@ -27,8 +27,8 @@ export interface IVariableResolveContext {
|
||||
|
||||
export class AbstractVariableResolverService implements IConfigurationResolverService {
|
||||
|
||||
static VARIABLE_REGEXP = /\$\{(.*?)\}/g;
|
||||
static VARIABLE_REGEXP_SINGLE = /\$\{(.*?)\}/;
|
||||
static readonly VARIABLE_REGEXP = /\$\{(.*?)\}/g;
|
||||
static readonly VARIABLE_REGEXP_SINGLE = /\$\{(.*?)\}/;
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ const noop = () => { };
|
||||
|
||||
export class RPCProtocol extends Disposable implements IRPCProtocol {
|
||||
|
||||
private static UNRESPONSIVE_TIME = 3 * 1000; // 3s
|
||||
private static readonly UNRESPONSIVE_TIME = 3 * 1000; // 3s
|
||||
|
||||
private readonly _onDidChangeResponsiveState: Emitter<ResponsiveState> = this._register(new Emitter<ResponsiveState>());
|
||||
public readonly onDidChangeResponsiveState: Event<ResponsiveState> = this._onDidChangeResponsiveState.event;
|
||||
|
||||
@@ -365,7 +365,7 @@ export class BufferredOutputChannel extends Disposable implements IOutputChannel
|
||||
|
||||
class BufferedContent {
|
||||
|
||||
private static MAX_OUTPUT_LENGTH = 10000 /* Max. number of output lines to show in output */ * 100 /* Guestimated chars per line */;
|
||||
private static readonly MAX_OUTPUT_LENGTH = 10000 /* Max. number of output lines to show in output */ * 100 /* Guestimated chars per line */;
|
||||
|
||||
private data: string[] = [];
|
||||
private dataIds: number[] = [];
|
||||
|
||||
@@ -311,4 +311,4 @@ suite('Files - TextFileEditorModelManager', () => {
|
||||
manager.disposeModel((model as TextFileEditorModel));
|
||||
manager.dispose();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user