mirror of
https://github.com/Microsoft/vscode
synced 2024-10-13 06:48:17 +00:00
Check with respective owners
This commit is contained in:
parent
9df292b522
commit
e0d5a3d490
|
@ -268,6 +268,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape {
|
|||
if (folders.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
// #54483 @Joh Why are we still using fsPath?
|
||||
return folders[0].uri.fsPath;
|
||||
}
|
||||
|
||||
|
|
|
@ -892,6 +892,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
|
|||
|
||||
private fetchDynamicWorkspaceRecommendations(): TPromise<void> {
|
||||
if (this.contextService.getWorkbenchState() !== WorkbenchState.FOLDER
|
||||
|| this.contextService.getWorkspace().folders[0].uri.scheme !== Schemas.file // #54483: check with @Ramya
|
||||
|| this._dynamicWorkspaceRecommendations.length
|
||||
|| !this._extensionsRecommendationsUrl) {
|
||||
return TPromise.as(null);
|
||||
|
|
|
@ -353,6 +353,7 @@ CommandsRegistry.registerCommand({
|
|||
});
|
||||
|
||||
function revealResourcesInOS(resources: URI[], windowsService: IWindowsService, notificationService: INotificationService, workspaceContextService: IWorkspaceContextService): void {
|
||||
// 54483: Check with @Isi
|
||||
if (resources.length) {
|
||||
sequence(resources.map(r => () => windowsService.showItemInFolder(paths.normalize(r.fsPath, true))));
|
||||
} else if (workspaceContextService.getWorkspace().folders.length) {
|
||||
|
|
|
@ -435,6 +435,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView
|
|||
// Update resource context based on focused element
|
||||
this.disposables.push(this.explorerViewer.onDidChangeFocus((e: { focus: ExplorerItem }) => {
|
||||
const isSingleFolder = this.contextService.getWorkbenchState() === WorkbenchState.FOLDER;
|
||||
// 54483: Check with Isi
|
||||
const resource = e.focus ? e.focus.resource : isSingleFolder ? this.contextService.getWorkspace().folders[0].uri : undefined;
|
||||
this.resourceContext.set(resource);
|
||||
this.folderContext.set((isSingleFolder && !e.focus) || e.focus && e.focus.isDirectory);
|
||||
|
|
|
@ -997,6 +997,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
|
|||
if (resources) {
|
||||
resources.forEach(resource => {
|
||||
let folderPath: string;
|
||||
// #54483 Check with Rob
|
||||
if (this.contextService.getWorkbenchState() === WorkbenchState.FOLDER) {
|
||||
// Show relative path from the root for single-root mode
|
||||
folderPath = paths.normalize(pathToRelative(workspace.folders[0].uri.fsPath, resource.fsPath));
|
||||
|
|
|
@ -268,6 +268,7 @@ export class QueryBuilder {
|
|||
return [uri.file(paths.normalize(searchPath))];
|
||||
}
|
||||
|
||||
// 54483 Check with Rob
|
||||
if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.FOLDER) { // TODO: @Sandy Try checking workspace folders length instead.
|
||||
const workspaceUri = this.workspaceContextService.getWorkspace().folders[0].uri;
|
||||
return [workspaceUri.with({ path: paths.normalize(paths.join(workspaceUri.path, searchPath)) })];
|
||||
|
|
Loading…
Reference in a new issue