未验证 提交 1c19031a 编写于 作者: J Joao Moreno

Merge remote-tracking branch 'origin/master'

......@@ -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.",
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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) {
......
......@@ -69,7 +69,11 @@ export class IdentityProvider implements IIdentityProvider<Call> {
) { }
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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册