diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index b4afd65ec2da49667648292cba355b93af949e6f..653ebc7c708a8b088ba2e6350e62609adf5c449e 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -121,7 +121,7 @@ "config.scanRepositories": "List of paths to search for git repositories in.", "config.showProgress": "Controls whether git actions should show progress.", "config.rebaseWhenSync": "Force git to use rebase when running the sync command.", - "config.confirmEmptyCommits": "Always confirm the creation of empty commits.", + "config.confirmEmptyCommits": "Always confirm the creation of empty commits for the 'Git: Commit Empty' command.", "config.fetchOnPull": "Fetch all branches when pulling or just the current one.", "config.pullTags": "Fetch all tags when pulling.", "config.autoStash": "Stash any changes before pulling and restore them after successful pull.", diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index f504188bd56d0662593d16fab8e44daa7ab2c99c..ac2d2aa9439b942e9c2b7fe142631955be66af22 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -16,7 +16,7 @@ declare module 'vscode' { - //#region Joh - call hierarchy + //#region Joh - call hierarchy: https://github.com/microsoft/vscode/issues/70231 /** * Represents programming constructs like functions or constructors in the context @@ -98,7 +98,7 @@ declare module 'vscode' { to: CallHierarchyItem; /** - * The range at which this item is called. This is the range relative the caller, e.g the item + * The range at which this item is called. This is the range relative to the caller, e.g the item * passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls) * and not [`this.to`](#CallHierarchyOutgoingCall.to). */ @@ -135,7 +135,7 @@ declare module 'vscode' { /** * Provide all incoming calls for an item, e.g all callers for a method. In graph terms this descibes directed - * and annotated edges inside the call graph, e.g the given item is the starting node and the result are the nodes + * and annotated edges inside the call graph, e.g the given item is the starting node and the result is the nodes * that can be reached. * * @param item The hierarchy item for which incoming calls should be computed. @@ -148,7 +148,7 @@ declare module 'vscode' { /** * Provide all outgoing calls for an item, e.g call calls to functions, methods, or constructors from the given item. In * graph terms this descibes directed and annotated edges inside the call graph, e.g the given item is the starting - * node and the result are the nodes that can be reached. + * node and the result is the nodes that can be reached. * * @param item The hierarchy item for which outgoing calls should be computed. * @param token A cancellation token. @@ -159,6 +159,14 @@ declare module 'vscode' { } export namespace languages { + + /** + * Register a call hierarchy provider. + * + * @param selector A selector that defines the documents this provider is applicable to. + * @param provider A call hierarchy provider. + * @return A [disposable](#Disposable) that unregisters this provider when being disposed. + */ export function registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyProvider): Disposable; } diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts index 224e8ce6d0fdea2a778f1be9afcd43370080a104..6a3f39365b12ddacfd9e1c3ac1dde112472f6a14 100644 --- a/src/vs/workbench/browser/dnd.ts +++ b/src/vs/workbench/browser/dnd.ts @@ -20,17 +20,16 @@ import { DataTransfers } from 'vs/base/browser/dnd'; import { DragMouseEvent } from 'vs/base/browser/mouseEvent'; import { normalizeDriveLetter } from 'vs/base/common/labels'; import { MIME_BINARY } from 'vs/base/common/mime'; -import { isWindows, isLinux, isWeb } from 'vs/base/common/platform'; +import { isWindows } from 'vs/base/common/platform'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { isCodeEditor } from 'vs/editor/browser/editorBrowser'; import { IEditorIdentifier, GroupIdentifier } from 'vs/workbench/common/editor'; import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService'; import { Disposable } from 'vs/base/common/lifecycle'; -import { addDisposableListener, EventType } from 'vs/base/browser/dom'; +import { addDisposableListener, EventType, asDomUri } from 'vs/base/browser/dom'; import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspaces/common/workspaceEditing'; import { withNullAsUndefined } from 'vs/base/common/types'; -import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IHostService } from 'vs/workbench/services/host/browser/host'; export interface IDraggedResource { @@ -330,15 +329,8 @@ export function fillResourceDataTransfers(accessor: ServicesAccessor, resources: const lineDelimiter = isWindows ? '\r\n' : '\n'; event.dataTransfer.setData(DataTransfers.TEXT, sources.map(source => source.resource.scheme === Schemas.file ? normalize(normalizeDriveLetter(source.resource.fsPath)) : source.resource.toString()).join(lineDelimiter)); - const envService = accessor.get(IWorkbenchEnvironmentService); - const hasRemote = !!envService.configuration.remoteAuthority; - if ( - !(isLinux && hasRemote) && // Not supported on linux remote due to chrome limitation https://github.com/microsoft/vscode-remote-release/issues/849 - !isWeb // Does not seem to work anymore when running from web, the file ends up being empty (and PWA crashes) - ) { - // Download URL: enables support to drag a tab as file to desktop (only single file supported) - event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(firstSource.resource), firstSource.resource.toString()].join(':')); - } + // Download URL: enables support to drag a tab as file to desktop (only single file supported) + event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(firstSource.resource), asDomUri(firstSource.resource).toString()].join(':')); // Resource URLs: allows to drop multiple resources to a target in VS Code (not directories) const files = sources.filter(s => !s.isDirectory); diff --git a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts index 0de77e9e8b4365620a16efa88841ac240de6a9fe..b2e162aabb9292e312dd33649d00afd1c535b71a 100644 --- a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts +++ b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.ts @@ -380,7 +380,9 @@ export class CallHierarchyTreePeekWidget extends PeekViewWidget { } else { this._parent.dataset['state'] = State.Data; this._tree.domFocus(); - this._tree.setFocus([root.children[0].element]); + if (!viewState) { + this._tree.setFocus([root.children[0].element]); + } } if (!this._changeDirectionAction) { diff --git a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts index af83dbfa8aeaa6d3774bfab4ca21ca5e39255d76..14cef8e7c5c8de24dfd8a79052ab20a451d19989 100644 --- a/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts +++ b/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.ts @@ -69,7 +69,11 @@ export class IdentityProvider implements IIdentityProvider { ) { } getId(element: Call): { toString(): string; } { - return this.getDirection() + '->' + element.item.id; + let res = this.getDirection() + JSON.stringify(element.item.uri) + JSON.stringify(element.item.range); + if (element.parent) { + res += this.getId(element.parent); + } + return res; } }