mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f (#7282)
* Merge from vscode 1eb87b0e9ce9886afeaecec22b31abd0d9b7939f * fix various icon issues * fix preview features
This commit is contained in:
@@ -5,13 +5,12 @@
|
||||
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
|
||||
import { localize } from 'vs/nls';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { IWindowService, IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IHostService } from 'vs/workbench/services/host/browser/host';
|
||||
|
||||
export class EnablePreviewFeatures implements IWorkbenchContribution {
|
||||
|
||||
@@ -19,11 +18,9 @@ export class EnablePreviewFeatures implements IWorkbenchContribution {
|
||||
|
||||
constructor(
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@IWindowService windowService: IWindowService,
|
||||
@IWindowsService windowsService: IWindowsService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IHostService hostService: IHostService,
|
||||
@IConfigurationService configurationService: IConfigurationService
|
||||
) {
|
||||
let previewFeaturesEnabled = configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||
@@ -32,7 +29,7 @@ export class EnablePreviewFeatures implements IWorkbenchContribution {
|
||||
}
|
||||
Promise.all([
|
||||
windowService.isFocused(),
|
||||
windowsService.getWindowCount()
|
||||
hostService.windowCount
|
||||
]).then(([focused, count]) => {
|
||||
if (!focused && count > 1) {
|
||||
return null;
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
//tslint:disable-next-line:layering
|
||||
import { ElectronMainService } from 'vs/platform/electron/electron-main/electronMainService';
|
||||
|
||||
export class ShowFileInFolderAction extends Action {
|
||||
|
||||
constructor(private path: string, label: string, private windowsService: IWindowsService) {
|
||||
constructor(private path: string, label: string, private windowsService: ElectronMainService) {
|
||||
super('showItemInFolder.action.id', label);
|
||||
}
|
||||
|
||||
run(): Promise<void> {
|
||||
return this.windowsService.showItemInFolder(URI.file(this.path));
|
||||
return this.windowsService.showItemInFolder(this.path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user