mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
Merge from vscode 31e03b8ffbb218a87e3941f2b63a249f061fe0e4 (#4986)
This commit is contained in:
@@ -7,7 +7,7 @@ import { IViewlet } from 'vs/workbench/common/viewlet';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IPager } from 'vs/base/common/paging';
|
||||
import { IQueryOptions, EnablementState, ILocalExtension, IGalleryExtension, IExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { IQueryOptions, EnablementState, ILocalExtension, IGalleryExtension, IExtensionIdentifier, IExtensionManagementServer } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { IViewContainersRegistry, ViewContainer, Extensions as ViewContainerExtensions } from 'vs/workbench/common/views';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
@@ -32,40 +32,41 @@ export const enum ExtensionState {
|
||||
}
|
||||
|
||||
export interface IExtension {
|
||||
type?: ExtensionType;
|
||||
state: ExtensionState;
|
||||
name: string;
|
||||
displayName: string;
|
||||
identifier: IExtensionIdentifier;
|
||||
publisher: string;
|
||||
publisherDisplayName: string;
|
||||
version: string;
|
||||
latestVersion: string;
|
||||
description: string;
|
||||
url?: string;
|
||||
readonly type?: ExtensionType;
|
||||
readonly state: ExtensionState;
|
||||
readonly name: string;
|
||||
readonly displayName: string;
|
||||
readonly identifier: IExtensionIdentifier;
|
||||
readonly publisher: string;
|
||||
readonly publisherDisplayName: string;
|
||||
readonly version: string;
|
||||
readonly latestVersion: string;
|
||||
readonly description: string;
|
||||
readonly url?: string;
|
||||
// {{SQL CARBON EDIT}}
|
||||
downloadPage: string;
|
||||
repository?: string;
|
||||
iconUrl: string;
|
||||
iconUrlFallback: string;
|
||||
licenseUrl?: string;
|
||||
installCount?: number;
|
||||
rating?: number;
|
||||
ratingCount?: number;
|
||||
outdated: boolean;
|
||||
enablementState: EnablementState;
|
||||
dependencies: string[];
|
||||
extensionPack: string[];
|
||||
telemetryData: any;
|
||||
preview: boolean;
|
||||
readonly downloadPage?: string;
|
||||
readonly repository?: string;
|
||||
readonly iconUrl: string;
|
||||
readonly iconUrlFallback: string;
|
||||
readonly licenseUrl?: string;
|
||||
readonly installCount?: number;
|
||||
readonly rating?: number;
|
||||
readonly ratingCount?: number;
|
||||
readonly outdated: boolean;
|
||||
readonly enablementState: EnablementState;
|
||||
readonly dependencies: string[];
|
||||
readonly extensionPack: string[];
|
||||
readonly telemetryData: any;
|
||||
readonly preview: boolean;
|
||||
getManifest(token: CancellationToken): Promise<IExtensionManifest | null>;
|
||||
getReadme(token: CancellationToken): Promise<string>;
|
||||
hasReadme(): boolean;
|
||||
getChangelog(token: CancellationToken): Promise<string>;
|
||||
hasChangelog(): boolean;
|
||||
local?: ILocalExtension;
|
||||
readonly server?: IExtensionManagementServer;
|
||||
readonly local?: ILocalExtension;
|
||||
gallery?: IGalleryExtension;
|
||||
isMalicious: boolean;
|
||||
readonly isMalicious: boolean;
|
||||
}
|
||||
|
||||
export interface IExtensionDependencies {
|
||||
@@ -84,7 +85,8 @@ export interface IExtensionsWorkbenchService {
|
||||
_serviceBrand: any;
|
||||
onChange: Event<IExtension | undefined>;
|
||||
local: IExtension[];
|
||||
queryLocal(): Promise<IExtension[]>;
|
||||
outdated: IExtension[];
|
||||
queryLocal(server?: IExtensionManagementServer): Promise<IExtension[]>;
|
||||
queryGallery(token: CancellationToken): Promise<IPager<IExtension>>;
|
||||
queryGallery(options: IQueryOptions, token: CancellationToken): Promise<IPager<IExtension>>;
|
||||
canInstall(extension: IExtension): boolean;
|
||||
@@ -128,6 +130,7 @@ export enum ExtensionsPolicy {
|
||||
|
||||
export interface IExtensionContainer {
|
||||
extension: IExtension | null;
|
||||
updateWhenCounterExtensionChanges?: boolean;
|
||||
update(): void;
|
||||
}
|
||||
|
||||
@@ -149,7 +152,11 @@ export class ExtensionContainers extends Disposable {
|
||||
for (const container of this.containers) {
|
||||
if (extension && container.extension) {
|
||||
if (areSameExtensions(container.extension.identifier, extension.identifier)) {
|
||||
container.extension = extension;
|
||||
if (!container.extension.server || container.extension.server === extension.server) {
|
||||
container.extension = extension;
|
||||
} else if (container.updateWhenCounterExtensionChanges) {
|
||||
container.update();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
container.update();
|
||||
|
||||
Reference in New Issue
Block a user