mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Merge branch 'main' into notebook/dev
This commit is contained in:
@@ -20,4 +20,4 @@ Steps to Reproduce:
|
||||
Does this issue occur when all extensions are disabled?: Yes/No
|
||||
|
||||
<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
|
||||
<!-- 📣 Issues caused by an extension need to be reported direct to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
|
||||
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
|
||||
|
||||
@@ -33,6 +33,7 @@ async function main() {
|
||||
'Credits.rtf',
|
||||
'CodeResources',
|
||||
'fsevents.node',
|
||||
'Info.plist', // TODO@deepak1556: regressed with 11.4.2 internal builds
|
||||
'.npmrc'
|
||||
],
|
||||
outAppPath,
|
||||
|
||||
@@ -38,6 +38,7 @@ async function main() {
|
||||
'Credits.rtf',
|
||||
'CodeResources',
|
||||
'fsevents.node',
|
||||
'Info.plist', // TODO@deepak1556: regressed with 11.4.2 internal builds
|
||||
'.npmrc'
|
||||
],
|
||||
outAppPath,
|
||||
|
||||
@@ -454,5 +454,8 @@
|
||||
"image-size": "^0.5.2",
|
||||
"vscode-emmet-helper": "^2.3.0",
|
||||
"vscode-languageserver-textdocument": "^1.0.1"
|
||||
},
|
||||
"workspaceTrust": {
|
||||
"request": "never"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ class Preview extends Disposable {
|
||||
|
||||
const nonce = Date.now().toString();
|
||||
|
||||
const cspSource = this.webviewEditor.webview.cspSource;
|
||||
return /* html */`<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -225,7 +226,7 @@ class Preview extends Disposable {
|
||||
|
||||
<link rel="stylesheet" href="${escapeAttribute(this.extensionResource('/media/main.css'))}" type="text/css" media="screen" nonce="${nonce}">
|
||||
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self' data: ${this.webviewEditor.webview.cspSource}; script-src 'nonce-${nonce}'; style-src 'self' 'nonce-${nonce}';">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: ${cspSource}; script-src 'nonce-${nonce}'; style-src ${cspSource} 'nonce-${nonce}';">
|
||||
<meta id="image-preview-settings" data-settings="${escapeAttribute(JSON.stringify(settings))}">
|
||||
</head>
|
||||
<body class="container image scale-to-fit loading">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
"@iktakahiro/markdown-it-katex@https://github.com/mjbvz/markdown-it-katex.git":
|
||||
version "4.0.1"
|
||||
resolved "https://github.com/mjbvz/markdown-it-katex.git#d3f98b077a40bc4ee9b42689df33feec62cdfbca"
|
||||
resolved "https://github.com/mjbvz/markdown-it-katex.git#e88925a7cb3fd593a14ed117fb43627c4ba910b6"
|
||||
dependencies:
|
||||
katex "^0.13.0"
|
||||
|
||||
|
||||
@@ -362,6 +362,8 @@
|
||||
// "peekViewTitleLabel.foreground": "",
|
||||
// "peekViewTitleDescription.foreground": "",
|
||||
|
||||
// Ports
|
||||
"ports.iconRunningProcessforeground": "#80a2c2",
|
||||
// Editor: Diff
|
||||
"diffEditor.insertedTextBackground": "#31958A55",
|
||||
// "diffEditor.insertedTextBorder": "",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"menu.foreground": "#CCCCCC",
|
||||
"statusBarItem.remoteForeground": "#FFF",
|
||||
"statusBarItem.remoteBackground": "#16825D",
|
||||
"ports.iconRunningProcessforeground": "#369432",
|
||||
"sideBarSectionHeader.background": "#0000",
|
||||
"sideBarSectionHeader.border": "#ccc3",
|
||||
"tab.lastPinnedBorder": "#ccc3"
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"sideBarTitle.foreground": "#FFFFFF",
|
||||
"selection.background": "#008000",
|
||||
"editor.selectionBackground": "#FFFFFF",
|
||||
"statusBarItem.remoteBackground": "#00000000"
|
||||
"statusBarItem.remoteBackground": "#00000000",
|
||||
"ports.iconRunningProcessforeground": "#FFFFFF",
|
||||
},
|
||||
"tokenColors": [
|
||||
{
|
||||
@@ -441,7 +442,7 @@
|
||||
"name": "HC Search Editor context line override",
|
||||
"scope": "meta.resultLinePrefix.contextLinePrefix.search",
|
||||
"settings": {
|
||||
"foreground": "#CBEDCB",
|
||||
"foreground": "#CBEDCB"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -450,6 +451,6 @@
|
||||
"newOperator": "#FFFFFF",
|
||||
"stringLiteral": "#ce9178",
|
||||
"customLiteral": "#DCDCAA",
|
||||
"numberLiteral": "#b5cea8",
|
||||
"numberLiteral": "#b5cea8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"settings.numberInputBorder": "#CECECE",
|
||||
"statusBarItem.remoteForeground": "#FFF",
|
||||
"statusBarItem.remoteBackground": "#16825D",
|
||||
"ports.iconRunningProcessforeground": "#369432",
|
||||
"sideBarSectionHeader.background": "#0000",
|
||||
"sideBarSectionHeader.border": "#61616130",
|
||||
"tab.lastPinnedBorder": "#61616130",
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"statusBar.debuggingBackground": "#423523",
|
||||
"statusBar.noFolderBackground": "#423523",
|
||||
"statusBarItem.remoteBackground": "#6e583b",
|
||||
"ports.iconRunningProcessforeground": "#369432",
|
||||
"activityBar.background": "#221a0f",
|
||||
"activityBar.foreground": "#d3af86",
|
||||
"sideBar.background": "#362712",
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"statusBar.noFolderBackground": "#505050",
|
||||
"titleBar.activeBackground": "#505050",
|
||||
"statusBarItem.remoteBackground": "#3655b5",
|
||||
"ports.iconRunningProcessforeground": "#CCCCCC",
|
||||
"activityBar.background": "#353535",
|
||||
"activityBar.foreground": "#ffffff",
|
||||
"activityBarBadge.background": "#3655b5",
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"statusBar.noFolderBackground": "#414339",
|
||||
"statusBar.debuggingBackground": "#75715E",
|
||||
"statusBarItem.remoteBackground": "#AC6218",
|
||||
"ports.iconRunningProcessforeground": "#ccccc7",
|
||||
"activityBar.background": "#272822",
|
||||
"activityBar.foreground": "#f8f8f2",
|
||||
"sideBar.background": "#1e1f1c",
|
||||
|
||||
@@ -506,6 +506,7 @@
|
||||
"statusBar.noFolderBackground": "#705697",
|
||||
"statusBar.debuggingBackground": "#705697",
|
||||
"statusBarItem.remoteBackground": "#4e3c69",
|
||||
"ports.iconRunningProcessforeground": "#749351",
|
||||
"activityBar.background": "#EDEDF5",
|
||||
"activityBar.foreground": "#705697",
|
||||
"activityBarBadge.background": "#705697",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"statusBar.background": "#700000",
|
||||
"statusBar.noFolderBackground": "#700000",
|
||||
"statusBarItem.remoteBackground": "#c33",
|
||||
"ports.iconRunningProcessforeground": "#DB7E58",
|
||||
"editorGroupHeader.tabsBackground": "#330000",
|
||||
"titleBar.activeBackground": "#770000",
|
||||
"titleBar.inactiveBackground": "#772222",
|
||||
|
||||
@@ -462,6 +462,7 @@
|
||||
"statusBar.debuggingBackground": "#00212B",
|
||||
"statusBar.noFolderBackground": "#00212B",
|
||||
"statusBarItem.remoteBackground": "#2AA19899",
|
||||
"ports.iconRunningProcessforeground": "#369432",
|
||||
"statusBarItem.prominentBackground": "#003847",
|
||||
"statusBarItem.prominentHoverBackground": "#003847",
|
||||
// "statusBarItem.activeBackground": "",
|
||||
|
||||
@@ -465,6 +465,7 @@
|
||||
"statusBar.noFolderBackground": "#EEE8D5",
|
||||
// "statusBar.foreground": "",
|
||||
"statusBarItem.remoteBackground": "#AC9D57",
|
||||
"ports.iconRunningProcessforeground": "#2AA19899",
|
||||
"statusBarItem.prominentBackground": "#DDD6C1",
|
||||
"statusBarItem.prominentHoverBackground": "#DDD6C199",
|
||||
// "statusBarItem.activeBackground": "",
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"titleBar.activeBackground": "#001126",
|
||||
"statusBar.background": "#001126",
|
||||
"statusBarItem.remoteBackground": "#0e639c",
|
||||
"ports.iconRunningProcessforeground": "#bbdaff",
|
||||
"statusBar.noFolderBackground": "#001126",
|
||||
"statusBar.debuggingBackground": "#001126",
|
||||
"activityBar.background": "#001733",
|
||||
|
||||
@@ -39,13 +39,15 @@ export class TypeScriptServerError extends Error {
|
||||
"TypeScriptRequestErrorProperties" : {
|
||||
"command" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
||||
"serverid" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
||||
"sanitizedstack" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
||||
"sanitizedstack" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
||||
"badclient" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
||||
}
|
||||
*/
|
||||
return {
|
||||
command: this.serverCommand,
|
||||
serverid: this.serverId,
|
||||
sanitizedstack: this.sanitizedStack || '',
|
||||
badclient: /\bBADCLIENT\b/.test(this.stack || ''),
|
||||
} as const;
|
||||
}
|
||||
|
||||
|
||||
@@ -710,16 +710,20 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (resource.scheme === fileSchemes.file || resource.scheme === fileSchemes.untitled) {
|
||||
for (const root of roots.sort((a, b) => a.uri.fsPath.length - b.uri.fsPath.length)) {
|
||||
if (resource.fsPath.startsWith(root.uri.fsPath + path.sep)) {
|
||||
return root.uri.fsPath;
|
||||
switch (resource.scheme) {
|
||||
case fileSchemes.file:
|
||||
case fileSchemes.untitled:
|
||||
case fileSchemes.vscodeNotebookCell:
|
||||
for (const root of roots.sort((a, b) => a.uri.fsPath.length - b.uri.fsPath.length)) {
|
||||
if (resource.fsPath.startsWith(root.uri.fsPath + path.sep)) {
|
||||
return root.uri.fsPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
return roots[0].uri.fsPath;
|
||||
}
|
||||
return roots[0].uri.fsPath;
|
||||
|
||||
return undefined;
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
public execute(command: keyof TypeScriptRequests, args: any, token: vscode.CancellationToken, config?: ExecConfig): Promise<ServerResponse.Response<Proto.Response>> {
|
||||
|
||||
@@ -14,7 +14,7 @@ interface PackageInfo {
|
||||
}
|
||||
|
||||
export interface TelemetryProperties {
|
||||
readonly [prop: string]: string | number | undefined;
|
||||
readonly [prop: string]: string | number | boolean | undefined;
|
||||
}
|
||||
|
||||
export interface TelemetryReporter {
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
"monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit",
|
||||
"tsec-compile-check": "node node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json",
|
||||
"valid-layers-check": "node build/lib/layersChecker.js",
|
||||
"strict-function-types-watch": "tsc --watch -p src/tsconfig.json --noEmit --strictFunctionTypes",
|
||||
"no-implicit-override-watch": "tsc --watch -p src/tsconfig.json --noEmit --noImplicitOverride",
|
||||
"update-distro": "node build/npm/update-distro.js",
|
||||
"web": "node resources/web/code-web.js",
|
||||
"compile-web": "node --max_old_space_size=4095 ./node_modules/gulp/bin/gulp.js compile-web",
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@
|
||||
"builtInExtensions": [
|
||||
{
|
||||
"name": "ms-vscode.node-debug",
|
||||
"version": "1.44.20",
|
||||
"version": "1.44.23",
|
||||
"repo": "https://github.com/microsoft/vscode-node-debug",
|
||||
"metadata": {
|
||||
"id": "b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6",
|
||||
@@ -63,7 +63,7 @@
|
||||
},
|
||||
{
|
||||
"name": "ms-vscode.references-view",
|
||||
"version": "0.0.77",
|
||||
"version": "0.0.78",
|
||||
"repo": "https://github.com/microsoft/vscode-references-view",
|
||||
"metadata": {
|
||||
"id": "dc489f46-520d-4556-ae85-1f9eab3c412d",
|
||||
|
||||
+4
-4
@@ -18,7 +18,6 @@ perf.mark('code/didStartMain');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const { getNLSConfiguration } = require('./vs/base/node/languagePacks');
|
||||
const bootstrap = require('./bootstrap');
|
||||
const bootstrapNode = require('./bootstrap-node');
|
||||
const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath');
|
||||
@@ -45,7 +44,9 @@ app.setPath('userData', userDataPath);
|
||||
const argvConfig = configureCommandlineSwitchesSync(args);
|
||||
|
||||
// Configure crash reporter
|
||||
perf.mark('code/willStartCrashReporter');
|
||||
configureCrashReporter();
|
||||
perf.mark('code/didStartCrashReporter');
|
||||
|
||||
// Set logs path before app 'ready' event if running portable
|
||||
// to ensure that no 'logs' folder is created on disk at a
|
||||
@@ -60,9 +61,6 @@ protocol.registerSchemesAsPrivileged([
|
||||
{
|
||||
scheme: 'vscode-webview',
|
||||
privileges: { standard: true, secure: true, supportFetchAPI: true, corsEnabled: true, allowServiceWorkers: true, }
|
||||
}, {
|
||||
scheme: 'vscode-webview-resource',
|
||||
privileges: { secure: true, standard: true, supportFetchAPI: true, corsEnabled: true }
|
||||
},
|
||||
{
|
||||
scheme: 'vscode-file',
|
||||
@@ -87,6 +85,7 @@ let nlsConfigurationPromise = undefined;
|
||||
const metaDataFile = path.join(__dirname, 'nls.metadata.json');
|
||||
const locale = getUserDefinedLocale(argvConfig);
|
||||
if (locale) {
|
||||
const { getNLSConfiguration } = require('./vs/base/node/languagePacks');
|
||||
nlsConfigurationPromise = getNLSConfiguration(product.commit, userDataPath, metaDataFile, locale);
|
||||
}
|
||||
|
||||
@@ -579,6 +578,7 @@ async function resolveNlsConfiguration() {
|
||||
// See above the comment about the loader and case sensitiviness
|
||||
appLocale = appLocale.toLowerCase();
|
||||
|
||||
const { getNLSConfiguration } = require('./vs/base/node/languagePacks');
|
||||
nlsConfiguration = await getNLSConfiguration(product.commit, userDataPath, metaDataFile, appLocale);
|
||||
if (!nlsConfiguration) {
|
||||
nlsConfiguration = { locale: appLocale, availableLanguages: {} };
|
||||
|
||||
@@ -42,7 +42,7 @@ export class DelayedDragHandler extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
this.clearDragTimeout();
|
||||
|
||||
@@ -1589,7 +1589,7 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
return ModifierKeyEmitter.instance;
|
||||
}
|
||||
|
||||
dispose() {
|
||||
override dispose() {
|
||||
super.dispose();
|
||||
this._subscriptions.dispose();
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ export class Gesture extends Disposable {
|
||||
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || (window as Window).navigator.msMaxTouchPoints > 0;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this.handle) {
|
||||
this.handle.dispose();
|
||||
this.handle = null;
|
||||
|
||||
@@ -212,7 +212,7 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
|
||||
// implement in subclass
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
if (this.element) {
|
||||
this.element.remove();
|
||||
this.element = undefined;
|
||||
@@ -231,7 +231,7 @@ export interface IActionViewItemOptions extends IBaseActionViewItemOptions {
|
||||
export class ActionViewItem extends BaseActionViewItem {
|
||||
|
||||
protected label: HTMLElement | undefined;
|
||||
protected options: IActionViewItemOptions;
|
||||
protected override options: IActionViewItemOptions;
|
||||
|
||||
private cssClass?: string;
|
||||
|
||||
@@ -244,7 +244,7 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
this.cssClass = '';
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
super.render(container);
|
||||
|
||||
if (this.element) {
|
||||
@@ -276,32 +276,32 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
|
||||
// Only set the tabIndex on the element once it is about to get focused
|
||||
// That way this element wont be a tab stop when it is not needed #106441
|
||||
focus(): void {
|
||||
override focus(): void {
|
||||
if (this.label) {
|
||||
this.label.tabIndex = 0;
|
||||
this.label.focus();
|
||||
}
|
||||
}
|
||||
|
||||
blur(): void {
|
||||
override blur(): void {
|
||||
if (this.label) {
|
||||
this.label.tabIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
setFocusable(focusable: boolean): void {
|
||||
override setFocusable(focusable: boolean): void {
|
||||
if (this.label) {
|
||||
this.label.tabIndex = focusable ? 0 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
updateLabel(): void {
|
||||
override updateLabel(): void {
|
||||
if (this.options.label && this.label) {
|
||||
this.label.textContent = this.getAction().label;
|
||||
}
|
||||
}
|
||||
|
||||
updateTooltip(): void {
|
||||
override updateTooltip(): void {
|
||||
let title: string | null = null;
|
||||
|
||||
if (this.getAction().tooltip) {
|
||||
@@ -320,7 +320,7 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateClass(): void {
|
||||
override updateClass(): void {
|
||||
if (this.cssClass && this.label) {
|
||||
this.label.classList.remove(...this.cssClass.split(' '));
|
||||
}
|
||||
@@ -343,7 +343,7 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateEnabled(): void {
|
||||
override updateEnabled(): void {
|
||||
if (this.getAction().enabled) {
|
||||
if (this.label) {
|
||||
this.label.removeAttribute('aria-disabled');
|
||||
@@ -365,7 +365,7 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateChecked(): void {
|
||||
override updateChecked(): void {
|
||||
if (this.label) {
|
||||
if (this.getAction().checked) {
|
||||
this.label.classList.add('checked');
|
||||
@@ -407,23 +407,23 @@ export class SelectActionViewItem extends BaseActionViewItem {
|
||||
return option;
|
||||
}
|
||||
|
||||
setFocusable(focusable: boolean): void {
|
||||
override setFocusable(focusable: boolean): void {
|
||||
this.selectBox.setFocusable(focusable);
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
override focus(): void {
|
||||
if (this.selectBox) {
|
||||
this.selectBox.focus();
|
||||
}
|
||||
}
|
||||
|
||||
blur(): void {
|
||||
override blur(): void {
|
||||
if (this.selectBox) {
|
||||
this.selectBox.blur();
|
||||
}
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
this.selectBox.render(container);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.monaco-action-bar.vertical .actions-container {
|
||||
@@ -23,12 +24,11 @@
|
||||
}
|
||||
|
||||
.monaco-action-bar .action-item {
|
||||
display: flex;
|
||||
display: block;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
|
||||
min-width: 24px;
|
||||
}
|
||||
|
||||
.monaco-action-bar .eaction-item.disabled {
|
||||
@@ -37,12 +37,14 @@
|
||||
|
||||
.monaco-action-bar .action-item .icon,
|
||||
.monaco-action-bar .action-item .codicon {
|
||||
display: inline-block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.monaco-action-bar .action-item .codicon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.monaco-action-bar .action-label {
|
||||
|
||||
@@ -529,7 +529,7 @@ export class ActionBar extends Disposable implements IActionRunner {
|
||||
await this._actionRunner.run(action, context);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
dispose(this.viewItems);
|
||||
this.viewItems = [];
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export class CheckboxActionViewItem extends BaseActionViewItem {
|
||||
protected checkbox: Checkbox | undefined;
|
||||
protected readonly disposables = new DisposableStore();
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
this.element = container;
|
||||
|
||||
this.disposables.clear();
|
||||
@@ -59,7 +59,7 @@ export class CheckboxActionViewItem extends BaseActionViewItem {
|
||||
this.element.appendChild(this.checkbox.domNode);
|
||||
}
|
||||
|
||||
updateEnabled(): void {
|
||||
override updateEnabled(): void {
|
||||
if (this.checkbox) {
|
||||
if (this.isEnabled()) {
|
||||
this.checkbox.enable();
|
||||
@@ -69,33 +69,33 @@ export class CheckboxActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateChecked(): void {
|
||||
override updateChecked(): void {
|
||||
if (this.checkbox) {
|
||||
this.checkbox.checked = this._action.checked;
|
||||
}
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
override focus(): void {
|
||||
if (this.checkbox) {
|
||||
this.checkbox.domNode.tabIndex = 0;
|
||||
this.checkbox.focus();
|
||||
}
|
||||
}
|
||||
|
||||
blur(): void {
|
||||
override blur(): void {
|
||||
if (this.checkbox) {
|
||||
this.checkbox.domNode.tabIndex = -1;
|
||||
this.checkbox.domNode.blur();
|
||||
}
|
||||
}
|
||||
|
||||
setFocusable(focusable: boolean): void {
|
||||
override setFocusable(focusable: boolean): void {
|
||||
if (this.checkbox) {
|
||||
this.checkbox.domNode.tabIndex = focusable ? 0 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.disposables.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ export class ContextView extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.hide();
|
||||
|
||||
super.dispose();
|
||||
|
||||
@@ -417,7 +417,7 @@ export class Dialog extends Disposable {
|
||||
this.applyStyles();
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
if (this.modalElement) {
|
||||
|
||||
@@ -125,7 +125,7 @@ export class BaseDropdown extends ActionRunner {
|
||||
this.hide();
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
this.hide();
|
||||
|
||||
@@ -159,7 +159,7 @@ export class Dropdown extends BaseDropdown {
|
||||
this.contextViewProvider = options.contextViewProvider;
|
||||
}
|
||||
|
||||
show(): void {
|
||||
override show(): void {
|
||||
super.show();
|
||||
|
||||
this.element.classList.add('active');
|
||||
@@ -187,7 +187,7 @@ export class Dropdown extends BaseDropdown {
|
||||
this.element.classList.remove('active');
|
||||
}
|
||||
|
||||
hide(): void {
|
||||
override hide(): void {
|
||||
super.hide();
|
||||
|
||||
if (this.contextViewProvider) {
|
||||
@@ -250,7 +250,7 @@ export class DropdownMenu extends BaseDropdown {
|
||||
this._actions = actions;
|
||||
}
|
||||
|
||||
show(): void {
|
||||
override show(): void {
|
||||
super.show();
|
||||
|
||||
this.element.classList.add('active');
|
||||
@@ -269,7 +269,7 @@ export class DropdownMenu extends BaseDropdown {
|
||||
});
|
||||
}
|
||||
|
||||
hide(): void {
|
||||
override hide(): void {
|
||||
super.hide();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,23 +42,26 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
|
||||
private _onDidChangeVisibility = this._register(new Emitter<boolean>());
|
||||
readonly onDidChangeVisibility = this._onDidChangeVisibility.event;
|
||||
|
||||
protected override readonly options: IDropdownMenuActionViewItemOptions;
|
||||
|
||||
constructor(
|
||||
action: IAction,
|
||||
menuActionsOrProvider: readonly IAction[] | IActionProvider,
|
||||
contextMenuProvider: IContextMenuProvider,
|
||||
protected options: IDropdownMenuActionViewItemOptions = {}
|
||||
options: IDropdownMenuActionViewItemOptions = Object.create(null)
|
||||
) {
|
||||
super(null, action, options);
|
||||
|
||||
this.menuActionsOrProvider = menuActionsOrProvider;
|
||||
this.contextMenuProvider = contextMenuProvider;
|
||||
this.options = options;
|
||||
|
||||
if (this.options.actionRunner) {
|
||||
this.actionRunner = this.options.actionRunner;
|
||||
}
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
this.actionItem = container;
|
||||
|
||||
const labelRenderer: ILabelRenderer = (el: HTMLElement): IDisposable | null => {
|
||||
@@ -123,7 +126,7 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
|
||||
this.updateEnabled();
|
||||
}
|
||||
|
||||
setActionContext(newContext: unknown): void {
|
||||
override setActionContext(newContext: unknown): void {
|
||||
super.setActionContext(newContext);
|
||||
|
||||
if (this.dropdownMenu) {
|
||||
@@ -141,7 +144,7 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
protected updateEnabled(): void {
|
||||
protected override updateEnabled(): void {
|
||||
const disabled = !this.getAction().enabled;
|
||||
this.actionItem?.classList.toggle('disabled', disabled);
|
||||
this.element?.classList.toggle('disabled', disabled);
|
||||
@@ -166,7 +169,7 @@ export class ActionWithDropdownActionViewItem extends ActionViewItem {
|
||||
super(context, action, options);
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
super.render(container);
|
||||
if (this.element) {
|
||||
this.element.classList.add('action-dropdown-item');
|
||||
|
||||
@@ -382,7 +382,7 @@ export class ReplaceInput extends Widget {
|
||||
this.domNode.style.width = newWidth + 'px';
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,7 +551,7 @@ export class SerializableGrid<T extends ISerializableView> extends Grid<T> {
|
||||
};
|
||||
}
|
||||
|
||||
layout(width: number, height: number): void {
|
||||
override layout(width: number, height: number): void {
|
||||
super.layout(width, height);
|
||||
|
||||
if (this.initialLayoutContext) {
|
||||
|
||||
@@ -610,7 +610,7 @@ export class InputBox extends Widget {
|
||||
}
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._hideMessage();
|
||||
|
||||
this.message = null;
|
||||
|
||||
@@ -188,7 +188,7 @@ class SelectionTrait<T> extends Trait<T> {
|
||||
super('selected');
|
||||
}
|
||||
|
||||
renderIndex(index: number, container: HTMLElement): void {
|
||||
override renderIndex(index: number, container: HTMLElement): void {
|
||||
super.renderIndex(index, container);
|
||||
|
||||
if (this.setAriaSelected) {
|
||||
|
||||
@@ -264,7 +264,7 @@ export class Menu extends ActionBar {
|
||||
}
|
||||
}
|
||||
|
||||
getContainer(): HTMLElement {
|
||||
override getContainer(): HTMLElement {
|
||||
return this.scrollableElement.getDomNode();
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ export class Menu extends ActionBar {
|
||||
}
|
||||
}
|
||||
|
||||
protected updateFocus(fromRight?: boolean): void {
|
||||
protected override updateFocus(fromRight?: boolean): void {
|
||||
super.updateFocus(fromRight, true);
|
||||
|
||||
if (typeof this.focusedItem !== 'undefined') {
|
||||
@@ -385,7 +385,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
|
||||
public container: HTMLElement | undefined;
|
||||
|
||||
protected options: IMenuItemOptions;
|
||||
protected override options: IMenuItemOptions;
|
||||
protected item: HTMLElement | undefined;
|
||||
|
||||
private runOnceToEnableMouseUp: RunOnceScheduler;
|
||||
@@ -465,7 +465,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
this._register(this.runOnceToEnableMouseUp);
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
super.render(container);
|
||||
|
||||
if (!this.element) {
|
||||
@@ -504,12 +504,12 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
this.updateChecked();
|
||||
}
|
||||
|
||||
blur(): void {
|
||||
override blur(): void {
|
||||
super.blur();
|
||||
this.applyStyle();
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
override focus(): void {
|
||||
super.focus();
|
||||
|
||||
if (this.item) {
|
||||
@@ -526,7 +526,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateLabel(): void {
|
||||
override updateLabel(): void {
|
||||
if (!this.label) {
|
||||
return;
|
||||
}
|
||||
@@ -579,7 +579,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateTooltip(): void {
|
||||
override updateTooltip(): void {
|
||||
let title: string | null = null;
|
||||
|
||||
if (this.getAction().tooltip) {
|
||||
@@ -598,7 +598,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateClass(): void {
|
||||
override updateClass(): void {
|
||||
if (this.cssClass && this.item) {
|
||||
this.item.classList.remove(...this.cssClass.split(' '));
|
||||
}
|
||||
@@ -614,7 +614,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateEnabled(): void {
|
||||
override updateEnabled(): void {
|
||||
if (this.getAction().enabled) {
|
||||
if (this.element) {
|
||||
this.element.classList.remove('disabled');
|
||||
@@ -639,7 +639,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
updateChecked(): void {
|
||||
override updateChecked(): void {
|
||||
if (!this.item) {
|
||||
return;
|
||||
}
|
||||
@@ -724,7 +724,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
}, 750);
|
||||
}
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
override render(container: HTMLElement): void {
|
||||
super.render(container);
|
||||
|
||||
if (!this.element) {
|
||||
@@ -783,7 +783,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
}));
|
||||
}
|
||||
|
||||
updateEnabled(): void {
|
||||
override updateEnabled(): void {
|
||||
// override on submenu entry
|
||||
// native menus do not observe enablement on sumbenus
|
||||
// we mimic that behavior
|
||||
@@ -794,7 +794,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
this.createSubmenu(selectFirst);
|
||||
}
|
||||
|
||||
onClick(e: EventLike): void {
|
||||
override onClick(e: EventLike): void {
|
||||
// stop clicking from trying to run an action
|
||||
EventHelper.stop(e, true);
|
||||
|
||||
@@ -925,7 +925,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
protected applyStyle(): void {
|
||||
protected override applyStyle(): void {
|
||||
super.applyStyle();
|
||||
|
||||
if (!this.menuStyle) {
|
||||
@@ -944,7 +944,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
this.hideScheduler.dispose();
|
||||
|
||||
@@ -422,7 +422,7 @@ export class MenuBar extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
this.menuCache.forEach(menuBarMenu => {
|
||||
|
||||
@@ -484,7 +484,7 @@ export class Sash extends Disposable {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
this.el.remove();
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ export abstract class AbstractScrollableElement extends Widget {
|
||||
this._revealOnScroll = true;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._mouseWheelToDispose = dispose(this._mouseWheelToDispose);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -1046,7 +1046,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
}
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this.hideSelectDropDown(false);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.monaco-pane-view .pane > .pane-header > .actions .action-item {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.monaco-pane-view .pane > .pane-header > .actions .action-label {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ export class PaneView extends Disposable {
|
||||
}, 200);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
this.paneItems.forEach(i => i.disposable.dispose());
|
||||
|
||||
@@ -1022,7 +1022,7 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
this.viewItems.forEach(i => i.dispose());
|
||||
|
||||
@@ -181,7 +181,7 @@ export class ToolBar extends Disposable {
|
||||
this.actionBar.clear();
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.clear();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -202,7 +202,7 @@ class ToggleMenuAction extends Action {
|
||||
this.toggleDropdownMenu = toggleDropdownMenu;
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
async override run(): Promise<void> {
|
||||
this.toggleDropdownMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@ import { treeItemExpandedIcon, treeFilterOnTypeOnIcon, treeFilterOnTypeOffIcon,
|
||||
|
||||
class TreeElementsDragAndDropData<T, TFilterData, TContext> extends ElementsDragAndDropData<T, TContext> {
|
||||
|
||||
set context(context: TContext | undefined) {
|
||||
override set context(context: TContext | undefined) {
|
||||
this.data.context = context;
|
||||
}
|
||||
|
||||
get context(): TContext | undefined {
|
||||
override get context(): TContext | undefined {
|
||||
return this.data.context;
|
||||
}
|
||||
|
||||
@@ -1091,7 +1091,7 @@ class TreeNodeListMouseController<T, TFilterData, TRef> extends MouseController<
|
||||
super(list);
|
||||
}
|
||||
|
||||
protected onViewPointer(e: IListMouseEvent<ITreeNode<T, TFilterData>>): void {
|
||||
protected override onViewPointer(e: IListMouseEvent<ITreeNode<T, TFilterData>>): void {
|
||||
if (isInputElement(e.browserEvent.target as HTMLElement) || isMonacoEditor(e.browserEvent.target as HTMLElement)) {
|
||||
return;
|
||||
}
|
||||
@@ -1141,7 +1141,7 @@ class TreeNodeListMouseController<T, TFilterData, TRef> extends MouseController<
|
||||
super.onViewPointer(e);
|
||||
}
|
||||
|
||||
protected onDoubleClick(e: IListMouseEvent<ITreeNode<T, TFilterData>>): void {
|
||||
protected override onDoubleClick(e: IListMouseEvent<ITreeNode<T, TFilterData>>): void {
|
||||
const onTwistie = (e.browserEvent.target as HTMLElement).classList.contains('monaco-tl-twistie');
|
||||
|
||||
if (onTwistie || !this.tree.expandOnDoubleClick) {
|
||||
@@ -1175,11 +1175,11 @@ class TreeNodeList<T, TFilterData, TRef> extends List<ITreeNode<T, TFilterData>>
|
||||
super(user, container, virtualDelegate, renderers, options);
|
||||
}
|
||||
|
||||
protected createMouseController(options: ITreeNodeListOptions<T, TFilterData, TRef>): MouseController<ITreeNode<T, TFilterData>> {
|
||||
protected override createMouseController(options: ITreeNodeListOptions<T, TFilterData, TRef>): MouseController<ITreeNode<T, TFilterData>> {
|
||||
return new TreeNodeListMouseController(this, options.tree);
|
||||
}
|
||||
|
||||
splice(start: number, deleteCount: number, elements: ITreeNode<T, TFilterData>[] = []): void {
|
||||
override splice(start: number, deleteCount: number, elements: ITreeNode<T, TFilterData>[] = []): void {
|
||||
super.splice(start, deleteCount, elements);
|
||||
|
||||
if (elements.length === 0) {
|
||||
@@ -1217,7 +1217,7 @@ class TreeNodeList<T, TFilterData, TRef> extends List<ITreeNode<T, TFilterData>>
|
||||
}
|
||||
}
|
||||
|
||||
setFocus(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void {
|
||||
override setFocus(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void {
|
||||
super.setFocus(indexes, browserEvent);
|
||||
|
||||
if (!fromAPI) {
|
||||
@@ -1225,7 +1225,7 @@ class TreeNodeList<T, TFilterData, TRef> extends List<ITreeNode<T, TFilterData>>
|
||||
}
|
||||
}
|
||||
|
||||
setSelection(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void {
|
||||
override setSelection(indexes: number[], browserEvent?: UIEvent, fromAPI = false): void {
|
||||
super.setSelection(indexes, browserEvent);
|
||||
|
||||
if (!fromAPI) {
|
||||
@@ -1233,7 +1233,7 @@ class TreeNodeList<T, TFilterData, TRef> extends List<ITreeNode<T, TFilterData>>
|
||||
}
|
||||
}
|
||||
|
||||
setAnchor(index: number | undefined, fromAPI = false): void {
|
||||
override setAnchor(index: number | undefined, fromAPI = false): void {
|
||||
super.setAnchor(index);
|
||||
|
||||
if (!fromAPI) {
|
||||
|
||||
@@ -157,11 +157,11 @@ function asTreeContextMenuEvent<TInput, T>(e: ITreeContextMenuEvent<IAsyncDataTr
|
||||
|
||||
class AsyncDataTreeElementsDragAndDropData<TInput, T, TContext> extends ElementsDragAndDropData<T, TContext> {
|
||||
|
||||
set context(context: TContext | undefined) {
|
||||
override set context(context: TContext | undefined) {
|
||||
this.data.context = context;
|
||||
}
|
||||
|
||||
get context(): TContext | undefined {
|
||||
override get context(): TContext | undefined {
|
||||
return this.data.context;
|
||||
}
|
||||
|
||||
@@ -1148,7 +1148,7 @@ export class CompressibleAsyncDataTree<TInput, T, TFilterData = void> extends As
|
||||
this.filter = options.filter;
|
||||
}
|
||||
|
||||
protected createTree(
|
||||
protected override createTree(
|
||||
user: string,
|
||||
container: HTMLElement,
|
||||
delegate: IListVirtualDelegate<T>,
|
||||
@@ -1162,18 +1162,18 @@ export class CompressibleAsyncDataTree<TInput, T, TFilterData = void> extends As
|
||||
return new CompressibleObjectTree(user, container, objectTreeDelegate, objectTreeRenderers, objectTreeOptions);
|
||||
}
|
||||
|
||||
protected asTreeElement(node: IAsyncDataTreeNode<TInput, T>, viewStateContext?: IAsyncDataTreeViewStateContext<TInput, T>): ICompressedTreeElement<IAsyncDataTreeNode<TInput, T>> {
|
||||
protected override asTreeElement(node: IAsyncDataTreeNode<TInput, T>, viewStateContext?: IAsyncDataTreeViewStateContext<TInput, T>): ICompressedTreeElement<IAsyncDataTreeNode<TInput, T>> {
|
||||
return {
|
||||
incompressible: this.compressionDelegate.isIncompressible(node.element as T),
|
||||
...super.asTreeElement(node, viewStateContext)
|
||||
};
|
||||
}
|
||||
|
||||
updateOptions(options: ICompressibleAsyncDataTreeOptionsUpdate = {}): void {
|
||||
override updateOptions(options: ICompressibleAsyncDataTreeOptionsUpdate = {}): void {
|
||||
this.tree.updateOptions(options);
|
||||
}
|
||||
|
||||
getViewState(): IAsyncDataTreeViewState {
|
||||
override getViewState(): IAsyncDataTreeViewState {
|
||||
if (!this.identityProvider) {
|
||||
throw new TreeError(this.user, 'Can\'t get tree view state without an identity provider');
|
||||
}
|
||||
@@ -1201,7 +1201,7 @@ export class CompressibleAsyncDataTree<TInput, T, TFilterData = void> extends As
|
||||
return { focus, selection, expanded, scrollTop: this.scrollTop };
|
||||
}
|
||||
|
||||
protected render(node: IAsyncDataTreeNode<TInput, T>, viewStateContext?: IAsyncDataTreeViewStateContext<TInput, T>): void {
|
||||
protected override render(node: IAsyncDataTreeNode<TInput, T>, viewStateContext?: IAsyncDataTreeViewStateContext<TInput, T>): void {
|
||||
if (!this.identityProvider) {
|
||||
return super.render(node, viewStateContext);
|
||||
}
|
||||
@@ -1277,7 +1277,7 @@ export class CompressibleAsyncDataTree<TInput, T, TFilterData = void> extends As
|
||||
// For compressed async data trees, `TreeVisibility.Recurse` doesn't currently work
|
||||
// and we have to filter everything beforehand
|
||||
// Related to #85193 and #85835
|
||||
protected processChildren(children: Iterable<T>): Iterable<T> {
|
||||
protected override processChildren(children: Iterable<T>): Iterable<T> {
|
||||
if (this.filter) {
|
||||
children = Iterable.filter(children, e => {
|
||||
const result = this.filter!.filter(e, TreeVisibility.Visible);
|
||||
|
||||
@@ -40,7 +40,7 @@ export class ObjectTree<T extends NonNullable<any>, TFilterData = void> extends
|
||||
|
||||
protected model!: IObjectTreeModel<T, TFilterData>;
|
||||
|
||||
get onDidChangeCollapseState(): Event<ICollapseStateChangeEvent<T | null, TFilterData>> { return this.model.onDidChangeCollapseState; }
|
||||
override get onDidChangeCollapseState(): Event<ICollapseStateChangeEvent<T | null, TFilterData>> { return this.model.onDidChangeCollapseState; }
|
||||
|
||||
constructor(
|
||||
user: string,
|
||||
@@ -208,15 +208,15 @@ export class CompressibleObjectTree<T extends NonNullable<any>, TFilterData = vo
|
||||
super(user, container, delegate, compressibleRenderers, asObjectTreeOptions<T, TFilterData>(compressedTreeNodeProvider, options));
|
||||
}
|
||||
|
||||
setChildren(element: T | null, children: Iterable<ICompressedTreeElement<T>> = Iterable.empty(), options?: IObjectTreeSetChildrenOptions<T>): void {
|
||||
override setChildren(element: T | null, children: Iterable<ICompressedTreeElement<T>> = Iterable.empty(), options?: IObjectTreeSetChildrenOptions<T>): void {
|
||||
this.model.setChildren(element, children, options);
|
||||
}
|
||||
|
||||
protected createModel(user: string, view: IList<ITreeNode<T, TFilterData>>, options: ICompressibleObjectTreeOptions<T, TFilterData>): ITreeModel<T | null, TFilterData, T | null> {
|
||||
protected override createModel(user: string, view: IList<ITreeNode<T, TFilterData>>, options: ICompressibleObjectTreeOptions<T, TFilterData>): ITreeModel<T | null, TFilterData, T | null> {
|
||||
return new CompressibleObjectTreeModel(user, view, options);
|
||||
}
|
||||
|
||||
updateOptions(optionsUpdate: ICompressibleObjectTreeOptionsUpdate = {}): void {
|
||||
override updateOptions(optionsUpdate: ICompressibleObjectTreeOptionsUpdate = {}): void {
|
||||
super.updateOptions(optionsUpdate);
|
||||
|
||||
if (typeof optionsUpdate.compressionEnabled !== 'undefined') {
|
||||
|
||||
@@ -13,7 +13,7 @@ export class CollapseAllAction<TInput, T, TFilterData = void> extends Action {
|
||||
super('vs.tree.collapse', nls.localize('collapse all', "Collapse All"), 'collapse-all', enabled);
|
||||
}
|
||||
|
||||
async run(): Promise<any> {
|
||||
async override run(): Promise<any> {
|
||||
this.viewer.collapseAll();
|
||||
this.viewer.setSelection([]);
|
||||
this.viewer.setFocus([]);
|
||||
|
||||
@@ -381,7 +381,7 @@ export class AutoOpenBarrier extends Barrier {
|
||||
this._timeout = setTimeout(() => this.open(), autoOpenTimeMs);
|
||||
}
|
||||
|
||||
open(): void {
|
||||
override open(): void {
|
||||
clearTimeout(this._timeout);
|
||||
super.open();
|
||||
}
|
||||
@@ -772,7 +772,7 @@ export class RunOnceWorker<T> extends RunOnceScheduler {
|
||||
}
|
||||
}
|
||||
|
||||
protected doRun(): void {
|
||||
protected override doRun(): void {
|
||||
const units = this.units;
|
||||
this.units = [];
|
||||
|
||||
@@ -781,7 +781,7 @@ export class RunOnceWorker<T> extends RunOnceScheduler {
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.units = [];
|
||||
|
||||
super.dispose();
|
||||
|
||||
@@ -674,7 +674,7 @@ export class PauseableEmitter<T> extends Emitter<T> {
|
||||
}
|
||||
}
|
||||
|
||||
fire(event: T): void {
|
||||
override fire(event: T): void {
|
||||
if (this._listeners) {
|
||||
if (this._isPaused !== 0) {
|
||||
this._eventQueue.push(event);
|
||||
|
||||
@@ -1028,7 +1028,7 @@ export class LRUCache<K, V> extends LinkedMap<K, V> {
|
||||
this.checkTrim();
|
||||
}
|
||||
|
||||
get(key: K, touch: Touch = Touch.AsNew): V | undefined {
|
||||
override get(key: K, touch: Touch = Touch.AsNew): V | undefined {
|
||||
return super.get(key, touch);
|
||||
}
|
||||
|
||||
@@ -1036,7 +1036,7 @@ export class LRUCache<K, V> extends LinkedMap<K, V> {
|
||||
return super.get(key, Touch.None);
|
||||
}
|
||||
|
||||
set(key: K, value: V): this {
|
||||
override set(key: K, value: V): this {
|
||||
super.set(key, value, Touch.AsNew);
|
||||
this.checkTrim();
|
||||
return this;
|
||||
|
||||
@@ -73,11 +73,6 @@ export namespace Schemas {
|
||||
*/
|
||||
export const vscodeWebview = 'vscode-webview';
|
||||
|
||||
/**
|
||||
* Scheme used for loading resources inside of webviews.
|
||||
*/
|
||||
export const vscodeWebviewResource = 'vscode-webview-resource';
|
||||
|
||||
/**
|
||||
* Scheme used for extension pages
|
||||
*/
|
||||
|
||||
@@ -223,7 +223,7 @@ export class Scrollable extends Disposable {
|
||||
this._smoothScrolling = null;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._smoothScrolling) {
|
||||
this._smoothScrolling.dispose();
|
||||
this._smoothScrolling = null;
|
||||
|
||||
@@ -418,14 +418,14 @@ class Uri extends URI {
|
||||
_formatted: string | null = null;
|
||||
_fsPath: string | null = null;
|
||||
|
||||
get fsPath(): string {
|
||||
override get fsPath(): string {
|
||||
if (!this._fsPath) {
|
||||
this._fsPath = uriToFsPath(this, false);
|
||||
}
|
||||
return this._fsPath;
|
||||
}
|
||||
|
||||
toString(skipEncoding: boolean = false): string {
|
||||
override toString(skipEncoding: boolean = false): string {
|
||||
if (!skipEncoding) {
|
||||
if (!this._formatted) {
|
||||
this._formatted = _asFormatted(this, false);
|
||||
@@ -437,7 +437,7 @@ class Uri extends URI {
|
||||
}
|
||||
}
|
||||
|
||||
toJSON(): UriComponents {
|
||||
override toJSON(): UriComponents {
|
||||
const res = <UriState>{
|
||||
$mid: 1
|
||||
};
|
||||
|
||||
@@ -379,7 +379,7 @@ export class LineProcess extends AbstractProcess<LineData> {
|
||||
this.stderrLineDecoder = stderrLineDecoder;
|
||||
}
|
||||
|
||||
protected handleClose(data: any, cc: ValueCallback<SuccessData>, pp: ProgressCallback<LineData>, ee: ErrorCallback): void {
|
||||
protected override handleClose(data: any, cc: ValueCallback<SuccessData>, pp: ProgressCallback<LineData>, ee: ErrorCallback): void {
|
||||
const stdoutLine = this.stdoutLineDecoder ? this.stdoutLineDecoder.end() : null;
|
||||
if (stdoutLine) {
|
||||
pp({ line: stdoutLine, source: Source.stdout });
|
||||
|
||||
@@ -72,7 +72,7 @@ export class Client extends IPCClient implements IDisposable {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.protocol.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ class ProtocolReader extends Disposable {
|
||||
return this._incomingData.read(this._incomingData.byteLength);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._isDisposed = true;
|
||||
super.dispose();
|
||||
}
|
||||
@@ -412,7 +412,7 @@ export class Client<TContext = string> extends IPCClient<TContext> {
|
||||
super(protocol, id, ipcLogger);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
const socket = this.protocol.getSocket();
|
||||
this.protocol.sendDisconnect();
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Client extends IPCClient implements IDisposable {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.protocol.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ export class WebSocketNodeSocket extends Disposable implements ISocket {
|
||||
this._register(this.socket.onClose(() => this._onClose.fire()));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._zlibDeflateFlushWaitingCount > 0) {
|
||||
// Wait for any outstanding writes to finish before disposing
|
||||
this._register(this._onDidZlibFlush.event(() => {
|
||||
@@ -581,7 +581,7 @@ export class Server extends IPCServer {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
super.dispose();
|
||||
if (this.server) {
|
||||
this.server.close();
|
||||
|
||||
@@ -66,7 +66,7 @@ class TestIPCClient extends IPCClient<string> {
|
||||
super(protocol, id);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this._onDidDisconnect.fire();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
display: flex;
|
||||
margin-left: 4px;
|
||||
flex: 1;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.quick-input-left-action-bar.monaco-action-bar .actions-container {
|
||||
@@ -35,12 +36,10 @@
|
||||
display: flex;
|
||||
margin-right: 4px;
|
||||
flex: 1;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.quick-input-titlebar .monaco-action-bar .action-label.codicon {
|
||||
margin: 0;
|
||||
width: 19px;
|
||||
height: 100%;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@@ -260,10 +259,8 @@
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
padding: 0 2px;
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry-action-bar {
|
||||
@@ -274,10 +271,6 @@
|
||||
margin-right: 4px; /* separate from scrollbar */
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {
|
||||
margin-right: 4px; /* separate actions */
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,
|
||||
.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,
|
||||
.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {
|
||||
|
||||
@@ -410,7 +410,7 @@ class QuickInput extends Disposable implements IQuickInput {
|
||||
|
||||
readonly onDispose = this.onDisposeEmitter.event;
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.hide();
|
||||
this.onDisposeEmitter.fire();
|
||||
|
||||
@@ -694,7 +694,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
|
||||
}
|
||||
}
|
||||
|
||||
show() {
|
||||
override show() {
|
||||
if (!this.visible) {
|
||||
this.visibleDisposables.add(
|
||||
this.ui.inputBox.onDidChange(value => {
|
||||
@@ -884,7 +884,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
|
||||
});
|
||||
}
|
||||
|
||||
protected update() {
|
||||
protected override update() {
|
||||
if (!this.visible) {
|
||||
return;
|
||||
}
|
||||
@@ -1063,7 +1063,7 @@ class InputBox extends QuickInput implements IInputBox {
|
||||
|
||||
readonly onDidAccept = this.onDidAcceptEmitter.event;
|
||||
|
||||
show() {
|
||||
override show() {
|
||||
if (!this.visible) {
|
||||
this.visibleDisposables.add(
|
||||
this.ui.inputBox.onDidChange(value => {
|
||||
@@ -1079,7 +1079,7 @@ class InputBox extends QuickInput implements IInputBox {
|
||||
super.show();
|
||||
}
|
||||
|
||||
protected update() {
|
||||
protected override update() {
|
||||
if (!this.visible) {
|
||||
return;
|
||||
}
|
||||
@@ -1388,8 +1388,12 @@ export class QuickInputController extends Disposable {
|
||||
const index = input.items.indexOf(event.item);
|
||||
if (index !== -1) {
|
||||
const items = input.items.slice();
|
||||
items.splice(index, 1);
|
||||
const removed = items.splice(index, 1);
|
||||
const activeItems = input.activeItems.filter((ai) => ai !== removed[0]);
|
||||
input.items = items;
|
||||
if (activeItems) {
|
||||
input.activeItems = activeItems;
|
||||
}
|
||||
}
|
||||
}
|
||||
})),
|
||||
|
||||
@@ -320,7 +320,7 @@ export class Storage extends Disposable implements IStorage {
|
||||
return new Promise(resolve => this.whenFlushedCallbacks.push(resolve));
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this.flushDelayer.cancel(); // workaround https://github.com/microsoft/vscode/issues/116777
|
||||
this.flushDelayer.dispose();
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ flakySuite('Storage Library', function () {
|
||||
|
||||
class TestSQLiteStorageDatabase extends SQLiteStorageDatabase {
|
||||
private readonly _onDidChangeItemsExternal = new Emitter<IStorageItemsChangeEvent>();
|
||||
get onDidChangeItemsExternal(): Event<IStorageItemsChangeEvent> { return this._onDidChangeItemsExternal.event; }
|
||||
override get onDidChangeItemsExternal(): Event<IStorageItemsChangeEvent> { return this._onDidChangeItemsExternal.event; }
|
||||
|
||||
fireDidChangeItemsExternal(event: IStorageItemsChangeEvent): void {
|
||||
this._onDidChangeItemsExternal.fire(event);
|
||||
|
||||
@@ -93,6 +93,7 @@ import { ISignService } from 'vs/platform/sign/common/sign';
|
||||
* even if the user starts many instances (e.g. from the command line).
|
||||
*/
|
||||
export class CodeApplication extends Disposable {
|
||||
|
||||
private windowsMainService: IWindowsMainService | undefined;
|
||||
private nativeHostMainService: INativeHostMainService | undefined;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { app, dialog } from 'electron';
|
||||
import { promises, unlinkSync } from 'fs';
|
||||
import { localize } from 'vs/nls';
|
||||
import { isWindows, IProcessEnvironment, isMacintosh } from 'vs/base/common/platform';
|
||||
import { mark } from 'vs/base/common/performance';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { parseMainProcessArgv, addArg } from 'vs/platform/environment/node/argvHelper';
|
||||
import { createWaitMarkerFile } from 'vs/platform/environment/node/wait';
|
||||
@@ -107,7 +108,7 @@ class CodeMain {
|
||||
// Create the main IPC server by trying to be the server
|
||||
// If this throws an error it means we are not the first
|
||||
// instance of VS Code running and so we would quit.
|
||||
const mainProcessNodeIpcServer = await this.doStartup(logService, environmentService, lifecycleMainService, instantiationService, productService, true);
|
||||
const mainProcessNodeIpcServer = await this.claimInstance(logService, environmentService, lifecycleMainService, instantiationService, productService, true);
|
||||
|
||||
// Delay creation of spdlog for perf reasons (https://github.com/microsoft/vscode/issues/72906)
|
||||
bufferLogService.logger = new SpdLogLogger('main', join(environmentService.logsPath, 'main.log'), true, bufferLogService.getLevel());
|
||||
@@ -221,14 +222,16 @@ class CodeMain {
|
||||
return Promise.all([environmentServiceInitialization, configurationServiceInitialization, stateServiceInitialization]);
|
||||
}
|
||||
|
||||
private async doStartup(logService: ILogService, environmentMainService: IEnvironmentMainService, lifecycleMainService: ILifecycleMainService, instantiationService: IInstantiationService, productService: IProductService, retry: boolean): Promise<NodeIPCServer> {
|
||||
private async claimInstance(logService: ILogService, environmentMainService: IEnvironmentMainService, lifecycleMainService: ILifecycleMainService, instantiationService: IInstantiationService, productService: IProductService, retry: boolean): Promise<NodeIPCServer> {
|
||||
|
||||
// Try to setup a server for running. If that succeeds it means
|
||||
// we are the first instance to startup. Otherwise it is likely
|
||||
// that another instance is already running.
|
||||
let mainProcessNodeIpcServer: NodeIPCServer;
|
||||
try {
|
||||
mark('code/willStartMainServer');
|
||||
mainProcessNodeIpcServer = await nodeIPCServe(environmentMainService.mainIPCHandle);
|
||||
mark('code/didStartMainServer');
|
||||
once(lifecycleMainService.onWillShutdown)(() => mainProcessNodeIpcServer.dispose());
|
||||
} catch (error) {
|
||||
|
||||
@@ -273,7 +276,7 @@ class CodeMain {
|
||||
throw error;
|
||||
}
|
||||
|
||||
return this.doStartup(logService, environmentMainService, lifecycleMainService, instantiationService, productService, false);
|
||||
return this.claimInstance(logService, environmentMainService, lifecycleMainService, instantiationService, productService, false);
|
||||
}
|
||||
|
||||
// Tests from CLI require to be the only instance currently
|
||||
|
||||
@@ -112,7 +112,7 @@ class CSSBasedConfiguration extends Disposable {
|
||||
this._evictUntrustedReadingsTimeout = -1;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._evictUntrustedReadingsTimeout !== -1) {
|
||||
clearTimeout(this._evictUntrustedReadingsTimeout);
|
||||
this._evictUntrustedReadingsTimeout = -1;
|
||||
@@ -353,11 +353,11 @@ export class Configuration extends CommonEditorConfiguration {
|
||||
this._recomputeOptions();
|
||||
}
|
||||
|
||||
public observeReferenceElement(dimension?: IDimension): void {
|
||||
public override observeReferenceElement(dimension?: IDimension): void {
|
||||
this._elementSizeObserver.observe(dimension);
|
||||
}
|
||||
|
||||
public updatePixelRatio(): void {
|
||||
public override updatePixelRatio(): void {
|
||||
this._recomputeOptions();
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export class ElementSizeObserver extends Disposable {
|
||||
this.measureReferenceDomElement(false, dimension);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this.stopObserving();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -133,13 +133,13 @@ export class MouseHandler extends ViewEventHandler {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
// --- begin event handlers
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
if (e.hasChanged(EditorOption.layoutInfo)) {
|
||||
// layout change
|
||||
const height = this._context.configuration.options.get(EditorOption.layoutInfo).height;
|
||||
@@ -150,14 +150,14 @@ export class MouseHandler extends ViewEventHandler {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
this._mouseDownOperation.onCursorStateChanged(e);
|
||||
return false;
|
||||
}
|
||||
public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
public override onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
return false;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
this._mouseDownOperation.onScrollChanged();
|
||||
return false;
|
||||
}
|
||||
@@ -311,7 +311,7 @@ class MouseDownOperation extends Disposable {
|
||||
this._lastMouseEvent = null;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ class HitTestRequest extends BareHitTestRequest {
|
||||
}
|
||||
}
|
||||
|
||||
public toString(): string {
|
||||
public override toString(): string {
|
||||
return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target ? (<HTMLElement>this.target).outerHTML : null}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export class PointerEventHandler extends MouseHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public _onMouseDown(e: EditorMouseEvent): void {
|
||||
public override _onMouseDown(e: EditorMouseEvent): void {
|
||||
if ((e.browserEvent as any).pointerType === 'touch') {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ export class TextAreaHandler extends ViewPart {
|
||||
}));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ export class TextAreaHandler extends ViewPart {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
|
||||
@@ -454,34 +454,34 @@ export class TextAreaHandler extends ViewPart {
|
||||
|
||||
return true;
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
this._selections = e.selections.slice(0);
|
||||
this._modelSelections = e.modelSelections.slice(0);
|
||||
this._textAreaInput.writeScreenReaderContent('selection changed');
|
||||
return true;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
// true for inline decorations that can end up relayouting text
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
this._scrollLeft = e.scrollLeft;
|
||||
this._scrollTop = e.scrollTop;
|
||||
return true;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -524,7 +524,7 @@ export class TextAreaInput extends Disposable {
|
||||
});
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
if (this._selectionChangeListener) {
|
||||
this._selectionChangeListener.dispose();
|
||||
|
||||
@@ -119,7 +119,7 @@ export class EditorStateCancellationTokenSource extends EditorKeybindingCancella
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
override dispose() {
|
||||
this._listener.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -137,7 +137,7 @@ export class TextModelCancellationTokenSource extends CancellationTokenSource im
|
||||
this._listener = model.onDidChangeContent(() => this.cancel());
|
||||
}
|
||||
|
||||
dispose() {
|
||||
override dispose() {
|
||||
this._listener.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export class EditorKeybindingCancellationTokenSource extends CancellationTokenSo
|
||||
this._unregister = editor.invokeWithinContext(accessor => accessor.get(IEditorCancellationTokens).add(editor, this));
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
override dispose(): void {
|
||||
this._unregister();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export class ResourceTextEdit extends ResourceEdit {
|
||||
readonly resource: URI,
|
||||
readonly textEdit: TextEdit,
|
||||
readonly versionId?: number,
|
||||
readonly metadata?: WorkspaceEditMetadata
|
||||
metadata?: WorkspaceEditMetadata
|
||||
) {
|
||||
super(metadata);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ export class ResourceFileEdit extends ResourceEdit {
|
||||
readonly oldResource: URI | undefined,
|
||||
readonly newResource: URI | undefined,
|
||||
readonly options?: WorkspaceFileEditOptions,
|
||||
readonly metadata?: WorkspaceEditMetadata
|
||||
metadata?: WorkspaceEditMetadata
|
||||
) {
|
||||
super(metadata);
|
||||
}
|
||||
|
||||
@@ -300,32 +300,32 @@ export class View extends ViewEventHandler {
|
||||
}
|
||||
|
||||
// --- begin event handlers
|
||||
public handleEvents(events: viewEvents.ViewEvent[]): void {
|
||||
public override handleEvents(events: viewEvents.ViewEvent[]): void {
|
||||
super.handleEvents(events);
|
||||
this._scheduleRender();
|
||||
}
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
this._configPixelRatio = this._context.configuration.options.get(EditorOption.pixelRatio);
|
||||
this.domNode.setClassName(this._getEditorClassName());
|
||||
this._applyLayout();
|
||||
return false;
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
this._selections = e.selections;
|
||||
return false;
|
||||
}
|
||||
public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
public override onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
this.domNode.setClassName(this._getEditorClassName());
|
||||
return false;
|
||||
}
|
||||
public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
this.domNode.setClassName(this._getEditorClassName());
|
||||
return false;
|
||||
}
|
||||
|
||||
// --- end event handlers
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._renderAnimationFrame !== null) {
|
||||
this._renderAnimationFrame.dispose();
|
||||
this._renderAnimationFrame = null;
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ViewOverlays extends ViewPart implements IVisibleLinesHost<ViewOver
|
||||
this.domNode.setClassName('view-overlays');
|
||||
}
|
||||
|
||||
public shouldRender(): boolean {
|
||||
public override shouldRender(): boolean {
|
||||
if (super.shouldRender()) {
|
||||
return true;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ export class ViewOverlays extends ViewPart implements IVisibleLinesHost<ViewOver
|
||||
return false;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) {
|
||||
@@ -79,7 +79,7 @@ export class ViewOverlays extends ViewPart implements IVisibleLinesHost<ViewOver
|
||||
|
||||
// ----- event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
this._visibleLines.onConfigurationChanged(e);
|
||||
const startLineNumber = this._visibleLines.getStartLineNumber();
|
||||
const endLineNumber = this._visibleLines.getEndLineNumber();
|
||||
@@ -89,29 +89,29 @@ export class ViewOverlays extends ViewPart implements IVisibleLinesHost<ViewOver
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return this._visibleLines.onFlushed(e);
|
||||
}
|
||||
public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
public override onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
this._isFocused = e.isFocused;
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return this._visibleLines.onLinesChanged(e);
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return this._visibleLines.onLinesDeleted(e);
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return this._visibleLines.onLinesInserted(e);
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return this._visibleLines.onScrollChanged(e) || true;
|
||||
}
|
||||
public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean {
|
||||
public override onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean {
|
||||
return this._visibleLines.onTokensChanged(e);
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return this._visibleLines.onZonesChanged(e);
|
||||
}
|
||||
|
||||
@@ -224,19 +224,19 @@ export class ContentViewOverlays extends ViewOverlays {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
return super.onConfigurationChanged(e) || true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return super.onScrollChanged(e) || e.scrollWidthChanged;
|
||||
}
|
||||
|
||||
// --- end event handlers
|
||||
|
||||
_viewOverlaysRender(ctx: RestrictedRenderingContext): void {
|
||||
override _viewOverlaysRender(ctx: RestrictedRenderingContext): void {
|
||||
super._viewOverlaysRender(ctx);
|
||||
|
||||
this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth));
|
||||
@@ -260,7 +260,7 @@ export class MarginViewOverlays extends ViewOverlays {
|
||||
Configuration.applyFontInfo(this.domNode, options.get(EditorOption.fontInfo));
|
||||
}
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
Configuration.applyFontInfo(this.domNode, options.get(EditorOption.fontInfo));
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
@@ -268,11 +268,11 @@ export class MarginViewOverlays extends ViewOverlays {
|
||||
return super.onConfigurationChanged(e) || true;
|
||||
}
|
||||
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return super.onScrollChanged(e) || e.scrollHeightChanged;
|
||||
}
|
||||
|
||||
_viewOverlaysRender(ctx: RestrictedRenderingContext): void {
|
||||
override _viewOverlaysRender(ctx: RestrictedRenderingContext): void {
|
||||
super._viewOverlaysRender(ctx);
|
||||
const height = Math.min(ctx.scrollHeight, 1000000);
|
||||
this.domNode.setHeight(height);
|
||||
|
||||
@@ -18,7 +18,7 @@ export abstract class ViewPart extends ViewEventHandler {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -53,47 +53,47 @@ export class ViewContentWidgets extends ViewPart {
|
||||
this.overflowingContentWidgetsDomNode.setClassName('overflowingContentWidgets');
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._widgets = {};
|
||||
}
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const keys = Object.keys(this._widgets);
|
||||
for (const widgetId of keys) {
|
||||
this._widgets[widgetId].onConfigurationChanged(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
// true for inline decorations that can end up relayouting text
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLineMappingChanged(e: viewEvents.ViewLineMappingChangedEvent): boolean {
|
||||
public override onLineMappingChanged(e: viewEvents.ViewLineMappingChangedEvent): boolean {
|
||||
const keys = Object.keys(this._widgets);
|
||||
for (const widgetId of keys) {
|
||||
this._widgets[widgetId].onLineMappingChanged(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ export abstract class AbstractLineHighlightOverlay extends DynamicViewOverlay {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
super.dispose();
|
||||
}
|
||||
@@ -77,10 +77,10 @@ export abstract class AbstractLineHighlightOverlay extends DynamicViewOverlay {
|
||||
}
|
||||
|
||||
// --- begin event handlers
|
||||
public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
return this._readFromSelections();
|
||||
}
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
this._lineHeight = options.get(EditorOption.lineHeight);
|
||||
@@ -90,26 +90,26 @@ export abstract class AbstractLineHighlightOverlay extends DynamicViewOverlay {
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
return true;
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
this._selections = e.selections;
|
||||
return this._readFromSelections();
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollWidthChanged || e.scrollTopChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
public override onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean {
|
||||
if (!this._renderLineHighlightOnlyWhenFocus) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export class DecorationsOverlay extends DynamicViewOverlay {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
this._renderResult = null;
|
||||
super.dispose();
|
||||
@@ -38,31 +38,31 @@ export class DecorationsOverlay extends DynamicViewOverlay {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
this._lineHeight = options.get(EditorOption.lineHeight);
|
||||
this._typicalHalfwidthCharacterWidth = options.get(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;
|
||||
return true;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollTopChanged || e.scrollWidthChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
// --- end event handlers
|
||||
|
||||
@@ -99,7 +99,7 @@ export class EditorScrollbar extends ViewPart {
|
||||
this._register(dom.addDisposableListener(this.scrollbarDomNode.domNode, 'scroll', (e: Event) => onBrowserDesperateReveal(this.scrollbarDomNode.domNode, true, false)));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ export class EditorScrollbar extends ViewPart {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
if (
|
||||
e.hasChanged(EditorOption.scrollbar)
|
||||
|| e.hasChanged(EditorOption.mouseWheelScrollSensitivity)
|
||||
@@ -157,10 +157,10 @@ export class EditorScrollbar extends ViewPart {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
this.scrollbar.updateClassName('editor-scrollable' + ' ' + getThemeTypeSelector(this._context.theme.type));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ export class GlyphMarginOverlay extends DedupOverlay {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
this._renderResult = null;
|
||||
super.dispose();
|
||||
@@ -106,7 +106,7 @@ export class GlyphMarginOverlay extends DedupOverlay {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
|
||||
@@ -116,25 +116,25 @@ export class GlyphMarginOverlay extends DedupOverlay {
|
||||
this._glyphMarginWidth = layoutInfo.glyphMarginWidth;
|
||||
return true;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollTopChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
this._renderResult = null;
|
||||
super.dispose();
|
||||
@@ -53,7 +53,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const wrappingInfo = options.get(EditorOption.wrappingInfo);
|
||||
const fontInfo = options.get(EditorOption.fontInfo);
|
||||
@@ -65,7 +65,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
|
||||
this._maxIndentLeft = wrappingInfo.wrappingColumn === -1 ? -1 : (wrappingInfo.wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth);
|
||||
return true;
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
const selection = e.selections[0];
|
||||
const newPrimaryLineNumber = selection.isEmpty() ? selection.positionLineNumber : 0;
|
||||
|
||||
@@ -76,29 +76,29 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
|
||||
|
||||
return false;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
// true for inline decorations
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollTopChanged;// || e.scrollWidthChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLanguageConfigurationChanged(e: viewEvents.ViewLanguageConfigurationEvent): boolean {
|
||||
public override onLanguageConfigurationChanged(e: viewEvents.ViewLanguageConfigurationEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export class LineNumbersOverlay extends DynamicViewOverlay {
|
||||
this._lineNumbersWidth = layoutInfo.lineNumbersWidth;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
this._renderResult = null;
|
||||
super.dispose();
|
||||
@@ -62,11 +62,11 @@ export class LineNumbersOverlay extends DynamicViewOverlay {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
this._readConfig();
|
||||
return true;
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
const primaryViewPosition = e.selections[0].getPosition();
|
||||
this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition);
|
||||
|
||||
@@ -80,22 +80,22 @@ export class LineNumbersOverlay extends DynamicViewOverlay {
|
||||
}
|
||||
return shouldRender;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollTopChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -662,7 +662,7 @@ class RenderedViewLine implements IRenderedViewLine {
|
||||
}
|
||||
|
||||
class WebKitRenderedViewLine extends RenderedViewLine {
|
||||
protected _readVisibleRangesForRange(domNode: FastDomNode<HTMLElement>, startColumn: number, endColumn: number, context: DomReadingContext): HorizontalRange[] | null {
|
||||
protected override _readVisibleRangesForRange(domNode: FastDomNode<HTMLElement>, startColumn: number, endColumn: number, context: DomReadingContext): HorizontalRange[] | null {
|
||||
const output = super._readVisibleRangesForRange(domNode, startColumn, endColumn, context);
|
||||
|
||||
if (!output || output.length === 0 || startColumn === endColumn || (startColumn === 1 && endColumn === this._characterMapping.length)) {
|
||||
|
||||
@@ -152,7 +152,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
this._horizontalRevealRequest = null;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._asyncUpdateLineWidths.dispose();
|
||||
this._asyncCheckMonospaceFontAssumptions.dispose();
|
||||
super.dispose();
|
||||
@@ -172,7 +172,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
|
||||
// ---- begin view event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
this._visibleLines.onConfigurationChanged(e);
|
||||
if (e.hasChanged(EditorOption.wrappingInfo)) {
|
||||
this._maxLineWidth = 0;
|
||||
@@ -217,7 +217,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
|
||||
return false;
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
const rendStartLineNumber = this._visibleLines.getStartLineNumber();
|
||||
const rendEndLineNumber = this._visibleLines.getEndLineNumber();
|
||||
let r = false;
|
||||
@@ -226,7 +226,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
}
|
||||
return r;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
if (true/*e.inlineDecorationsChanged*/) {
|
||||
const rendStartLineNumber = this._visibleLines.getStartLineNumber();
|
||||
const rendEndLineNumber = this._visibleLines.getEndLineNumber();
|
||||
@@ -236,21 +236,21 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
const shouldRender = this._visibleLines.onFlushed(e);
|
||||
this._maxLineWidth = 0;
|
||||
return shouldRender;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return this._visibleLines.onLinesChanged(e);
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return this._visibleLines.onLinesDeleted(e);
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return this._visibleLines.onLinesInserted(e);
|
||||
}
|
||||
public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean {
|
||||
public override onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean {
|
||||
// Using the future viewport here in order to handle multiple
|
||||
// incoming reveal range requests that might all desire to be animated
|
||||
const desiredScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.source, e.range, e.selections, e.verticalType);
|
||||
@@ -286,7 +286,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
if (this._horizontalRevealRequest && e.scrollLeftChanged) {
|
||||
// cancel any outstanding horizontal reveal request if someone else scrolls horizontally.
|
||||
this._horizontalRevealRequest = null;
|
||||
@@ -303,14 +303,14 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
return this._visibleLines.onScrollChanged(e) || true;
|
||||
}
|
||||
|
||||
public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean {
|
||||
public override onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean {
|
||||
return this._visibleLines.onTokensChanged(e);
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
this._context.model.setMaxLineWidth(this._maxLineWidth);
|
||||
return this._visibleLines.onZonesChanged(e);
|
||||
}
|
||||
public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
return this._onOptionsMaybeChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export class LinesDecorationsOverlay extends DedupOverlay {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
this._renderResult = null;
|
||||
super.dispose();
|
||||
@@ -38,32 +38,32 @@ export class LinesDecorationsOverlay extends DedupOverlay {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
this._decorationsLeft = layoutInfo.decorationsLeft;
|
||||
this._decorationsWidth = layoutInfo.decorationsWidth;
|
||||
return true;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollTopChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export class Margin extends ViewPart {
|
||||
this._domNode.appendChild(this._glyphMarginBackgroundDomNode);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export class Margin extends ViewPart {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
|
||||
@@ -66,7 +66,7 @@ export class Margin extends ViewPart {
|
||||
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return super.onScrollChanged(e) || e.scrollTopChanged;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
this._renderResult = null;
|
||||
super.dispose();
|
||||
@@ -28,28 +28,28 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay {
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollTopChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -759,7 +759,7 @@ export class Minimap extends ViewPart implements IMinimapModel {
|
||||
this._actual = new InnerMinimap(context.theme, this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._actual.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -781,27 +781,27 @@ export class Minimap extends ViewPart implements IMinimapModel {
|
||||
|
||||
// ---- begin view event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
return this._onOptionsMaybeChanged();
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
this._selections = e.selections;
|
||||
this._minimapSelections = null;
|
||||
return this._actual.onSelectionChanged();
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
if (e.affectsMinimap) {
|
||||
return this._actual.onDecorationsChanged();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
if (this._samplingState) {
|
||||
this._shouldCheckSampling = true;
|
||||
}
|
||||
return this._actual.onFlushed();
|
||||
}
|
||||
public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
public override onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean {
|
||||
if (this._samplingState) {
|
||||
const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber, e.toLineNumber);
|
||||
if (minimapLineRange) {
|
||||
@@ -813,7 +813,7 @@ export class Minimap extends ViewPart implements IMinimapModel {
|
||||
return this._actual.onLinesChanged(e.fromLineNumber, e.toLineNumber);
|
||||
}
|
||||
}
|
||||
public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
public override onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean {
|
||||
if (this._samplingState) {
|
||||
const [changeStartIndex, changeEndIndex] = this._samplingState.onLinesDeleted(e);
|
||||
if (changeStartIndex <= changeEndIndex) {
|
||||
@@ -825,7 +825,7 @@ export class Minimap extends ViewPart implements IMinimapModel {
|
||||
return this._actual.onLinesDeleted(e.fromLineNumber, e.toLineNumber);
|
||||
}
|
||||
}
|
||||
public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
public override onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean {
|
||||
if (this._samplingState) {
|
||||
this._samplingState.onLinesInserted(e);
|
||||
this._shouldCheckSampling = true;
|
||||
@@ -834,16 +834,16 @@ export class Minimap extends ViewPart implements IMinimapModel {
|
||||
return this._actual.onLinesInserted(e.fromLineNumber, e.toLineNumber);
|
||||
}
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return this._actual.onScrollChanged();
|
||||
}
|
||||
public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
this._context.model.invalidateMinimapColorCache();
|
||||
this._actual.onThemeChanged();
|
||||
this._onOptionsMaybeChanged();
|
||||
return true;
|
||||
}
|
||||
public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean {
|
||||
public override onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean {
|
||||
if (this._samplingState) {
|
||||
let ranges: { fromLineNumber: number; toLineNumber: number; }[] = [];
|
||||
for (const range of e.ranges) {
|
||||
@@ -861,11 +861,11 @@ export class Minimap extends ViewPart implements IMinimapModel {
|
||||
return this._actual.onTokensChanged(e.ranges);
|
||||
}
|
||||
}
|
||||
public onTokensColorsChanged(e: viewEvents.ViewTokensColorsChangedEvent): boolean {
|
||||
public override onTokensColorsChanged(e: viewEvents.ViewTokensColorsChangedEvent): boolean {
|
||||
this._onOptionsMaybeChanged();
|
||||
return this._actual.onTokensColorsChanged();
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return this._actual.onZonesChanged();
|
||||
}
|
||||
|
||||
@@ -1211,7 +1211,7 @@ class InnerMinimap extends Disposable {
|
||||
this._model.setScrollTop(scrollTop);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._mouseDownListener.dispose();
|
||||
this._sliderMouseMoveMonitor.dispose();
|
||||
this._sliderMouseDownListener.dispose();
|
||||
|
||||
@@ -52,7 +52,7 @@ export class ViewOverlayWidgets extends ViewPart {
|
||||
this._domNode.setClassName('overlayWidgets');
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._widgets = {};
|
||||
}
|
||||
@@ -63,7 +63,7 @@ export class ViewOverlayWidgets extends ViewPart {
|
||||
|
||||
// ---- begin view event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(EditorOption.layoutInfo);
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ export class DecorationsOverviewRuler extends ViewPart {
|
||||
this._cursorPositions = [];
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._tokensColorTrackerListener.dispose();
|
||||
}
|
||||
@@ -267,10 +267,10 @@ export class DecorationsOverviewRuler extends ViewPart {
|
||||
|
||||
// ---- begin view event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
return this._updateSettings(false);
|
||||
}
|
||||
public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
public override onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean {
|
||||
this._cursorPositions = [];
|
||||
for (let i = 0, len = e.selections.length; i < len; i++) {
|
||||
this._cursorPositions[i] = e.selections[i].getPosition();
|
||||
@@ -278,22 +278,22 @@ export class DecorationsOverviewRuler extends ViewPart {
|
||||
this._cursorPositions.sort(Position.compare);
|
||||
return true;
|
||||
}
|
||||
public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
public override onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean {
|
||||
if (e.affectsOverviewRuler) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollHeightChanged;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
return true;
|
||||
}
|
||||
public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
public override onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||
// invalidate color cache
|
||||
this._context.model.invalidateOverviewRulerColorCache();
|
||||
return this._updateSettings(false);
|
||||
|
||||
@@ -39,14 +39,14 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
this._context.removeEventHandler(this);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
// ---- begin view event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
|
||||
if (e.hasChanged(EditorOption.lineHeight)) {
|
||||
@@ -65,18 +65,18 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
|
||||
|
||||
return true;
|
||||
}
|
||||
public onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
public override onFlushed(e: viewEvents.ViewFlushedEvent): boolean {
|
||||
this._render();
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
if (e.scrollHeightChanged) {
|
||||
this._zoneManager.setOuterHeight(e.scrollHeight);
|
||||
this._render();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
public override onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean {
|
||||
this._render();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -32,19 +32,19 @@ export class Rulers extends ViewPart {
|
||||
this._typicalHalfwidthCharacterWidth = options.get(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
public override onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
const options = this._context.configuration.options;
|
||||
this._rulers = options.get(EditorOption.rulers);
|
||||
this._typicalHalfwidthCharacterWidth = options.get(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;
|
||||
return true;
|
||||
}
|
||||
public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
public override onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean {
|
||||
return e.scrollHeightChanged;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user