mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-30 08:40:29 -04:00
Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2
This commit is contained in:
committed by
Anthony Dresser
parent
3603f55d97
commit
7f1d8fc32f
@@ -26,9 +26,9 @@ import { ResourceLabels, IResourceLabelProps, IResourceLabelOptions, IResourceLa
|
||||
import { FileKind } from 'vs/platform/files/common/files';
|
||||
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
|
||||
import { ITreeNode, ITreeFilter, TreeVisibility, TreeFilterResult, ITreeElement } from 'vs/base/browser/ui/tree/tree';
|
||||
import { IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { ResourceNavigator, WorkbenchCompressibleObjectTree } from 'vs/platform/list/browser/listService';
|
||||
import { TreeResourceNavigator, WorkbenchCompressibleObjectTree } from 'vs/platform/list/browser/listService';
|
||||
import { dispose } from 'vs/base/common/lifecycle';
|
||||
import { createMatches, FuzzyScore } from 'vs/base/common/filters';
|
||||
import { DebugContentProvider } from 'vs/workbench/contrib/debug/common/debugContentProvider';
|
||||
@@ -39,7 +39,7 @@ import { IViewDescriptorService } from 'vs/workbench/common/views';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IRemotePathService } from 'vs/workbench/services/path/common/remotePathService';
|
||||
import { IPathService } from 'vs/workbench/services/path/common/pathService';
|
||||
|
||||
const NEW_STYLE_COMPRESS = true;
|
||||
|
||||
@@ -241,12 +241,12 @@ class RootFolderTreeItem extends BaseTreeItem {
|
||||
|
||||
class RootTreeItem extends BaseTreeItem {
|
||||
|
||||
constructor(private _remotePathService: IRemotePathService, private _contextService: IWorkspaceContextService, private _labelService: ILabelService) {
|
||||
constructor(private _pathService: IPathService, private _contextService: IWorkspaceContextService, private _labelService: ILabelService) {
|
||||
super(undefined, 'Root');
|
||||
}
|
||||
|
||||
add(session: IDebugSession): SessionTreeItem {
|
||||
return this.createIfNeeded(session.getId(), () => new SessionTreeItem(this._labelService, this, session, this._remotePathService, this._contextService));
|
||||
return this.createIfNeeded(session.getId(), () => new SessionTreeItem(this._labelService, this, session, this._pathService, this._contextService));
|
||||
}
|
||||
|
||||
find(session: IDebugSession): SessionTreeItem {
|
||||
@@ -262,7 +262,7 @@ class SessionTreeItem extends BaseTreeItem {
|
||||
private _map = new Map<string, BaseTreeItem>();
|
||||
private _labelService: ILabelService;
|
||||
|
||||
constructor(labelService: ILabelService, parent: BaseTreeItem, session: IDebugSession, private _remotePathService: IRemotePathService, private rootProvider: IWorkspaceContextService) {
|
||||
constructor(labelService: ILabelService, parent: BaseTreeItem, session: IDebugSession, private _pathService: IPathService, private rootProvider: IWorkspaceContextService) {
|
||||
super(parent, session.getLabel(), true);
|
||||
this._labelService = labelService;
|
||||
this._session = session;
|
||||
@@ -347,7 +347,7 @@ class SessionTreeItem extends BaseTreeItem {
|
||||
} else {
|
||||
// on unix try to tildify absolute paths
|
||||
path = normalize(path);
|
||||
const userHome = this._remotePathService.userHomeSync;
|
||||
const userHome = this._pathService.resolvedUserHome;
|
||||
if (userHome && !isWindows) {
|
||||
path = tildify(path, userHome.fsPath);
|
||||
}
|
||||
@@ -426,7 +426,7 @@ export class LoadedScriptsView extends ViewPane {
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||
@IDebugService private readonly debugService: IDebugService,
|
||||
@ILabelService private readonly labelService: ILabelService,
|
||||
@IRemotePathService private readonly remotePathService: IRemotePathService,
|
||||
@IPathService private readonly pathService: IPathService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@@ -446,7 +446,7 @@ export class LoadedScriptsView extends ViewPane {
|
||||
|
||||
this.filter = new LoadedScriptsFilter();
|
||||
|
||||
const root = new RootTreeItem(this.remotePathService, this.contextService, this.labelService);
|
||||
const root = new RootTreeItem(this.pathService, this.contextService, this.labelService);
|
||||
|
||||
this.treeLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
|
||||
this._register(this.treeLabels);
|
||||
@@ -473,7 +473,6 @@ export class LoadedScriptsView extends ViewPane {
|
||||
},
|
||||
filter: this.filter,
|
||||
accessibilityProvider: new LoadedSciptsAccessibilityProvider(),
|
||||
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'loadedScriptsAriaLabel' }, "Debug Loaded Scripts"),
|
||||
overrideStyles: {
|
||||
listBackground: this.getBackgroundColor()
|
||||
}
|
||||
@@ -492,7 +491,7 @@ export class LoadedScriptsView extends ViewPane {
|
||||
}, 300);
|
||||
this._register(this.changeScheduler);
|
||||
|
||||
const loadedScriptsNavigator = ResourceNavigator.createTreeResourceNavigator(this.tree);
|
||||
const loadedScriptsNavigator = new TreeResourceNavigator(this.tree);
|
||||
this._register(loadedScriptsNavigator);
|
||||
this._register(loadedScriptsNavigator.onDidOpenResource(e => {
|
||||
if (e.element instanceof BaseTreeItem) {
|
||||
@@ -611,6 +610,7 @@ export class LoadedScriptsView extends ViewPane {
|
||||
}
|
||||
|
||||
layoutBody(height: number, width: number): void {
|
||||
super.layoutBody(height, width);
|
||||
this.tree.layout(height, width);
|
||||
}
|
||||
|
||||
@@ -708,7 +708,11 @@ class LoadedScriptsRenderer implements ICompressibleTreeRenderer<BaseTreeItem, F
|
||||
}
|
||||
}
|
||||
|
||||
class LoadedSciptsAccessibilityProvider implements IAccessibilityProvider<LoadedScriptsItem> {
|
||||
class LoadedSciptsAccessibilityProvider implements IListAccessibilityProvider<LoadedScriptsItem> {
|
||||
|
||||
getWidgetAriaLabel(): string {
|
||||
return nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'loadedScriptsAriaLabel' }, "Debug Loaded Scripts");
|
||||
}
|
||||
|
||||
getAriaLabel(element: LoadedScriptsItem): string {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user