Skip to content

Commit

Permalink
Rebase against the upstream abf9cb9
Browse files Browse the repository at this point in the history
vscode-upstream-sha1: abf9cb9
  • Loading branch information
Eclipse Che Sync committed Aug 29, 2024
2 parents caab00f + abf9cb9 commit 206357e
Show file tree
Hide file tree
Showing 72 changed files with 937 additions and 447 deletions.
2 changes: 1 addition & 1 deletion code/build/.moduleignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ typescript/lib/tsserverlibrary.js

jschardet/index.js
jschardet/src/**
jschardet/dist/jschardet.js
# TODO@esm uncomment when we can use jschardet.min.js again jschardet/dist/jschardet.js

es6-promise/lib/**

Expand Down
2 changes: 1 addition & 1 deletion code/build/.webignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

jschardet/index.js
jschardet/src/**
jschardet/dist/jschardet.js
# TODO@esm uncomment when we can use jschardet.min.js again jschardet/dist/jschardet.js

vscode-textmate/webpack.config.js

Expand Down
16 changes: 14 additions & 2 deletions code/extensions/typescript-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,13 @@
"inline",
"first"
],
"default": "auto"
"default": "auto",
"markdownEnumDescriptions": [
"%typescript.preferences.organizeImports.typeOrder.auto%",
"%typescript.preferences.organizeImports.typeOrder.last%",
"%typescript.preferences.organizeImports.typeOrder.inline%",
"%typescript.preferences.organizeImports.typeOrder.first%"
]
},
"unicodeCollation": {
"type": "string",
Expand Down Expand Up @@ -1180,7 +1186,13 @@
"inline",
"first"
],
"default": "auto"
"default": "auto",
"markdownEnumDescriptions": [
"%typescript.preferences.organizeImports.typeOrder.auto%",
"%typescript.preferences.organizeImports.typeOrder.last%",
"%typescript.preferences.organizeImports.typeOrder.inline%",
"%typescript.preferences.organizeImports.typeOrder.first%"
]
},
"unicodeCollation": {
"type": "string",
Expand Down
30 changes: 15 additions & 15 deletions code/extensions/typescript-language-features/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,21 @@
"typescript.preferences.renameShorthandProperties.deprecationMessage": "The setting 'typescript.preferences.renameShorthandProperties' has been deprecated in favor of 'typescript.preferences.useAliasesForRenames'",
"typescript.preferences.useAliasesForRenames": "Enable/disable introducing aliases for object shorthand properties during renames.",
"typescript.preferences.renameMatchingJsxTags": "When on a JSX tag, try to rename the matching tag instead of renaming the symbol. Requires using TypeScript 5.1+ in the workspace.",
"typescript.preferences.organizeImports": "Advanced preferences that control how imports are ordered. Presets are available in `#typescript.preferences.organizeImports.presets#`",
"javascript.preferences.organizeImports": "Advanced preferences that control how imports are ordered. Presets are available in `#javascript.preferences.organizeImports.presets#`",
"typescript.preferences.organizeImports.caseSensitivity.auto": "Detect case-sensitivity for import sorting",
"typescript.preferences.organizeImports.caseSensitivity.insensitive": "Sort imports case-insensitively",
"typescript.preferences.organizeImports.caseSensitivity.sensitive": "Sort imports case-sensitively",
"typescript.preferences.organizeImports.typeOrder.auto": "Detect where type-only named imports should be sorted",
"typescript.preferences.organizeImports.typeOrder.last": "Type only named imports are sorted to the end of the import list",
"typescript.preferences.organizeImports.typeOrder.inline": "Named imports are sorted by name only",
"typescript.preferences.organizeImports.typeOrder.first": "Type only named imports are sorted to the end of the import list",
"typescript.preferences.organizeImports.unicodeCollation.ordinal": "Sort imports using the numeric value of each code point",
"typescript.preferences.organizeImports.unicodeCollation.unicode": "Sort imports using the Unicode code collation",
"typescript.preferences.organizeImports.locale": "Overrides the locale used for collation. Specify `auto` to use the UI locale. Only applies to `organizeImportsCollation: 'unicode'`",
"typescript.preferences.organizeImports.caseFirst": "Indicates whether upper-case comes before lower-case. Only applies to `organizeImportsCollation: 'unicode'`",
"typescript.preferences.organizeImports.numericCollation": "Sort numeric strings by integer value",
"typescript.preferences.organizeImports.accentCollation": "Compare characters with diacritical marks as unequal to base character",
"typescript.preferences.organizeImports": "Advanced preferences that control how imports are ordered.",
"javascript.preferences.organizeImports": "Advanced preferences that control how imports are ordered.",
"typescript.preferences.organizeImports.caseSensitivity.auto": "Detect case-sensitivity for import sorting.",
"typescript.preferences.organizeImports.caseSensitivity.insensitive": "Sort imports case-insensitively.",
"typescript.preferences.organizeImports.caseSensitivity.sensitive": "Sort imports case-sensitively.",
"typescript.preferences.organizeImports.typeOrder.auto": "Detect where type-only named imports should be sorted.",
"typescript.preferences.organizeImports.typeOrder.last": "Type only named imports are sorted to the end of the import list.",
"typescript.preferences.organizeImports.typeOrder.inline": "Named imports are sorted by name only.",
"typescript.preferences.organizeImports.typeOrder.first": "Type only named imports are sorted to the end of the import list.",
"typescript.preferences.organizeImports.unicodeCollation.ordinal": "Sort imports using the numeric value of each code point.",
"typescript.preferences.organizeImports.unicodeCollation.unicode": "Sort imports using the Unicode code collation.",
"typescript.preferences.organizeImports.locale": "Overrides the locale used for collation. Specify `auto` to use the UI locale. Only applies to `organizeImportsCollation: 'unicode'`.",
"typescript.preferences.organizeImports.caseFirst": "Indicates whether upper-case comes before lower-case. Only applies to `organizeImportsCollation: 'unicode'`.",
"typescript.preferences.organizeImports.numericCollation": "Sort numeric strings by integer value.",
"typescript.preferences.organizeImports.accentCollation": "Compare characters with diacritical marks as unequal to base character.",
"typescript.workspaceSymbols.scope": "Controls which files are searched by [Go to Symbol in Workspace](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name).",
"typescript.workspaceSymbols.scope.allOpenProjects": "Search all open JavaScript or TypeScript projects for symbols.",
"typescript.workspaceSymbols.scope.currentProject": "Only search for symbols in the current JavaScript or TypeScript project.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default class FileConfigurationManager extends Disposable {
interactiveInlayHints: true,
includeCompletionsForModuleExports: config.get<boolean>('suggest.autoImports'),
...getInlayHintsPreferences(config),
...this.getOrganizeImportsPreferences(config),
...this.getOrganizeImportsPreferences(preferencesConfig),
};

return preferences;
Expand Down
4 changes: 2 additions & 2 deletions code/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
},
{
"name": "ms-vscode.js-debug",
"version": "1.92.0",
"sha256": "e5d0a74728292423631f79d076ecb2bc129f9637bcbc2529e48a0fd53baa69cc",
"version": "1.93.0",
"sha256": "9339cb8e6b77f554df54d79e71f533279cb76b0f9b04c207f633bfd507442b6a",
"repo": "https://github.com/microsoft/vscode-js-debug",
"metadata": {
"id": "25629058-ddac-4e17-abba-74678e126c5d",
Expand Down
10 changes: 5 additions & 5 deletions code/remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ bl@^4.0.3:
inherits "^2.0.4"
readable-stream "^3.4.0"

braces@^3.0.2:
braces@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
Expand Down Expand Up @@ -422,11 +422,11 @@ lru-cache@^6.0.0:
yallist "^4.0.0"

micromatch@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
dependencies:
braces "^3.0.2"
braces "^3.0.3"
picomatch "^2.3.1"

mimic-response@^3.1.0:
Expand Down
4 changes: 2 additions & 2 deletions code/src/vs/base/browser/ui/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { $ } from 'vs/base/browser/dom';
import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate';
import { Button } from 'vs/base/browser/ui/button/button';
import { DisposableMap, DisposableStore } from 'vs/base/common/lifecycle';
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
import { createInstantHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';

export interface IRadioStyles {
readonly activeForeground?: string;
Expand Down Expand Up @@ -53,7 +53,7 @@ export class Radio extends Widget {
constructor(opts: IRadioOptions) {
super();

this.hoverDelegate = opts.hoverDelegate ?? getDefaultHoverDelegate('element');
this.hoverDelegate = opts.hoverDelegate ?? this._register(createInstantHoverDelegate());

this.domNode = $('.monaco-custom-radio');
this.domNode.setAttribute('role', 'radio');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class HoverWidget extends Widget implements IHoverWidget {
}

// Show the hover hint if needed
if (hideOnHover && options.appearance?.showHoverHint) {
if (options.appearance?.showHoverHint) {
const statusBarElement = $('div.hover-row.status-bar');
const infoElement = $('div.info');
infoElement.textContent = localize('hoverhint', 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ export class CodeActionController extends Disposable implements IEditorContribut
return;
}


const selection = this._editor.getSelection();
if (selection?.startLineNumber !== newState.position.lineNumber) {
return;
}

this._lightBulbWidget.value?.update(actions, newState.trigger, newState.position);

if (newState.trigger.type === CodeActionTriggerType.Invoke) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
const currLineEmptyOrIndented = isLineEmptyOrIndented(lineNumber);
const notEmpty = !nextLineEmptyOrIndented && !prevLineEmptyOrIndented;


// check above and below. if both are blocked, display lightbulb in the gutter.
if (!nextLineEmptyOrIndented && !prevLineEmptyOrIndented && !hasDecoration) {
this.gutterState = new LightBulbState.Showing(actions, trigger, atPosition, {
Expand All @@ -280,7 +279,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
});
this.renderGutterLightbub();
return this.hide();
} else if (prevLineEmptyOrIndented || endLine || (notEmpty && !currLineEmptyOrIndented)) {
} else if (prevLineEmptyOrIndented || endLine || (prevLineEmptyOrIndented && !currLineEmptyOrIndented)) {
effectiveLineNumber -= 1;
} else if (nextLineEmptyOrIndented || (notEmpty && currLineEmptyOrIndented)) {
effectiveLineNumber += 1;
Expand Down
5 changes: 3 additions & 2 deletions code/src/vs/editor/contrib/rename/browser/renameWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ export class RenameWidget implements IRenameWidget, IContentWidget, IDisposable
}

afterRender(position: ContentWidgetPositionPreference | null): void {
this._trace('invoking afterRender, position: ', position ? 'not null' : 'null');
// FIXME@ulugbekna: commenting trace log out until we start unmounting the widget from editor properly - https://github.com/microsoft/vscode/issues/226975
// this._trace('invoking afterRender, position: ', position ? 'not null' : 'null');
if (position === null) {
// cancel rename when input widget isn't rendered anymore
this.cancelInput(true, 'afterRender (because position is null)');
Expand Down Expand Up @@ -363,7 +364,7 @@ export class RenameWidget implements IRenameWidget, IContentWidget, IDisposable
}

cancelInput(focusEditor: boolean, caller: string): void {
this._trace(`invoking cancelInput, caller: ${caller}, _currentCancelInput: ${this._currentAcceptInput ? 'not undefined' : 'undefined'}`);
// this._trace(`invoking cancelInput, caller: ${caller}, _currentCancelInput: ${this._currentAcceptInput ? 'not undefined' : 'undefined'}`);
this._currentCancelInput?.(focusEditor);
}

Expand Down
4 changes: 2 additions & 2 deletions code/src/vs/platform/actionWidget/browser/actionList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ export class ActionList<T> extends Disposable {

private readonly _list: List<IActionListItem<T>>;

private readonly _actionLineHeight = 28;
private readonly _headerLineHeight = 28;
private readonly _actionLineHeight = 24;
private readonly _headerLineHeight = 26;

private readonly _allMenuItems: readonly IActionListItem<T>[];

Expand Down
5 changes: 3 additions & 2 deletions code/src/vs/platform/actionWidget/browser/actionWidget.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@
/* Action bar */

.action-widget .action-widget-action-bar {
background-color: var(--vscode-editorHoverWidget-statusBarBackground);
background-color: var(--vscode-editorActionList-background);
border-top: 1px solid var(--vscode-editorHoverWidget-border);
margin-top: 2px;
}

.action-widget .action-widget-action-bar::before {
Expand All @@ -143,7 +144,7 @@
}

.action-widget .action-widget-action-bar .actions-container {
padding: 0 8px;
padding: 3px 8px 0;
}

.action-widget-action-bar .action-label {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export class GlobalExtensionEnablementService extends Disposable implements IGlo

private _onDidChangeEnablement = new Emitter<{ readonly extensions: IExtensionIdentifier[]; readonly source?: string }>();
readonly onDidChangeEnablement: Event<{ readonly extensions: IExtensionIdentifier[]; readonly source?: string }> = this._onDidChangeEnablement.event;
private readonly storageManger: StorageManager;
private readonly storageManager: StorageManager;

constructor(
@IStorageService storageService: IStorageService,
@IExtensionManagementService extensionManagementService: IExtensionManagementService,
) {
super();
this.storageManger = this._register(new StorageManager(storageService));
this._register(this.storageManger.onDidChange(extensions => this._onDidChangeEnablement.fire({ extensions, source: 'storage' })));
this.storageManager = this._register(new StorageManager(storageService));
this._register(this.storageManager.onDidChange(extensions => this._onDidChangeEnablement.fire({ extensions, source: 'storage' })));
this._register(extensionManagementService.onDidInstallExtensions(e => e.forEach(({ local, operation }) => {
if (local && operation === InstallOperation.Migrate) {
this._removeFromDisabledExtensions(local.identifier); /* Reset migrated extensions */
Expand Down Expand Up @@ -84,11 +84,11 @@ export class GlobalExtensionEnablementService extends Disposable implements IGlo
}

private _getExtensions(storageId: string): IExtensionIdentifier[] {
return this.storageManger.get(storageId, StorageScope.PROFILE);
return this.storageManager.get(storageId, StorageScope.PROFILE);
}

private _setExtensions(storageId: string, extensions: IExtensionIdentifier[]): void {
this.storageManger.set(storageId, extensions, StorageScope.PROFILE);
this.storageManager.set(storageId, extensions, StorageScope.PROFILE);
}

}
Expand Down
3 changes: 2 additions & 1 deletion code/src/vs/platform/theme/common/colorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class ColorRegistry implements IColorRegistry {
public registerColor(id: string, defaults: ColorDefaults | ColorValue | null, description: string, needsTransparency = false, deprecationMessage?: string): ColorIdentifier {
const colorContribution: ColorContribution = { id, description, defaults, needsTransparency, deprecationMessage };
this.colorsById[id] = colorContribution;
const propertySchema: IJSONSchemaWithSnippets = { type: 'string', description, format: 'color-hex', defaultSnippets: [{ body: '${1:#ff0000}' }] };
const propertySchema: IJSONSchemaWithSnippets = { type: 'string', format: 'color-hex', defaultSnippets: [{ body: '${1:#ff0000}' }] };
if (deprecationMessage) {
propertySchema.deprecationMessage = deprecationMessage;
}
Expand All @@ -168,6 +168,7 @@ class ColorRegistry implements IColorRegistry {
propertySchema.patternErrorMessage = nls.localize('transparecyRequired', 'This color must be transparent or it will obscure content');
}
this.colorSchema.properties[id] = {
description,
oneOf: [
propertySchema,
{ type: 'string', const: DEFAULT_COLOR_CONFIG_VALUE, description: nls.localize('useDefault', 'Use the default color.') }
Expand Down
5 changes: 3 additions & 2 deletions code/src/vs/workbench/api/browser/mainThreadWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { IEditSessionIdentityService } from 'vs/platform/workspace/common/editSe
import { EditorResourceAccessor, SaveReason, SideBySideEditor } from 'vs/workbench/common/editor';
import { coalesce, firstOrDefault } from 'vs/base/common/arrays';
import { ICanonicalUriService } from 'vs/platform/workspace/common/canonicalUri';
import { revive } from 'vs/base/common/marshalling';

@extHostNamedCustomer(MainContext.MainThreadWorkspace)
export class MainThreadWorkspace implements MainThreadWorkspaceShape {
Expand Down Expand Up @@ -146,7 +147,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {

const query = this._queryBuilder.file(
includeFolder ? [includeFolder] : workspace.folders,
options
revive(options)
);

return this._searchService.fileSearch(query, token).then(result => {
Expand All @@ -164,7 +165,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
const workspace = this._contextService.getWorkspace();
const folders = folder ? [folder] : workspace.folders.map(folder => folder.uri);

const query = this._queryBuilder.text(pattern, folders, options);
const query = this._queryBuilder.text(pattern, folders, revive(options));
query._reason = 'startTextSearch';

const onProgress = (p: ISearchProgressItem) => {
Expand Down
6 changes: 3 additions & 3 deletions code/src/vs/workbench/api/common/extHostLanguageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2312,15 +2312,15 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
}

$provideCodeLenses(handle: number, resource: UriComponents, token: CancellationToken): Promise<extHostProtocol.ICodeLensListDto | undefined> {
return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.provideCodeLenses(URI.revive(resource), token), undefined, token);
return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.provideCodeLenses(URI.revive(resource), token), undefined, token, resource.scheme === 'output');
}

$resolveCodeLens(handle: number, symbol: extHostProtocol.ICodeLensDto, token: CancellationToken): Promise<extHostProtocol.ICodeLensDto | undefined> {
return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.resolveCodeLens(symbol, token), undefined, undefined);
return this._withAdapter(handle, CodeLensAdapter, adapter => adapter.resolveCodeLens(symbol, token), undefined, undefined, true);
}

$releaseCodeLenses(handle: number, cacheId: number): void {
this._withAdapter(handle, CodeLensAdapter, adapter => Promise.resolve(adapter.releaseCodeLenses(cacheId)), undefined, undefined);
this._withAdapter(handle, CodeLensAdapter, adapter => Promise.resolve(adapter.releaseCodeLenses(cacheId)), undefined, undefined, true);
}

// --- declaration
Expand Down
7 changes: 5 additions & 2 deletions code/src/vs/workbench/api/common/extHostWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
}
const parsedInclude = include ? parseSearchExcludeInclude(GlobPattern.from(include)) : undefined;

const excludePatterns = include ? globsToISearchPatternBuilder(options.exclude) : undefined;
const excludePatterns = globsToISearchPatternBuilder(options.exclude);

return {
options: {
Expand Down Expand Up @@ -664,7 +664,10 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
async findTextInFilesBase(query: vscode.TextSearchQuery, queryOptions: QueryOptions<ITextQueryBuilderOptions>[] | undefined, callback: (result: ITextSearchResult<URI>, uri: URI) => void, token: vscode.CancellationToken = CancellationToken.None): Promise<vscode.TextSearchComplete> {
const requestId = this._requestIdProvider.getNext();

const isCanceled = false;
let isCanceled = false;
token.onCancellationRequested(_ => {
isCanceled = true;
});

this._activeSearchCallbacks[requestId] = p => {
if (isCanceled) {
Expand Down
Loading

0 comments on commit 206357e

Please sign in to comment.