1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 05:05:25 +00:00
code-server-2/scripts/vscode.patch

1652 lines
92 KiB
Diff
Raw Normal View History

2019-07-22 21:00:59 +00:00
diff --git a/src/typings/require.d.ts b/src/typings/require.d.ts
index 618861a5be..9d4fdea14e 100644
--- a/src/typings/require.d.ts
+++ b/src/typings/require.d.ts
@@ -46,5 +46,7 @@ interface NodeRequire {
config(data: any): any;
onError: Function;
__$__nodeRequire<T>(moduleName: string): T;
- getStats(): ReadonlyArray<LoaderEvent>
+ getStats(): ReadonlyArray<LoaderEvent>;
+ withBase(path: string ): string;
+ withBase(resource: { path: string }): { toString: (skipEncoding?: boolean) => string };
}
2019-07-19 20:10:43 +00:00
diff --git a/src/vs/base/common/buffer.ts b/src/vs/base/common/buffer.ts
index 7b4e9cc8d6..7722cb12c6 100644
--- a/src/vs/base/common/buffer.ts
+++ b/src/vs/base/common/buffer.ts
@@ -138,7 +138,7 @@ export interface VSBufferReadable {
* Read data from the underlying source. Will return
* null to indicate that no more data can be read.
*/
- read(): VSBuffer | null;
+ read(): VSBuffer | null | Promise<VSBuffer | null>;
}
/**
@@ -185,11 +185,11 @@ export interface VSBufferReadableStream {
/**
* Helper to fully read a VSBuffer readable into a single buffer.
*/
-export function readableToBuffer(readable: VSBufferReadable): VSBuffer {
+export async function readableToBuffer(readable: VSBufferReadable): Promise<VSBuffer> {
const chunks: VSBuffer[] = [];
let chunk: VSBuffer | null;
- while (chunk = readable.read()) {
+ while (chunk = await readable.read()) {
chunks.push(chunk);
}
2019-07-22 21:00:59 +00:00
diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts
index a7466e641a..6d91e66ad3 100644
--- a/src/vs/base/common/network.ts
+++ b/src/vs/base/common/network.ts
@@ -46,4 +46,6 @@ export namespace Schemas {
export const command: string = 'command';
export const vscodeRemote: string = 'vscode-remote';
+
+ export const codeServer: string = 'code-server';
}
diff --git a/src/vs/code/browser/workbench/workbench.html b/src/vs/code/browser/workbench/workbench.html
index ff62e0a65a..78c93aeb5a 100644
--- a/src/vs/code/browser/workbench/workbench.html
+++ b/src/vs/code/browser/workbench/workbench.html
@@ -4,6 +4,8 @@
<head>
<meta charset="utf-8" />
+ <link rel="shortcut icon" href="./favicon.ico" />
+
<!-- Disable pinch zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
@@ -30,4 +32,4 @@
2019-07-13 00:09:07 +00:00
2019-07-22 21:00:59 +00:00
<!-- Startup via workbench.js -->
<script src="./out/vs/code/browser/workbench/workbench.js"></script>
-</html>
\ No newline at end of file
+</html>
diff --git a/src/vs/code/browser/workbench/workbench.js b/src/vs/code/browser/workbench/workbench.js
index 34f321f90d..48bab7db1c 100644
--- a/src/vs/code/browser/workbench/workbench.js
+++ b/src/vs/code/browser/workbench/workbench.js
@@ -7,14 +7,19 @@
(function () {
+ const basePath = window.location.pathname.replace(/\/+$/, '');
+ const base = window.location.origin + basePath;
require.config({
- baseUrl: `${window.location.origin}/out`,
+ baseUrl: `${base}/out`,
+ baseScheme: window.location.protocol.replace(/:$/, ''),
+ basePath: basePath + "/resources",
+ baseAuthority: window.location.host,
paths: {
- 'vscode-textmate': `${window.location.origin}/node_modules/vscode-textmate/release/main`,
- 'onigasm-umd': `${window.location.origin}/node_modules/onigasm-umd/release/main`,
- 'xterm': `${window.location.origin}/node_modules/xterm/lib/xterm.js`,
- 'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
- 'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
+ 'vscode-textmate': `${base}/node_modules/vscode-textmate/release/main`,
+ 'onigasm-umd': `${base}/node_modules/onigasm-umd/release/main`,
+ 'xterm': `${base}/node_modules/xterm/lib/xterm.js`,
+ 'xterm-addon-search': `${base}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
+ 'xterm-addon-web-links': `${base}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
}
});
@@ -23,4 +28,4 @@
api.create(document.body, options);
});
-})();
\ No newline at end of file
+})();
diff --git a/src/vs/loader.js b/src/vs/loader.js
index 40b6d2aa32..5b12b272fe 100644
--- a/src/vs/loader.js
+++ b/src/vs/loader.js
@@ -497,6 +497,28 @@ var AMDLoader;
}
return this._addUrlArgsIfNecessaryToUrl(result);
};
+ /**
+ * Transform a url to use the site base.
+ */
+ Configuration.prototype.requireWithBase = function (resource) {
+ if (!this.options.baseScheme || !this.options.basePath || !this.options.baseAuthority) {
+ return resource;
+ }
+ if (typeof resource === "string") {
+ return resource.replace(
+ /^(code-server|file):\/\/[^/]*/,
+ `${this.options.baseScheme}://${this.options.baseAuthority}${this.options.basePath}`
+ );
+ }
+ if (resource.scheme === this.options.baseScheme) {
+ return resource;
+ }
+ return resource.with({
+ authority: this.options.baseAuthority,
+ scheme: this.options.baseScheme,
+ path: `${this.options.basePath}${resource.path}`,
+ });
+ };
/**
* Flag to indicate if current execution is as part of a build.
*/
@@ -1427,6 +1449,9 @@ var AMDLoader;
result.getStats = function () {
return _this.getLoaderEvents();
};
+ result.withBase = function (resource) {
+ return _this._config.requireWithBase(resource);
+ };
result.__$__nodeRequire = AMDLoader.global.nodeRequire;
return result;
};
diff --git a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts
index 2dae143385..3fa8ac96d1 100644
--- a/src/vs/platform/actions/browser/menuEntryActionViewItem.ts
+++ b/src/vs/platform/actions/browser/menuEntryActionViewItem.ts
@@ -244,8 +244,8 @@ export class MenuEntryActionViewItem extends ActionViewItem {
iconClass = MenuEntryActionViewItem.ICON_PATH_TO_CSS_RULES.get(iconPathMapKey)!;
} else {
iconClass = ids.nextId();
- createCSSRule(`.icon.${iconClass}`, `background-image: url("${(item.iconLocation.light || item.iconLocation.dark).toString()}")`);
- createCSSRule(`.vs-dark .icon.${iconClass}, .hc-black .icon.${iconClass}`, `background-image: url("${item.iconLocation.dark.toString()}")`);
+ createCSSRule(`.icon.${iconClass}`, `background-image: url("${require.withBase(item.iconLocation.light || item.iconLocation.dark).toString()}")`);
+ createCSSRule(`.vs-dark .icon.${iconClass}, .hc-black .icon.${iconClass}`, `background-image: url("${require.withBase(item.iconLocation.dark).toString()}")`);
MenuEntryActionViewItem.ICON_PATH_TO_CSS_RULES.set(iconPathMapKey, iconClass);
}
2019-07-13 00:09:07 +00:00
diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts
index 443e430fcd..fdd9900598 100644
--- a/src/vs/platform/environment/common/environment.ts
+++ b/src/vs/platform/environment/common/environment.ts
@@ -156,4 +156,7 @@ export interface IEnvironmentService {
webviewEndpoint?: string;
readonly webviewResourceRoot: string;
+
+ extraExtensionPaths: string[];
+ extraBuiltinExtensionPaths: string[];
}
diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts
index 55c3d8302a..b8568fa785 100644
--- a/src/vs/platform/environment/node/environmentService.ts
+++ b/src/vs/platform/environment/node/environmentService.ts
@@ -276,6 +276,16 @@ export class EnvironmentService implements IEnvironmentService {
return 'vscode-resource:';
}
+ @memoize
+ get extraExtensionPaths(): string[] {
+ return (this._args['extra-extensions-dir'] || []).map((p: string) => parsePathArg(p, process));
+ }
+
+ @memoize
+ get extraBuiltinExtensionPaths(): string[] {
+ return (this._args['extra-builtin-extensions-dir'] || []).map((p: string) => parsePathArg(p, process));
+ }
+
constructor(private _args: ParsedArgs, private _execPath: string) {
if (!process.env['VSCODE_LOGS']) {
const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '');
2019-07-10 21:29:15 +00:00
diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryIpc.ts b/src/vs/platform/extensionManagement/node/extensionGalleryIpc.ts
new file mode 100644
index 0000000000..ef1db87989
--- /dev/null
+++ b/src/vs/platform/extensionManagement/node/extensionGalleryIpc.ts
@@ -0,0 +1,96 @@
+import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
+import { IGalleryExtension, IReportedExtension, IExtensionGalleryService, IQueryOptions, InstallOperation, StatisticType, IGalleryExtensionVersion, ITranslation } from 'vs/platform/extensionManagement/common/extensionManagement';
+import { Event } from 'vs/base/common/event';
+import { IExtensionManifest, IExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
+import { IPager } from 'vs/base/common/paging';
+import { CancellationToken } from 'vs/base/common/cancellation';
+import { IProductService } from 'vs/platform/product/common/product';
+
2019-07-10 21:29:15 +00:00
+export class ExtensionGalleryChannel implements IServerChannel {
+
2019-07-10 21:29:15 +00:00
+ constructor(private service: IExtensionGalleryService) {}
+
+ listen(_: unknown, _event: string): Event<any> {
+ throw new Error('Invalid listen');
+ }
+
+ call(_: unknown, command: string, args?: any, cancellationToken?: CancellationToken): Promise<any> {
+ switch (command) {
+ case 'query': return args.length > 0 ? this.service.query(args[0], cancellationToken!) : this.service.query(cancellationToken!);
+ case 'download': return this.service.download(args[0], args[1]);
+ case 'reportStatistic': return this.service.reportStatistic(args[0], args[1], args[2], args[3]);
+ case 'getReadme': return this.service.getReadme(args[0], cancellationToken!);
+ case 'getManifest': return this.service.getManifest(args[0], cancellationToken!);
+ case 'getChangelog': return this.service.getChangelog(args[0], cancellationToken!);
+ case 'getCoreTranslation': return this.service.getCoreTranslation(args[0], args[1]);
+ case 'getAllVersions': return this.service.getAllVersions(args[0], args[1]);
+ case 'getExtensionsReport': return this.service.getExtensionsReport();
+ case 'getCompatibleExtension': return this.service.getCompatibleExtension(args[0], args[1]);
+ }
2019-07-10 21:29:15 +00:00
+
+ throw new Error(`Invalid call: ${command}`);
+ }
+}
+
+export class ExtensionGalleryChannelClient implements IExtensionGalleryService {
+
+ _serviceBrand: any;
+
+ private extensionsGalleryUrl: string | undefined;
+
+ constructor(
+ private readonly channel: IChannel,
+ productService: IProductService,
+ ) {
+ const config = productService.extensionsGallery;
+ this.extensionsGalleryUrl = config && config.serviceUrl;
+ }
+
+ isEnabled(): boolean {
+ return !!this.extensionsGalleryUrl;
+ }
+
+ query(token: CancellationToken): Promise<IPager<IGalleryExtension>>;
+ query(options: IQueryOptions, token: CancellationToken): Promise<IPager<IGalleryExtension>>;
+ query(options: IQueryOptions | CancellationToken, token?: CancellationToken): Promise<IPager<IGalleryExtension>> {
+ return this.channel.call('query', CancellationToken.isCancellationToken(options) ? [] : [ options ], token);
+ }
+
+ download(extension: IGalleryExtension, operation: InstallOperation): Promise<string> {
+ return this.channel.call('download', [ extension, operation ]);
+ }
+
+ reportStatistic(publisher: string, name: string, version: string, type: StatisticType): Promise<void> {
+ return this.channel.call('reportStatistic', [ publisher, name, version, type ]);
+ }
+
+ getReadme(extension: IGalleryExtension, token: CancellationToken): Promise<string> {
+ return this.channel.call('getReadme', [ extension ], token);
+ }
+
+ getManifest(extension: IGalleryExtension, token: CancellationToken): Promise<IExtensionManifest | null> {
+ return this.channel.call('getManifest', [ extension ], token);
+ }
+
+ getChangelog(extension: IGalleryExtension, token: CancellationToken): Promise<string> {
+ return this.channel.call('getChangelog', [ extension ], token);
+ }
+
+ getCoreTranslation(extension: IGalleryExtension, languageId: string): Promise<ITranslation | null> {
+ return this.channel.call('getCoreTranslation', [ extension, languageId ]);
+ }
+
+ getAllVersions(extension: IGalleryExtension, compatible: boolean): Promise<IGalleryExtensionVersion[]> {
+ return this.channel.call('getAllVersions', [ extension, compatible ]);
+ }
2019-07-10 21:29:15 +00:00
+
+ getExtensionsReport(): Promise<IReportedExtension[]> {
+ return this.channel.call('getExtensionsReport');
+ }
2019-07-10 21:29:15 +00:00
+
+ getCompatibleExtension(extension: IGalleryExtension): Promise<IGalleryExtension | null>;
+ getCompatibleExtension(id: IExtensionIdentifier, version?: string): Promise<IGalleryExtension | null>;
+ getCompatibleExtension(id: IExtensionIdentifier | IGalleryExtension, version?: string): Promise<IGalleryExtension | null> {
+ return this.channel.call('getCompatibleExtension', [ id, version ]);
+ }
2019-07-10 21:29:15 +00:00
+}
diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts
index e09049c5b9..d93ffa527a 100644
--- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts
+++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts
@@ -724,11 +724,15 @@ export class ExtensionManagementService extends Disposable implements IExtension
private scanSystemExtensions(): Promise<ILocalExtension[]> {
this.logService.trace('Started scanning system extensions');
- const systemExtensionsPromise = this.scanExtensions(this.systemExtensionsPath, ExtensionType.System)
- .then(result => {
- this.logService.trace('Scanned system extensions:', result.length);
- return result;
- });
+ const systemExtensionsPromise = Promise.all([
+ this.scanExtensions(this.systemExtensionsPath, ExtensionType.System),
+ ...this.environmentService.extraBuiltinExtensionPaths
+ .map((path) => this.scanExtensions(path, ExtensionType.System))
+ ]).then((results) => {
+ const result = results.reduce((flat, current) => flat.concat(current), []);
+ this.logService.info('Scanned system extensions:', result.length);
+ return result;
+ });
if (this.environmentService.isBuilt) {
return systemExtensionsPromise;
}
@@ -750,9 +754,16 @@ export class ExtensionManagementService extends Disposable implements IExtension
.then(([systemExtensions, devSystemExtensions]) => [...systemExtensions, ...devSystemExtensions]);
}
+ private scanAllUserExtensions(folderName: string, type: ExtensionType): Promise<ILocalExtension[]> {
+ return Promise.all([
+ this.scanExtensions(folderName, type),
+ ...this.environmentService.extraExtensionPaths.map((p) => this.scanExtensions(p, ExtensionType.User))
+ ]).then((results) => results.reduce((flat, current) => flat.concat(current), []));
+ }
+
private scanUserExtensions(excludeOutdated: boolean): Promise<ILocalExtension[]> {
this.logService.trace('Started scanning user extensions');
- return Promise.all([this.getUninstalledExtensions(), this.scanExtensions(this.extensionsPath, ExtensionType.User)])
+ return Promise.all([this.getUninstalledExtensions(), this.scanAllUserExtensions(this.extensionsPath, ExtensionType.User)])
.then(([uninstalled, extensions]) => {
extensions = extensions.filter(e => !uninstalled[new ExtensionIdentifierWithVersion(e.identifier, e.manifest.version).key()]);
if (excludeOutdated) {
@@ -805,7 +816,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
private async removeUninstalledExtensions(): Promise<void> {
const uninstalled = await this.getUninstalledExtensions();
- const extensions = await this.scanExtensions(this.extensionsPath, ExtensionType.User); // All user extensions
+ const extensions = await this.scanAllUserExtensions(this.extensionsPath, ExtensionType.User); // All user extensions
const installed: Set<string> = new Set<string>();
for (const e of extensions) {
if (!uninstalled[new ExtensionIdentifierWithVersion(e.identifier, e.manifest.version).key()]) {
@@ -824,7 +835,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
}
private removeOutdatedExtensions(): Promise<void> {
- return this.scanExtensions(this.extensionsPath, ExtensionType.User) // All user extensions
+ return this.scanAllUserExtensions(this.extensionsPath, ExtensionType.User) // All user extensions
.then(extensions => {
const toRemove: ILocalExtension[] = [];
@@ -982,4 +993,4 @@ export class ExtensionManagementService extends Disposable implements IExtension
*/
this.telemetryService.publicLog(eventName, assign(extensionData, { success: !error, duration, errorcode }));
}
-}
\ No newline at end of file
+}
2019-07-16 19:57:02 +00:00
diff --git a/src/vs/platform/log/common/logIpc.ts b/src/vs/platform/log/common/logIpc.ts
index 9f68b645b6..fe380bb6f8 100644
--- a/src/vs/platform/log/common/logIpc.ts
+++ b/src/vs/platform/log/common/logIpc.ts
@@ -26,6 +26,7 @@ export class LogLevelSetterChannel implements IServerChannel {
call(_: unknown, command: string, arg?: any): Promise<any> {
switch (command) {
case 'setLevel': this.service.setLevel(arg); return Promise.resolve();
+ case 'getLevel': return Promise.resolve(this.service.getLevel());
}
throw new Error(`Call not found: ${command}`);
@@ -40,6 +41,10 @@ export class LogLevelSetterChannelClient {
return this.channel.listen('onDidChangeLogLevel');
}
+ getLevel(): Promise<LogLevel> {
+ return this.channel.call('getLevel');
+ }
+
setLevel(level: LogLevel): void {
this.channel.call('setLevel', level);
}
@@ -56,4 +61,4 @@ export class FollowerLogService extends DelegatedLogService implements ILogServi
setLevel(level: LogLevel): void {
this.master.setLevel(level);
}
-}
\ No newline at end of file
+}
2019-07-22 21:00:59 +00:00
diff --git a/src/vs/platform/remote/browser/browserWebSocketFactory.ts b/src/vs/platform/remote/browser/browserWebSocketFactory.ts
index 6d9ecbcf5a..1ebd5a4b84 100644
--- a/src/vs/platform/remote/browser/browserWebSocketFactory.ts
+++ b/src/vs/platform/remote/browser/browserWebSocketFactory.ts
@@ -79,7 +79,7 @@ class BrowserSocket implements ISocket {
export const browserWebSocketFactory = new class implements IWebSocketFactory {
connect(host: string, port: number, query: string, callback: IConnectCallback): void {
const errorListener = (err: any) => callback(err, undefined);
- const socket = new WebSocket(`ws://${host}:${port}/?${query}&skipWebSocketFrames=false`);
+ const socket = new WebSocket(`ws://${host}:${port}${window.location.pathname.replace(/\/+$/, '')}/?${query}&skipWebSocketFrames=false`);
socket.onopen = function (event) {
socket.removeEventListener('error', errorListener);
callback(undefined, new BrowserSocket(socket));
2019-07-16 19:57:02 +00:00
diff --git a/src/vs/platform/telemetry/node/telemetryIpc.ts b/src/vs/platform/telemetry/node/telemetryIpc.ts
index 8e1b68eb36..2b6a0d5b15 100644
--- a/src/vs/platform/telemetry/node/telemetryIpc.ts
+++ b/src/vs/platform/telemetry/node/telemetryIpc.ts
@@ -6,6 +6,9 @@
import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
import { ITelemetryAppender } from 'vs/platform/telemetry/common/telemetryUtils';
import { Event } from 'vs/base/common/event';
+import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
+import { ITelemetryData } from 'vs/base/common/actions';
+import { ClassifiedEvent, GDPRClassification, StrictPropertyCheck } from 'vs/platform/telemetry/common/gdprTypings';
export interface ITelemetryLog {
eventName: string;
@@ -41,3 +44,52 @@ export class TelemetryAppenderClient implements ITelemetryAppender {
// TODO
}
}
+
+export class TelemetryChannel implements IServerChannel {
+
+ constructor(private service: ITelemetryService) {}
+
+ listen(_: unknown, event: string): Event<any> {
+ throw new Error(`Invalid listen ${event}`);
+ }
+
+ call(_: unknown, command: string, args?: any): Promise<any> {
+ switch (command) {
+ case 'publicLog': return this.service.publicLog(args[0], args[1], args[2]);
+ case 'publicLog2': return this.service.publicLog2(args[0], args[1], args[2]);
+ case 'setEnabled': return Promise.resolve(this.service.setEnabled(args[0]));
+ case 'getTelemetryInfo': return this.service.getTelemetryInfo();
+ }
+
+ throw new Error(`Invalid call ${command}`);
+ }
+}
+
+export class TelemetryChannelClient implements ITelemetryService {
+
+ _serviceBrand: any;
+
+ constructor(
+ private readonly channel: IChannel,
+ ) { }
+
+ public publicLog(eventName: string, data?: ITelemetryData, anonymizeFilePaths?: boolean): Promise<void> {
+ return this.channel.call('publicLog', [eventName, data, anonymizeFilePaths]);
+ }
+
+ public publicLog2<E extends ClassifiedEvent<T> = never, T extends GDPRClassification<T> = never>(eventName: string, data?: StrictPropertyCheck<T, E>, anonymizeFilePaths?: boolean): Promise<void> {
+ return this.channel.call('publicLog2', [eventName, data, anonymizeFilePaths]);
+ }
+
+ public setEnabled(value: boolean): void {
+ this.channel.call('setEnable', [value]);
+ }
+
+ public getTelemetryInfo(): Promise<ITelemetryInfo> {
+ return this.channel.call('getTelemetryInfo');
+ }
+
+ public get isOptedIn(): boolean {
+ return true;
+ }
+}
2019-07-22 21:00:59 +00:00
diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts
index 8bace46843..c18eb109eb 100644
--- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts
+++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts
@@ -327,7 +327,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
// Generate CSS to show the icon in the activity bar
const iconClass = `.monaco-workbench .activitybar .monaco-action-bar .action-label.${cssClass}`;
- createCSSRule(iconClass, `-webkit-mask: url('${icon}') no-repeat 50% 50%`);
+ createCSSRule(iconClass, `-webkit-mask: url('${require.withBase(icon)}') no-repeat 50% 50%`);
}
return viewContainer;
@@ -456,4 +456,4 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
}
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
-workbenchRegistry.registerWorkbenchContribution(ViewsExtensionHandler, LifecyclePhase.Starting);
\ No newline at end of file
+workbenchRegistry.registerWorkbenchContribution(ViewsExtensionHandler, LifecyclePhase.Starting);
2019-07-19 20:10:43 +00:00
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
index 2054ceece3..f99dfd0b73 100644
--- a/src/vs/workbench/browser/dnd.ts
+++ b/src/vs/workbench/browser/dnd.ts
@@ -31,6 +31,7 @@ import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsSe
import { IRecentFile } from 'vs/platform/history/common/history';
import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing';
import { withNullAsUndefined } from 'vs/base/common/types';
+import { IUploadService } from 'vs/server/src/upload';
export interface IDraggedResource {
resource: URI;
@@ -166,14 +167,15 @@ export class ResourcesDropHandler {
@IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService,
@IEditorService private readonly editorService: IEditorService,
@IConfigurationService private readonly configurationService: IConfigurationService,
- @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService
+ @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService,
+ @IUploadService private readonly uploadService: IUploadService,
) {
}
async handleDrop(event: DragEvent, resolveTargetGroup: () => IEditorGroup | undefined, afterDrop: (targetGroup: IEditorGroup | undefined) => void, targetIndex?: number): Promise<void> {
const untitledOrFileResources = extractResources(event).filter(r => this.fileService.canHandleResource(r.resource) || r.resource.scheme === Schemas.untitled);
if (!untitledOrFileResources.length) {
- return;
+ return this.uploadService.handleDrop(event, resolveTargetGroup, afterDrop, targetIndex);
}
// Make the window active to handle the drop properly within
2019-07-22 21:00:59 +00:00
diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
index 24d8fe70c7..0670ebb774 100644
--- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
+++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
@@ -173,7 +173,7 @@ export class PlaceHolderViewletActivityAction extends ViewletActivityAction {
super({ id, name: id, cssClass: `extensionViewlet-placeholder-${id.replace(/\./g, '-')}` }, viewletService, layoutService, telemetryService);
const iconClass = `.monaco-workbench .activitybar .monaco-action-bar .action-label.${this.class}`; // Generate Placeholder CSS to show the icon in the activity bar
- DOM.createCSSRule(iconClass, `-webkit-mask: url('${iconUrl || ''}') no-repeat 50% 50%`);
+ DOM.createCSSRule(iconClass, `-webkit-mask: url('${iconUrl ? require.withBase(iconUrl) : ''}') no-repeat 50% 50%`);
}
setActivity(activity: IActivity): void {
diff --git a/src/vs/workbench/browser/parts/editor/resourceViewer.ts b/src/vs/workbench/browser/parts/editor/resourceViewer.ts
index a5e644112b..99f8271a59 100644
--- a/src/vs/workbench/browser/parts/editor/resourceViewer.ts
+++ b/src/vs/workbench/browser/parts/editor/resourceViewer.ts
@@ -548,7 +548,7 @@ class InlineImageView {
const img = container.querySelector('img');
if (img) {
if (typeof src === 'string') {
- img.src = src;
+ img.src = require.withBase(src);
} else {
const url = URL.createObjectURL(src);
disposables.add(toDisposable(() => URL.revokeObjectURL(url)));
diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts b/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts
index babe949511..7bce969709 100644
--- a/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts
+++ b/src/vs/workbench/browser/parts/quickinput/quickInputUtils.ts
@@ -22,8 +22,8 @@ export function getIconClass(iconPath: { dark: URI; light?: URI; } | undefined):
iconClass = iconPathToClass[key];
} else {
iconClass = iconClassGenerator.nextId();
- dom.createCSSRule(`.${iconClass}`, `background-image: url("${(iconPath.light || iconPath.dark).toString()}")`);
- dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: url("${iconPath.dark.toString()}")`);
+ dom.createCSSRule(`.${iconClass}`, `background-image: url("${require.withBase(iconPath.light || iconPath.dark).toString()}")`);
+ dom.createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`, `background-image: url("${require.withBase(iconPath.dark).toString()}")`);
iconPathToClass[key] = iconClass;
}
diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts
index 5a758eb786..7fcacb5ca7 100644
--- a/src/vs/workbench/browser/parts/views/customView.ts
+++ b/src/vs/workbench/browser/parts/views/customView.ts
@@ -674,7 +674,7 @@ class TreeRenderer implements IRenderer {
templateData.resourceLabel.setResource({ name: label, description }, { title, hideIcon: true, extraClasses: ['custom-view-tree-node-item-resourceLabel'], matches });
}
- templateData.icon.style.backgroundImage = iconUrl ? `url('${iconUrl.toString(true)}')` : '';
+ templateData.icon.style.backgroundImage = iconUrl ? `url('${require.withBase(iconUrl).toString(true)}')` : '';
DOM.toggleClass(templateData.icon, 'custom-view-tree-node-item-icon', !!iconUrl);
templateData.actionBar.context = (<TreeViewItemHandleArg>{ $treeViewId: this.treeViewId, $treeItemHandle: node.handle });
templateData.actionBar.push(this.menus.getResourceActions(node), { icon: true, label: false });
2019-07-10 21:29:15 +00:00
diff --git a/src/vs/workbench/browser/web.main.ts b/src/vs/workbench/browser/web.main.ts
2019-07-22 21:00:59 +00:00
index 1986fb6642..9b5ff6603c 100644
2019-07-10 21:29:15 +00:00
--- a/src/vs/workbench/browser/web.main.ts
+++ b/src/vs/workbench/browser/web.main.ts
2019-07-17 16:57:26 +00:00
@@ -35,6 +35,7 @@ import { SignService } from 'vs/platform/sign/browser/signService';
import { hash } from 'vs/base/common/hash';
import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
import { ProductService } from 'vs/platform/product/browser/productService';
+import { coderApi, vscodeApi } from 'vs/server/src/api';
class CodeRendererMain extends Disposable {
@@ -71,6 +72,15 @@ class CodeRendererMain extends Disposable {
// Startup
this.workbench.startup();
+
+ const target = window as any;
+ target.ide = coderApi(services.serviceCollection);
+ target.vscode = vscodeApi(services.serviceCollection);
+
+ const event = new CustomEvent('ide-ready');
+ (event as any).ide = target.ide;
+ (event as any).vscode = target.vscode;
+ window.dispatchEvent(event);
}
private async initServices(): Promise<{ serviceCollection: ServiceCollection, logService: ILogService }> {
2019-07-22 21:00:59 +00:00
@@ -114,7 +124,8 @@ class CodeRendererMain extends Disposable {
const channel = connection.getChannel<IChannel>(REMOTE_FILE_SYSTEM_CHANNEL_NAME);
2019-07-10 21:29:15 +00:00
const remoteFileSystemProvider = this._register(new RemoteExtensionsFileSystemProvider(channel, remoteAgentService.getEnvironment()));
2019-07-13 00:09:07 +00:00
2019-07-22 21:00:59 +00:00
- fileService.registerProvider(Schemas.vscodeRemote, remoteFileSystemProvider);
+ fileService.registerProvider(Schemas.codeServer, remoteFileSystemProvider);
2019-07-12 22:13:49 +00:00
+ fileService.registerProvider(Schemas.file, remoteFileSystemProvider);
2019-07-10 21:29:15 +00:00
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
const payload = await this.resolveWorkspaceInitializationPayload();
2019-07-22 21:00:59 +00:00
@@ -170,4 +181,4 @@ export function main(domElement: HTMLElement, options: IWorkbenchConstructionOpt
2019-07-10 21:29:15 +00:00
const renderer = new CodeRendererMain(domElement, options);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
return renderer.open();
-}
\ No newline at end of file
+}
diff --git a/src/vs/workbench/browser/web.simpleservices.ts b/src/vs/workbench/browser/web.simpleservices.ts
2019-07-19 20:10:43 +00:00
index b253e573ae..e23d9c970e 100644
2019-07-10 21:29:15 +00:00
--- a/src/vs/workbench/browser/web.simpleservices.ts
+++ b/src/vs/workbench/browser/web.simpleservices.ts
2019-07-19 20:10:43 +00:00
@@ -53,6 +53,14 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
2019-07-10 21:29:15 +00:00
import { ParsedArgs } from 'vs/platform/environment/common/environment';
import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings';
import { IProcessEnvironment } from 'vs/base/common/platform';
+import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
+import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc';
2019-07-16 19:57:02 +00:00
+import { ExtensionGalleryChannelClient } from 'vs/platform/extensionManagement/node/extensionGalleryIpc';
+import { TelemetryChannelClient } from 'vs/platform/telemetry/node/telemetryIpc';
2019-07-10 21:29:15 +00:00
+import { IProductService } from 'vs/platform/product/common/product';
2019-07-19 20:10:43 +00:00
+import { IUploadService, UploadService } from 'vs/server/src/upload';
+
+registerSingleton(IUploadService, UploadService, true);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
//#region Backup File
2019-07-13 00:09:07 +00:00
2019-07-19 20:10:43 +00:00
@@ -125,13 +133,11 @@ export class SimpleClipboardService implements IClipboardService {
2019-07-10 21:29:15 +00:00
writeText(text: string, type?: string): void { }
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
readText(type?: string): string {
- // @ts-ignore
- return undefined;
+ throw new Error('not implemented');
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
readFindText(): string {
- // @ts-ignore
- return undefined;
+ throw new Error('not implemented');
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
writeFindText(text: string): void { }
2019-07-19 20:10:43 +00:00
@@ -239,7 +245,17 @@ export class SimpleExtensionGalleryService implements IExtensionGalleryService {
2019-07-10 21:29:15 +00:00
}
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-registerSingleton(IExtensionGalleryService, SimpleExtensionGalleryService, true);
+// registerSingleton(IExtensionGalleryService, SimpleExtensionGalleryService, true);
+
+class ExtensionGalleryService extends ExtensionGalleryChannelClient {
+ public constructor(
+ @IRemoteAgentService remoteAgentService: IRemoteAgentService,
+ @IProductService productService: IProductService,
+ ) {
+ super(remoteAgentService.getConnection()!.getChannel('gallery'), productService);
+ }
2019-07-10 21:29:15 +00:00
+}
+registerSingleton(IExtensionGalleryService, ExtensionGalleryService, true);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
//#endregion
2019-07-13 00:09:07 +00:00
2019-07-19 20:10:43 +00:00
@@ -262,7 +278,7 @@ export class SimpleExtensionsWorkbenchService implements IExtensionsWorkbenchSer
2019-07-10 21:29:15 +00:00
checkForUpdates: any;
allowedBadgeProviders: string[];
}
-registerSingleton(IExtensionsWorkbenchService, SimpleExtensionsWorkbenchService, true);
+// registerSingleton(IExtensionsWorkbenchService, SimpleExtensionsWorkbenchService, true);
//#endregion
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
//#region ICommentService
2019-07-19 20:10:43 +00:00
@@ -375,7 +391,10 @@ export class SimpleExtensionTipsService implements IExtensionTipsService {
2019-07-10 21:29:15 +00:00
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
getAllIgnoredRecommendations(): { global: string[]; workspace: string[]; } {
- return Object.create(null);
+ return {
+ global: [],
+ workspace: [],
+ };
}
}
2019-07-13 00:09:07 +00:00
2019-07-19 20:10:43 +00:00
@@ -436,7 +455,16 @@ export class SimpleExtensionManagementService implements IExtensionManagementSer
2019-07-10 21:29:15 +00:00
}
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-registerSingleton(IExtensionManagementService, SimpleExtensionManagementService);
+// registerSingleton(IExtensionManagementService, SimpleExtensionManagementService);
+
2019-07-10 21:29:15 +00:00
+class LocalExtensionManagementService extends ExtensionManagementChannelClient {
+ public constructor(
+ @IRemoteAgentService remoteAgentService: IRemoteAgentService,
+ ) {
+ super(remoteAgentService.getConnection()!.getChannel('extensions'));
+ }
+}
+registerSingleton(IExtensionManagementService, LocalExtensionManagementService);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
//#endregion
2019-07-13 00:09:07 +00:00
2019-07-19 20:10:43 +00:00
@@ -680,7 +708,15 @@ export class SimpleTelemetryService implements ITelemetryService {
2019-07-16 19:57:02 +00:00
}
}
-registerSingleton(ITelemetryService, SimpleTelemetryService);
+// registerSingleton(ITelemetryService, SimpleTelemetryService);
+class TelemetryService extends TelemetryChannelClient {
+ public constructor(
+ @IRemoteAgentService remoteAgentService: IRemoteAgentService,
+ ) {
+ super(remoteAgentService.getConnection()!.getChannel('telemetry'));
+ }
+}
+registerSingleton(ITelemetryService, TelemetryService);
//#endregion
2019-07-19 20:10:43 +00:00
@@ -1288,4 +1324,4 @@ class SimpleTunnelService implements ITunnelService {
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
registerSingleton(ITunnelService, SimpleTunnelService);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-//#endregion
\ No newline at end of file
+//#endregion
2019-07-22 21:00:59 +00:00
diff --git a/src/vs/workbench/contrib/comments/browser/commentNode.ts b/src/vs/workbench/contrib/comments/browser/commentNode.ts
index f4ac3fe8dd..b4f36911c0 100644
--- a/src/vs/workbench/contrib/comments/browser/commentNode.ts
+++ b/src/vs/workbench/contrib/comments/browser/commentNode.ts
@@ -108,7 +108,7 @@ export class CommentNode extends Disposable {
const avatar = dom.append(this._domNode, dom.$('div.avatar-container'));
if (comment.userIconPath) {
const img = <HTMLImageElement>dom.append(avatar, dom.$('img.avatar'));
- img.src = comment.userIconPath.toString();
+ img.src = require.withBase(comment.userIconPath).toString();
img.onerror = _ => img.remove();
}
this._commentDetailsContainer = dom.append(this._domNode, dom.$('.review-comment-contents'));
@@ -761,4 +761,4 @@ function fillInActions(groups: [string, Array<MenuItemAction | SubmenuItemAction
to.push(...actions);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/vs/workbench/contrib/comments/browser/reactionsAction.ts b/src/vs/workbench/contrib/comments/browser/reactionsAction.ts
index c14030dab8..42b666446d 100644
--- a/src/vs/workbench/contrib/comments/browser/reactionsAction.ts
+++ b/src/vs/workbench/contrib/comments/browser/reactionsAction.ts
@@ -46,7 +46,7 @@ export class ReactionActionViewItem extends ActionViewItem {
let reactionIcon = dom.append(this.label, dom.$('.reaction-icon'));
reactionIcon.style.display = '';
let uri = URI.revive(action.icon);
- reactionIcon.style.backgroundImage = `url('${uri}')`;
+ reactionIcon.style.backgroundImage = `url('${require.withBase(uri)}')`;
reactionIcon.title = action.label;
}
if (action.count) {
diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts b/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts
index 31b80683ee..6e0099271e 100644
--- a/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts
+++ b/src/vs/workbench/contrib/extensions/browser/extensionsViewer.ts
@@ -108,8 +108,8 @@ export class ExtensionRenderer implements IListRenderer<ITreeNode<IExtensionData
public renderElement(node: ITreeNode<IExtensionData>, index: number, data: IExtensionTemplateData): void {
const extension = node.element.extension;
const onError = Event.once(domEvent(data.icon, 'error'));
- onError(() => data.icon.src = extension.iconUrlFallback, null, data.extensionDisposables);
- data.icon.src = extension.iconUrl;
+ onError(() => data.icon.src = require.withBase(extension.iconUrlFallback), null, data.extensionDisposables);
+ data.icon.src = require.withBase(extension.iconUrl);
if (!data.icon.complete) {
data.icon.style.visibility = 'hidden';
@@ -261,4 +261,4 @@ export class ExtensionData implements IExtensionData {
}
return null;
}
-}
\ No newline at end of file
+}
2019-07-10 21:29:15 +00:00
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts
2019-07-22 21:00:59 +00:00
index 86949eb39a..b7d04352ce 100644
2019-07-10 21:29:15 +00:00
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionEditor.ts
@@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
+import * as process from 'vs/base/common/process';
import 'vs/css!./media/extensionEditor';
import { localize } from 'vs/nls';
import * as marked from 'vs/base/common/marked/marked';
@@ -28,8 +29,8 @@ import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, IExtension
import { RatingsWidget, InstallCountWidget, RemoteBadgeWidget } from 'vs/workbench/contrib/extensions/electron-browser/extensionsWidgets';
import { EditorOptions } from 'vs/workbench/common/editor';
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
-import { CombinedInstallAction, UpdateAction, ExtensionEditorDropDownAction, ReloadAction, MaliciousStatusLabelAction, IgnoreExtensionRecommendationAction, UndoIgnoreExtensionRecommendationAction, EnableDropDownAction, DisableDropDownAction, StatusLabelAction, SetFileIconThemeAction, SetColorThemeAction, RemoteInstallAction, DisabledLabelAction, SystemDisabledWarningAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
-import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
+import { CombinedInstallAction, UpdateAction, ExtensionEditorDropDownAction, ReloadAction, MaliciousStatusLabelAction, IgnoreExtensionRecommendationAction, UndoIgnoreExtensionRecommendationAction, EnableDropDownAction, DisableDropDownAction, StatusLabelAction, SetFileIconThemeAction, SetColorThemeAction, /*RemoteInstallAction, */DisabledLabelAction, SystemDisabledWarningAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
+import { IFrameWebview as WebviewElement } from 'vs/workbench/contrib/webview/browser/webviewElement';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
import { IOpenerService } from 'vs/platform/opener/common/opener';
@@ -44,7 +45,7 @@ import { assign } from 'vs/base/common/objects';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { CancellationToken } from 'vs/base/common/cancellation';
import { ExtensionsTree, ExtensionData } from 'vs/workbench/contrib/extensions/browser/extensionsViewer';
-import { ShowCurrentReleaseNotesAction } from 'vs/workbench/contrib/update/electron-browser/update';
+// import { ShowCurrentReleaseNotesAction } from 'vs/workbench/contrib/update/electron-browser/update';
import { KeybindingParser } from 'vs/base/common/keybindingParser';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
@@ -54,12 +55,12 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work
import { URI } from 'vs/base/common/uri';
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
function renderBody(body: string): string {
- const styleSheetPath = require.toUrl('./media/markdown.css').replace('file://', 'vscode-resource://');
+ const styleSheetPath = require.toUrl('./media/markdown.css');
return `<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-resource:; child-src 'none'; frame-src 'none';">
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src ${styleSheetPath}; child-src 'none'; frame-src 'none';">
<link rel="stylesheet" type="text/css" href="${styleSheetPath}">
</head>
<body>
2019-07-22 21:00:59 +00:00
@@ -291,8 +292,8 @@ export class ExtensionEditor extends BaseEditor {
const remoteBadge = this.instantiationService.createInstance(RemoteBadgeWidget, this.iconContainer, true);
const onError = Event.once(domEvent(this.icon, 'error'));
- onError(() => this.icon.src = extension.iconUrlFallback, null, this.transientDisposables);
- this.icon.src = extension.iconUrl;
+ onError(() => this.icon.src = require.withBase(extension.iconUrlFallback), null, this.transientDisposables);
+ this.icon.src = require.withBase(extension.iconUrl);
this.name.textContent = extension.displayName;
this.identifier.textContent = extension.identifier.id;
2019-07-10 21:29:15 +00:00
@@ -370,7 +371,7 @@ export class ExtensionEditor extends BaseEditor {
this.instantiationService.createInstance(SetFileIconThemeAction, fileIconThemes),
this.instantiationService.createInstance(EnableDropDownAction),
this.instantiationService.createInstance(DisableDropDownAction, runningExtensions),
- this.instantiationService.createInstance(RemoteInstallAction),
+ // this.instantiationService.createInstance(RemoteInstallAction),
this.instantiationService.createInstance(LocalInstallAction),
combinedInstallAction,
systemDisabledWarningAction,
@@ -556,7 +557,7 @@ export class ExtensionEditor extends BaseEditor {
return;
}
// Whitelist supported schemes for links
- if (['http', 'https', 'mailto'].indexOf(link.scheme) >= 0 || (link.scheme === 'command' && link.path === ShowCurrentReleaseNotesAction.ID)) {
+ if (['http', 'https', 'mailto'].indexOf(link.scheme) >= 0 /*|| (link.scheme === 'command' && link.path === ShowCurrentReleaseNotesAction.ID)*/) {
this.openerService.open(link);
}
}, null, this.contentDisposables));
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
index aa632ac96e..b6d016f928 100644
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensions.contribution.ts
@@ -9,10 +9,10 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
import { Registry } from 'vs/platform/registry/common/platform';
import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
-import { IExtensionTipsService, ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
+import { /*IExtensionTipsService, */ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions';
-import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
+// import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
@@ -38,14 +38,14 @@ import { areSameExtensions } from 'vs/platform/extensionManagement/common/extens
import { GalleryExtensionsHandler, ExtensionsHandler } from 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen';
import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
-import { RuntimeExtensionsEditor, ShowRuntimeExtensionsAction, IExtensionHostProfileService, DebugExtensionHostAction, StartExtensionHostProfileAction, StopExtensionHostProfileAction, CONTEXT_PROFILE_SESSION_STATE, SaveExtensionHostProfileAction, CONTEXT_EXTENSION_HOST_PROFILE_RECORDED } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor';
-import { EditorInput, IEditorInputFactory, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions, ActiveEditorContext } from 'vs/workbench/common/editor';
-import { ExtensionHostProfileService } from 'vs/workbench/contrib/extensions/electron-browser/extensionProfileService';
+// import { RuntimeExtensionsEditor, ShowRuntimeExtensionsAction, IExtensionHostProfileService, DebugExtensionHostAction, StartExtensionHostProfileAction, StopExtensionHostProfileAction, CONTEXT_PROFILE_SESSION_STATE, SaveExtensionHostProfileAction, CONTEXT_EXTENSION_HOST_PROFILE_RECORDED } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor';
+import { EditorInput, IEditorInputFactory, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions/*, ActiveEditorContext*/ } from 'vs/workbench/common/editor';
+// import { ExtensionHostProfileService } from 'vs/workbench/contrib/extensions/electron-browser/extensionProfileService';
import { RuntimeExtensionsInput } from 'vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput';
import { URI, UriComponents } from 'vs/base/common/uri';
-import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
+// import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { ExtensionActivationProgress } from 'vs/workbench/contrib/extensions/browser/extensionsActivationProgress';
-import { ExtensionsAutoProfiler } from 'vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler';
+// import { ExtensionsAutoProfiler } from 'vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler';
import { onUnexpectedError } from 'vs/base/common/errors';
import { ExtensionDependencyChecker } from 'vs/workbench/contrib/extensions/electron-browser/extensionsDependencyChecker';
import { CancellationToken } from 'vs/base/common/cancellation';
@@ -53,8 +53,8 @@ import { ExtensionType } from 'vs/platform/extensions/common/extensions';
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// Singletons
registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService);
-registerSingleton(IExtensionTipsService, ExtensionTipsService);
-registerSingleton(IExtensionHostProfileService, ExtensionHostProfileService, true);
+// registerSingleton(IExtensionTipsService, ExtensionTipsService);
+// registerSingleton(IExtensionHostProfileService, ExtensionHostProfileService, true);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored);
@@ -63,7 +63,7 @@ workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCo
workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored);
workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting);
workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually);
-workbenchRegistry.registerWorkbenchContribution(ExtensionsAutoProfiler, LifecyclePhase.Eventually);
+// workbenchRegistry.registerWorkbenchContribution(ExtensionsAutoProfiler, LifecyclePhase.Eventually);
workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
Registry.as<IOutputChannelRegistry>(OutputExtensions.OutputChannels)
@@ -104,14 +104,14 @@ Registry.as<IEditorRegistry>(EditorExtensions.Editors)
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// Running Extensions Editor
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-const runtimeExtensionsEditorDescriptor = new EditorDescriptor(
- RuntimeExtensionsEditor,
- RuntimeExtensionsEditor.ID,
- localize('runtimeExtension', "Running Extensions")
-);
+// const runtimeExtensionsEditorDescriptor = new EditorDescriptor(
+// RuntimeExtensionsEditor,
+// RuntimeExtensionsEditor.ID,
+// localize('runtimeExtension', "Running Extensions")
+// );
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-Registry.as<IEditorRegistry>(EditorExtensions.Editors)
- .registerEditor(runtimeExtensionsEditorDescriptor, [new SyncDescriptor(RuntimeExtensionsInput)]);
+// Registry.as<IEditorRegistry>(EditorExtensions.Editors)
+// .registerEditor(runtimeExtensionsEditorDescriptor, [new SyncDescriptor(RuntimeExtensionsInput)]);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
class RuntimeExtensionsInputFactory implements IEditorInputFactory {
serialize(editorInput: EditorInput): string {
@@ -203,7 +203,7 @@ actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL), `Extensions: Enable Auto Updating Extensions`, ExtensionsLabel);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL), `Extensions: Disable Auto Updating Extensions`, ExtensionsLabel);
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(InstallSpecificVersionOfExtensionAction, InstallSpecificVersionOfExtensionAction.ID, InstallSpecificVersionOfExtensionAction.LABEL), 'Install Specific Version of Extension...', ExtensionsLabel);
-actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowRuntimeExtensionsAction, ShowRuntimeExtensionsAction.ID, ShowRuntimeExtensionsAction.LABEL), 'Show Running Extensions', localize('developer', "Developer"));
+// actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowRuntimeExtensionsAction, ShowRuntimeExtensionsAction.ID, ShowRuntimeExtensionsAction.LABEL), 'Show Running Extensions', localize('developer', "Developer"));
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReinstallAction, ReinstallAction.ID, ReinstallAction.LABEL), 'Reinstall Extension...', localize('developer', "Developer"));
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
@@ -270,25 +270,25 @@ CommandsRegistry.registerCommand('extension.open', (accessor: ServicesAccessor,
});
});
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-CommandsRegistry.registerCommand(DebugExtensionHostAction.ID, (accessor: ServicesAccessor) => {
- const instantiationService = accessor.get(IInstantiationService);
- instantiationService.createInstance(DebugExtensionHostAction).run();
-});
+// CommandsRegistry.registerCommand(DebugExtensionHostAction.ID, (accessor: ServicesAccessor) => {
+// const instantiationService = accessor.get(IInstantiationService);
+// instantiationService.createInstance(DebugExtensionHostAction).run();
+// });
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-CommandsRegistry.registerCommand(StartExtensionHostProfileAction.ID, (accessor: ServicesAccessor) => {
- const instantiationService = accessor.get(IInstantiationService);
- instantiationService.createInstance(StartExtensionHostProfileAction, StartExtensionHostProfileAction.ID, StartExtensionHostProfileAction.LABEL).run();
-});
+// CommandsRegistry.registerCommand(StartExtensionHostProfileAction.ID, (accessor: ServicesAccessor) => {
+// const instantiationService = accessor.get(IInstantiationService);
+// instantiationService.createInstance(StartExtensionHostProfileAction, StartExtensionHostProfileAction.ID, StartExtensionHostProfileAction.LABEL).run();
+// });
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-CommandsRegistry.registerCommand(StopExtensionHostProfileAction.ID, (accessor: ServicesAccessor) => {
- const instantiationService = accessor.get(IInstantiationService);
- instantiationService.createInstance(StopExtensionHostProfileAction, StopExtensionHostProfileAction.ID, StopExtensionHostProfileAction.LABEL).run();
-});
+// CommandsRegistry.registerCommand(StopExtensionHostProfileAction.ID, (accessor: ServicesAccessor) => {
+// const instantiationService = accessor.get(IInstantiationService);
+// instantiationService.createInstance(StopExtensionHostProfileAction, StopExtensionHostProfileAction.ID, StopExtensionHostProfileAction.LABEL).run();
+// });
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-CommandsRegistry.registerCommand(SaveExtensionHostProfileAction.ID, (accessor: ServicesAccessor) => {
- const instantiationService = accessor.get(IInstantiationService);
- instantiationService.createInstance(SaveExtensionHostProfileAction, SaveExtensionHostProfileAction.ID, SaveExtensionHostProfileAction.LABEL).run();
-});
+// CommandsRegistry.registerCommand(SaveExtensionHostProfileAction.ID, (accessor: ServicesAccessor) => {
+// const instantiationService = accessor.get(IInstantiationService);
+// instantiationService.createInstance(SaveExtensionHostProfileAction, SaveExtensionHostProfileAction.ID, SaveExtensionHostProfileAction.LABEL).run();
+// });
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// File menu registration
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
@@ -332,58 +332,58 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// Running extensions
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
- command: {
- id: DebugExtensionHostAction.ID,
- title: DebugExtensionHostAction.LABEL,
- iconLocation: {
- dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/start-inverse.svg`)),
- light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/start.svg`)),
- }
2019-07-10 21:29:15 +00:00
- },
- group: 'navigation',
- when: ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID)
-});
-
-MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
- command: {
- id: StartExtensionHostProfileAction.ID,
- title: StartExtensionHostProfileAction.LABEL,
- iconLocation: {
- dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/profile-start-inverse.svg`)),
- light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/profile-start.svg`)),
- }
- },
- group: 'navigation',
- when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID), CONTEXT_PROFILE_SESSION_STATE.notEqualsTo('running'))
-});
-
-MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
- command: {
- id: StopExtensionHostProfileAction.ID,
- title: StopExtensionHostProfileAction.LABEL,
- iconLocation: {
- dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/profile-stop-inverse.svg`)),
- light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/profile-stop.svg`)),
- }
2019-07-10 21:29:15 +00:00
- },
- group: 'navigation',
- when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID), CONTEXT_PROFILE_SESSION_STATE.isEqualTo('running'))
-});
-
-MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
- command: {
- id: SaveExtensionHostProfileAction.ID,
- title: SaveExtensionHostProfileAction.LABEL,
- iconLocation: {
- dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/save-inverse.svg`)),
- light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/electron-browser/media/save.svg`)),
- },
- precondition: CONTEXT_EXTENSION_HOST_PROFILE_RECORDED
- },
- group: 'navigation',
- when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID))
-});
+// MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
+// command: {
+// id: DebugExtensionHostAction.ID,
+// title: DebugExtensionHostAction.LABEL,
+// iconLocation: {
+// dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/start-inverse.svg`)),
+// light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/start.svg`)),
+// }
+// },
+// group: 'navigation',
+// when: ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID)
+// });
+
+// MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
+// command: {
+// id: StartExtensionHostProfileAction.ID,
+// title: StartExtensionHostProfileAction.LABEL,
+// iconLocation: {
+// dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/profile-start-inverse.svg`)),
+// light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/profile-start.svg`)),
+// }
+// },
+// group: 'navigation',
+// when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID), CONTEXT_PROFILE_SESSION_STATE.notEqualsTo('running'))
+// });
+
+// MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
+// command: {
+// id: StopExtensionHostProfileAction.ID,
+// title: StopExtensionHostProfileAction.LABEL,
+// iconLocation: {
+// dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/profile-stop-inverse.svg`)),
+// light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/profile-stop.svg`)),
+// }
+// },
+// group: 'navigation',
+// when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID), CONTEXT_PROFILE_SESSION_STATE.isEqualTo('running'))
+// });
+
+// MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
+// command: {
+// id: SaveExtensionHostProfileAction.ID,
+// title: SaveExtensionHostProfileAction.LABEL,
+// iconLocation: {
+// dark: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/save-inverse.svg`)),
+// light: URI.parse(require.toUrl(`vs/workbench/contrib/extensions/browser/media/save.svg`)),
+// },
+// precondition: CONTEXT_EXTENSION_HOST_PROFILE_RECORDED
+// },
+// group: 'navigation',
+// when: ContextKeyExpr.and(ActiveEditorContext.isEqualTo(RuntimeExtensionsEditor.ID))
+// });
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
CommandsRegistry.registerCommand({
id: 'workbench.extensions.installExtension',
@@ -457,4 +457,4 @@ MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
title: localize('showExtensions', "Extensions")
},
order: 3
-});
\ No newline at end of file
+});
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts
2019-07-22 21:00:59 +00:00
index 3f6427704d..8d2d78f537 100644
2019-07-10 21:29:15 +00:00
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsList.ts
@@ -13,7 +13,7 @@ import { IPagedRenderer } from 'vs/base/browser/ui/list/listPaging';
import { Event } from 'vs/base/common/event';
import { domEvent } from 'vs/base/browser/event';
import { IExtension, ExtensionContainers, ExtensionState, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
-import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, MaliciousStatusLabelAction, ExtensionActionViewItem, StatusLabelAction, RemoteInstallAction, SystemDisabledWarningAction, DisabledLabelAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
+import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, MaliciousStatusLabelAction, ExtensionActionViewItem, StatusLabelAction, /*RemoteInstallAction, */SystemDisabledWarningAction, DisabledLabelAction, LocalInstallAction } from 'vs/workbench/contrib/extensions/electron-browser/extensionsActions';
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
import { Label, RatingsWidget, InstallCountWidget, RecommendationWidget, RemoteBadgeWidget, TooltipWidget } from 'vs/workbench/contrib/extensions/electron-browser/extensionsWidgets';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
@@ -96,7 +96,7 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
this.instantiationService.createInstance(UpdateAction),
reloadAction,
this.instantiationService.createInstance(InstallAction),
- this.instantiationService.createInstance(RemoteInstallAction),
+ // this.instantiationService.createInstance(RemoteInstallAction),
this.instantiationService.createInstance(LocalInstallAction),
this.instantiationService.createInstance(MaliciousStatusLabelAction, false),
systemDisabledWarningAction,
2019-07-22 21:00:59 +00:00
@@ -165,8 +165,8 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
this.extensionService.onDidChangeExtensions(() => updateEnablement(), this, data.extensionDisposables);
const onError = Event.once(domEvent(data.icon, 'error'));
- onError(() => data.icon.src = extension.iconUrlFallback, null, data.extensionDisposables);
- data.icon.src = extension.iconUrl;
+ onError(() => data.icon.src = require.withBase(extension.iconUrlFallback), null, data.extensionDisposables);
+ data.icon.src = require.withBase(extension.iconUrl);
if (!data.icon.complete) {
data.icon.style.visibility = 'hidden';
2019-07-10 21:29:15 +00:00
diff --git a/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts b/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts
index 6dad2fb580..4ed25dd206 100644
--- a/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts
+++ b/src/vs/workbench/contrib/extensions/electron-browser/extensionsViews.ts
@@ -34,7 +34,7 @@ import { INotificationService, Severity } from 'vs/platform/notification/common/
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { distinct, coalesce } from 'vs/base/common/arrays';
-import { IExperimentService, IExperiment, ExperimentActionType } from 'vs/workbench/contrib/experiments/electron-browser/experimentService';
+// import { IExperimentService, IExperiment, ExperimentActionType } from 'vs/workbench/contrib/experiments/electron-browser/experimentService';
import { alert } from 'vs/base/browser/ui/aria/aria';
import { IListContextMenuEvent } from 'vs/base/browser/ui/list/list';
import { createErrorWithActions } from 'vs/base/common/errorsWithActions';
@@ -96,7 +96,7 @@ export class ExtensionsListView extends ViewletPanel {
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IConfigurationService configurationService: IConfigurationService,
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
- @IExperimentService private readonly experimentService: IExperimentService,
+ // @IExperimentService private readonly experimentService: IExperimentService,
@IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService,
@IExtensionManagementServerService protected readonly extensionManagementServerService: IExtensionManagementServerService,
@IProductService protected readonly productService: IProductService,
@@ -448,14 +448,14 @@ export class ExtensionsListView extends ViewletPanel {
if (text) {
options = assign(options, { text: text.substr(0, 350), source: 'searchText' });
if (!hasUserDefinedSortOrder) {
- const searchExperiments = await this.getSearchExperiments();
- for (const experiment of searchExperiments) {
- if (experiment.action && text.toLowerCase() === experiment.action.properties['searchText'] && Array.isArray(experiment.action.properties['preferredResults'])) {
- preferredResults = experiment.action.properties['preferredResults'];
- options.source += `-experiment-${experiment.id}`;
- break;
- }
- }
+ // const searchExperiments = await this.getSearchExperiments();
+ // for (const experiment of searchExperiments) {
+ // if (experiment.action && text.toLowerCase() === experiment.action.properties['searchText'] && Array.isArray(experiment.action.properties['preferredResults'])) {
+ // preferredResults = experiment.action.properties['preferredResults'];
+ // options.source += `-experiment-${experiment.id}`;
+ // break;
+ // }
+ // }
}
} else {
options.source = 'viewlet';
@@ -480,13 +480,13 @@ export class ExtensionsListView extends ViewletPanel {
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
- private _searchExperiments: Promise<IExperiment[]>;
- private getSearchExperiments(): Promise<IExperiment[]> {
- if (!this._searchExperiments) {
- this._searchExperiments = this.experimentService.getExperimentsByType(ExperimentActionType.ExtensionSearchResults);
- }
- return this._searchExperiments;
- }
+ // private _searchExperiments: Promise<IExperiment[]>;
+ // private getSearchExperiments(): Promise<IExperiment[]> {
+ // if (!this._searchExperiments) {
+ // this._searchExperiments = this.experimentService.getExperimentsByType(ExperimentActionType.ExtensionSearchResults);
+ // }
+ // return this._searchExperiments;
+ // }
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
private sortExtensions(extensions: IExtension[], options: IQueryOptions): IExtension[] {
switch (options.sortBy) {
@@ -551,14 +551,14 @@ export class ExtensionsListView extends ViewletPanel {
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
private async getCuratedModel(query: Query, options: IQueryOptions, token: CancellationToken): Promise<IPagedModel<IExtension>> {
- const value = query.value.replace(/curated:/g, '').trim();
- const names = await this.experimentService.getCuratedExtensionsList(value);
- if (Array.isArray(names) && names.length) {
- options.source = `curated:${value}`;
- const pager = await this.extensionsWorkbenchService.queryGallery(assign(options, { names, pageSize: names.length }), token);
- this.sortFirstPage(pager, names);
- return this.getPagedModel(pager || []);
- }
+ // const value = query.value.replace(/curated:/g, '').trim();
+ // const names = await this.experimentService.getCuratedExtensionsList(value);
+ // if (Array.isArray(names) && names.length) {
+ // options.source = `curated:${value}`;
+ // const pager = await this.extensionsWorkbenchService.queryGallery(assign(options, { names, pageSize: names.length }), token);
+ // this.sortFirstPage(pager, names);
+ // return this.getPagedModel(pager || []);
+ // }
2019-07-10 21:29:15 +00:00
return new PagedModel([]);
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
@@ -843,14 +843,14 @@ export class ServerExtensionsView extends ExtensionsListView {
@ITelemetryService telemetryService: ITelemetryService,
@IConfigurationService configurationService: IConfigurationService,
@IWorkspaceContextService contextService: IWorkspaceContextService,
- @IExperimentService experimentService: IExperimentService,
+ // @IExperimentService experimentService: IExperimentService,
@IWorkbenchThemeService workbenchThemeService: IWorkbenchThemeService,
@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService,
@IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService,
@IProductService productService: IProductService,
) {
options.server = server;
- super(options, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, editorService, tipsService, telemetryService, configurationService, contextService, experimentService, workbenchThemeService, extensionManagementServerService, productService);
+ super(options, notificationService, keybindingService, contextMenuService, instantiationService, themeService, extensionService, extensionsWorkbenchService, editorService, tipsService, telemetryService, configurationService, contextService, /*experimentService,*/ workbenchThemeService, extensionManagementServerService, productService);
this._register(onDidChangeTitle(title => this.updateTitle(title)));
}
2019-07-13 00:09:07 +00:00
diff --git a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
2019-07-10 21:29:15 +00:00
index c08a6e37c1..31640d7e66 100644
--- a/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
+++ b/src/vs/workbench/contrib/extensions/node/extensionsWorkbenchService.ts
2019-07-10 21:29:15 +00:00
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
import * as nls from 'vs/nls';
-import * as semver from 'semver';
+// import * as semver from 'semver';
import { Event, Emitter } from 'vs/base/common/event';
import { index, distinct } from 'vs/base/common/arrays';
import { ThrottledDelayer } from 'vs/base/common/async';
@@ -26,7 +26,8 @@ import { IExtension, ExtensionState, IExtensionsWorkbenchService, AutoUpdateConf
import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
import { IURLService, IURLHandler } from 'vs/platform/url/common/url';
import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
-import product from 'vs/platform/product/node/product';
+// import product from 'vs/platform/product/node/product';
+import { IProductService } from 'vs/platform/product/common/product';
import { ILogService } from 'vs/platform/log/common/log';
import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress';
import { INotificationService } from 'vs/platform/notification/common/notification';
@@ -53,7 +54,8 @@ class Extension implements IExtension {
public gallery: IGalleryExtension | undefined,
private telemetryService: ITelemetryService,
private logService: ILogService,
- private fileService: IFileService
+ private fileService: IFileService,
+ private productService: IProductService
) { }
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
get type(): ExtensionType | undefined {
@@ -112,11 +114,11 @@ class Extension implements IExtension {
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
get url(): string | undefined {
- if (!product.extensionsGallery || !this.gallery) {
+ if (!this.productService.extensionsGallery || !this.gallery) {
return undefined;
}
2019-07-13 00:09:07 +00:00
- return `${product.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`;
2019-07-10 21:29:15 +00:00
+ return `${this.productService.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`;
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
get iconUrl(): string {
@@ -183,7 +185,7 @@ class Extension implements IExtension {
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
get outdated(): boolean {
- return !!this.gallery && this.type === ExtensionType.User && semver.gt(this.latestVersion, this.version);
+ return !!this.gallery && this.type === ExtensionType.User && this.latestVersion !== this.version;
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
get telemetryData(): any {
@@ -201,7 +203,7 @@ class Extension implements IExtension {
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
private isGalleryOutdated(): boolean {
- return this.local && this.gallery ? semver.gt(this.local.manifest.version, this.gallery.version) : false;
+ return this.local && this.gallery ? this.local.manifest.version !== this.gallery.version : false;
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
getManifest(token: CancellationToken): Promise<IExtensionManifest | null> {
@@ -320,7 +322,8 @@ class Extensions extends Disposable {
@ITelemetryService private readonly telemetryService: ITelemetryService,
@ILogService private readonly logService: ILogService,
@IFileService private readonly fileService: IFileService,
- @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService
+ @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService,
+ @IProductService private readonly productService: IProductService
) {
super();
this._register(server.extensionManagementService.onInstallExtension(e => this.onInstallExtension(e)));
@@ -342,7 +345,7 @@ class Extensions extends Disposable {
const installed = await this.server.extensionManagementService.getInstalled();
const byId = index(this.installed, e => e.local ? e.local.identifier.id : e.identifier.id);
this.installed = installed.map(local => {
- const extension = byId[local.identifier.id] || new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService);
+ const extension = byId[local.identifier.id] || new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService, this.productService);
extension.local = local;
extension.enablementState = this.extensionEnablementService.getEnablementState(local);
return extension;
@@ -395,7 +398,7 @@ class Extensions extends Disposable {
const { gallery } = event;
if (gallery) {
const extension = this.installed.filter(e => areSameExtensions(e.identifier, gallery.identifier))[0]
- || new Extension(this.galleryService, this.stateProvider, this.server, undefined, gallery, this.telemetryService, this.logService, this.fileService);
+ || new Extension(this.galleryService, this.stateProvider, this.server, undefined, gallery, this.telemetryService, this.logService, this.fileService, this.productService);
this.installing.push(extension);
this._onChange.fire(extension);
}
@@ -406,7 +409,7 @@ class Extensions extends Disposable {
const installingExtension = gallery ? this.installing.filter(e => areSameExtensions(e.identifier, gallery.identifier))[0] : null;
this.installing = installingExtension ? this.installing.filter(e => e !== installingExtension) : this.installing;
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
- let extension: Extension | undefined = installingExtension ? installingExtension : zipPath ? new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService) : undefined;
+ let extension: Extension | undefined = installingExtension ? installingExtension : zipPath ? new Extension(this.galleryService, this.stateProvider, this.server, local, undefined, this.telemetryService, this.logService, this.fileService, this.productService) : undefined;
if (extension) {
if (local) {
const installed = this.installed.filter(e => areSameExtensions(e.identifier, extension!.identifier))[0];
@@ -501,7 +504,8 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
@IStorageService private readonly storageService: IStorageService,
@IFileService private readonly fileService: IFileService,
- @IModeService private readonly modeService: IModeService
+ @IModeService private readonly modeService: IModeService,
+ @IProductService private readonly productService: IProductService
) {
super();
this.localExtensions = this._register(instantiationService.createInstance(Extensions, extensionManagementServerService.localExtensionManagementServer, ext => this.getExtensionState(ext)));
@@ -606,7 +610,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
text = text.replace(extensionRegex, (m, ext) => {
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// Get curated keywords
- const lookup = product.extensionKeywords || {};
+ const lookup: {[extension: string]: string[]} = /*this.productService.extensionKeywords || */{};
const keywords = lookup[ext] || [];
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// Get mode name
@@ -649,7 +653,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
if (installed) {
return installed;
}
- const extension = new Extension(this.galleryService, ext => this.getExtensionState(ext), undefined, undefined, gallery, this.telemetryService, this.logService, this.fileService);
+ const extension = new Extension(this.galleryService, ext => this.getExtensionState(ext), undefined, undefined, gallery, this.telemetryService, this.logService, this.fileService, this.productService);
if (maliciousExtensionSet.has(extension.identifier.id)) {
extension.isMalicious = true;
}
@@ -999,7 +1003,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
get allowedBadgeProviders(): string[] {
if (!this._extensionAllowedBadgeProviders) {
- this._extensionAllowedBadgeProviders = (product.extensionAllowedBadgeProviders || []).map(s => s.toLowerCase());
+ this._extensionAllowedBadgeProviders = []; // (product.extensionAllowedBadgeProviders || []).map(s => s.toLowerCase());
}
return this._extensionAllowedBadgeProviders;
}
2019-07-19 20:10:43 +00:00
diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts
index 88ad0027e9..17476d5f26 100644
--- a/src/vs/workbench/contrib/files/browser/files.contribution.ts
+++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts
@@ -200,7 +200,7 @@ configurationRegistry.registerConfiguration({
'files.exclude': {
'type': 'object',
'markdownDescription': nls.localize('exclude', "Configure glob patterns for excluding files and folders. For example, the files explorer decides which files and folders to show or hide based on this setting. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)."),
- 'default': { '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true },
+ 'default': { '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true, '**/.code-server-partial-upload-*': true },
'scope': ConfigurationScope.RESOURCE,
'additionalProperties': {
'anyOf': [
diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
index 4592b3918e..346292d086 100644
--- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
+++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts
@@ -46,6 +46,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces';
import { findValidPasteFileTarget } from 'vs/workbench/contrib/files/browser/fileActions';
import { FuzzyScore, createMatches } from 'vs/base/common/filters';
+import { IUploadService } from 'vs/server/src/upload';
export class ExplorerDelegate implements IListVirtualDelegate<ExplorerItem> {
@@ -453,7 +454,8 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
@IInstantiationService private instantiationService: IInstantiationService,
@ITextFileService private textFileService: ITextFileService,
@IWindowService private windowService: IWindowService,
- @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService
+ @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService,
+ @IUploadService private readonly uploadService: IUploadService,
) {
this.toDispose = [];
@@ -615,6 +617,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
private async handleExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
+ return this.uploadService.handleExternalDrop(data, target, originalEvent);
const droppedResources = extractResources(originalEvent, true);
// Check for dropped external files to be folders
const result = await this.fileService.resolveAll(droppedResources);
2019-07-16 19:57:02 +00:00
diff --git a/src/vs/workbench/contrib/remote/common/remote.contribution.ts b/src/vs/workbench/contrib/remote/common/remote.contribution.ts
index 9235c739fb..32d203eb32 100644
--- a/src/vs/workbench/contrib/remote/common/remote.contribution.ts
+++ b/src/vs/workbench/contrib/remote/common/remote.contribution.ts
@@ -55,7 +55,8 @@ class RemoteChannelsContribution extends Disposable implements IWorkbenchContrib
const connection = remoteAgentService.getConnection();
if (connection) {
const logLevelClient = new LogLevelSetterChannelClient(connection.getChannel('loglevel'));
- logLevelClient.setLevel(logService.getLevel());
+ logLevelClient.getLevel().then((level) => logService.setLevel(level));
+ logLevelClient.onDidChangeLogLevel((level) => logService.setLevel(level));
this._register(logService.onDidChangeLogLevel(level => logLevelClient.setLevel(level)));
}
}
2019-07-22 21:00:59 +00:00
diff --git a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts
index 4d8a5d6907..b464d5276f 100644
--- a/src/vs/workbench/contrib/scm/browser/scmViewlet.ts
+++ b/src/vs/workbench/contrib/scm/browser/scmViewlet.ts
@@ -497,7 +497,7 @@ class ResourceRenderer implements IListRenderer<ISCMResource, ResourceTemplate>
if (icon) {
template.decorationIcon.style.display = '';
- template.decorationIcon.style.backgroundImage = `url('${icon}')`;
+ template.decorationIcon.style.backgroundImage = `url('${require.withBase(icon)}')`;
template.decorationIcon.title = resource.decorations.tooltip || '';
} else {
template.decorationIcon.style.display = 'none';
diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
index 6d4d096a9c..bbb7930e7a 100644
--- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
+++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts
@@ -39,10 +39,10 @@ export class WebviewEditorInput extends EditorInput {
this._icons.forEach((value, key) => {
const webviewSelector = `.show-file-icons .webview-${key}-name-file-icon::before`;
if (URI.isUri(value)) {
- cssRules.push(`${webviewSelector} { content: ""; background-image: url(${value.toString()}); }`);
+ cssRules.push(`${webviewSelector} { content: ""; background-image: url(${require.withBase(value).toString()}); }`);
} else {
- cssRules.push(`.vs ${webviewSelector} { content: ""; background-image: url(${value.light.toString()}); }`);
- cssRules.push(`.vs-dark ${webviewSelector} { content: ""; background-image: url(${value.dark.toString()}); }`);
+ cssRules.push(`.vs ${webviewSelector} { content: ""; background-image: url(${require.withBase(value.light).toString()}); }`);
+ cssRules.push(`.vs-dark ${webviewSelector} { content: ""; background-image: url(${require.withBase(value.dark).toString()}); }`);
}
});
this._styleElement.innerHTML = cssRules.join('\n');
diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts
index 3525569601..a91a5fce7d 100644
--- a/src/vs/workbench/services/environment/browser/environmentService.ts
+++ b/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -136,6 +136,8 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService {
driverHandle?: string;
driverVerbose: boolean;
webviewEndpoint?: string;
+ extraExtensionPaths: string[];
+ extraBuiltinExtensionPaths: string[];
get webviewResourceRoot(): string {
return this.webviewEndpoint ? this.webviewEndpoint + '/vscode-resource' : 'vscode-resource:';
2019-07-10 21:29:15 +00:00
diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts
index 611ab9aec9..4e4bea89be 100644
--- a/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts
+++ b/src/vs/workbench/services/extensions/electron-browser/extensionManagementServerService.ts
@@ -6,15 +6,15 @@
import { localize } from 'vs/nls';
import { Schemas } from 'vs/base/common/network';
import { URI } from 'vs/base/common/uri';
-import { IExtensionManagementServer, IExtensionManagementServerService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
-import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc';
+import { IExtensionManagementServer, IExtensionManagementServerService, IExtensionGalleryService, IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement';
+// import { ExtensionManagementChannelClient } from 'vs/platform/extensionManagement/node/extensionManagementIpc';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
-import { IChannel } from 'vs/base/parts/ipc/common/ipc';
-import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
+// import { IChannel } from 'vs/base/parts/ipc/common/ipc';
+// import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { ILogService } from 'vs/platform/log/common/log';
-import { RemoteExtensionManagementChannelClient } from 'vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc';
+// import { RemoteExtensionManagementChannelClient } from 'vs/workbench/services/extensions/electron-browser/remoteExtensionManagementIpc';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IProductService } from 'vs/platform/product/common/product';
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
@@ -28,24 +28,28 @@ export class ExtensionManagementServerService implements IExtensionManagementSer
readonly remoteExtensionManagementServer: IExtensionManagementServer | null = null;
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
constructor(
- @ISharedProcessService sharedProcessService: ISharedProcessService,
+ // Replacing the shared process and setting to any so we don't get
+ // compilation errors from the tests.
+ @IExtensionManagementService localExtensionManagementService: any,
+ // @ISharedProcessService sharedProcessService: ISharedProcessService,
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
@IExtensionGalleryService galleryService: IExtensionGalleryService,
@IConfigurationService configurationService: IConfigurationService,
@IProductService productService: IProductService,
- @ILogService logService: ILogService
+ @ILogService logService: ILogService,
) {
- const localExtensionManagementService = new ExtensionManagementChannelClient(sharedProcessService.getChannel('extensions'));
-
2019-07-10 21:29:15 +00:00
- this.localExtensionManagementServer = { extensionManagementService: localExtensionManagementService, authority: localExtensionManagementServerAuthority, label: localize('local', "Local") };
- const remoteAgentConnection = remoteAgentService.getConnection();
- if (remoteAgentConnection) {
- const extensionManagementService = new RemoteExtensionManagementChannelClient(remoteAgentConnection.getChannel<IChannel>('extensions'), this.localExtensionManagementServer.extensionManagementService, galleryService, logService, configurationService, productService);
- this.remoteExtensionManagementServer = { authority: remoteAgentConnection.remoteAuthority, extensionManagementService, label: localize('remote', "Remote") };
- }
+ // const localExtensionManagementService = new ExtensionManagementChannelClient(sharedProcessService.getChannel('extensions'));
+
+ this.localExtensionManagementServer = { extensionManagementService: localExtensionManagementService!, authority: localExtensionManagementServerAuthority, label: localize('remote', "Remote") };
+ // const remoteAgentConnection = remoteAgentService.getConnection();
+ // if (remoteAgentConnection) {
+ // const extensionManagementService = new RemoteExtensionManagementChannelClient(remoteAgentConnection.getChannel<IChannel>('extensions'), this.localExtensionManagementServer.extensionManagementService, galleryService, logService, configurationService, productService);
+ // this.remoteExtensionManagementServer = { authority: remoteAgentConnection.remoteAuthority, extensionManagementService, label: localize('remote', "Remote") };
+ // }
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
getExtensionManagementServer(location: URI): IExtensionManagementServer | null {
+ return this.localExtensionManagementServer;
if (location.scheme === Schemas.file) {
return this.localExtensionManagementServer;
}
@@ -56,4 +60,4 @@ export class ExtensionManagementServerService implements IExtensionManagementSer
}
}
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
-registerSingleton(IExtensionManagementServerService, ExtensionManagementServerService);
\ No newline at end of file
+registerSingleton(IExtensionManagementServerService, ExtensionManagementServerService);
2019-07-19 20:10:43 +00:00
diff --git a/src/vs/workbench/services/files/common/fileService.ts b/src/vs/workbench/services/files/common/fileService.ts
index a788aadc1f..09e6947fb7 100644
--- a/src/vs/workbench/services/files/common/fileService.ts
+++ b/src/vs/workbench/services/files/common/fileService.ts
@@ -859,7 +859,7 @@ export class FileService extends Disposable implements IFileService {
let posInFile = 0;
let chunk: VSBuffer | null;
- while (chunk = readable.read()) {
+ while (chunk = await readable.read()) {
await this.doWriteBuffer(provider, handle, chunk, chunk.byteLength, posInFile, 0);
posInFile += chunk.byteLength;
@@ -888,7 +888,7 @@ export class FileService extends Disposable implements IFileService {
if (bufferOrReadable instanceof VSBuffer) {
buffer = bufferOrReadable;
} else {
- buffer = readableToBuffer(bufferOrReadable);
+ buffer = await readableToBuffer(bufferOrReadable);
}
return provider.writeFile(resource, buffer.buffer, { create: true, overwrite: true });
@@ -1026,4 +1026,4 @@ export class FileService extends Disposable implements IFileService {
}
//#endregion
-}
\ No newline at end of file
+}
2019-07-22 21:00:59 +00:00
diff --git a/src/vs/workbench/services/themes/common/fileIconThemeData.ts b/src/vs/workbench/services/themes/common/fileIconThemeData.ts
index 306d58f915..58c603ad3d 100644
--- a/src/vs/workbench/services/themes/common/fileIconThemeData.ts
+++ b/src/vs/workbench/services/themes/common/fileIconThemeData.ts
@@ -331,7 +331,7 @@ function _processIconThemeDocument(id: string, iconThemeDocumentLocation: URI, i
let fonts = iconThemeDocument.fonts;
if (Array.isArray(fonts)) {
fonts.forEach(font => {
- let src = font.src.map(l => `url('${resolvePath(l.path)}') format('${l.format}')`).join(', ');
+ let src = font.src.map(l => `url('${require.withBase(resolvePath(l.path))}') format('${l.format}')`).join(', ');
cssRules.push(`@font-face { src: ${src}; font-family: '${font.id}'; font-weight: ${font.weight}; font-style: ${font.style}; }`);
});
cssRules.push(`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: '${fonts[0].id}'; font-size: ${fonts[0].size || '150%'}}`);
@@ -342,7 +342,7 @@ function _processIconThemeDocument(id: string, iconThemeDocumentLocation: URI, i
let definition = iconThemeDocument.iconDefinitions[defId];
if (definition) {
if (definition.iconPath) {
- cssRules.push(`${selectors.join(', ')} { content: ' '; background-image: url("${resolvePath(definition.iconPath)}"); }`);
+ cssRules.push(`${selectors.join(', ')} { content: ' '; background-image: url("${require.withBase(resolvePath(definition.iconPath))}"); }`);
}
if (definition.fontCharacter || definition.fontColor) {
let body = '';
2019-07-10 21:29:15 +00:00
diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts
index c28adc0ad9..4517c308da 100644
--- a/src/vs/workbench/workbench.web.main.ts
+++ b/src/vs/workbench/workbench.web.main.ts
@@ -128,7 +128,7 @@ import 'vs/workbench/services/extensions/browser/extensionService';
// import 'vs/workbench/services/contextmenu/electron-browser/contextmenuService';
// import 'vs/workbench/services/extensions/node/multiExtensionManagement';
import 'vs/workbench/services/label/common/labelService';
-// import 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService';
+import 'vs/workbench/services/extensions/electron-browser/extensionManagementServerService';
// import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
import 'vs/workbench/services/notification/common/notificationService';
// import 'vs/workbench/services/window/electron-browser/windowService';
@@ -260,9 +260,9 @@ registerSingleton(IWebviewService, WebviewService, true);
registerSingleton(IWebviewEditorService, WebviewEditorService, true);
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// Extensions Management
-// import 'vs/workbench/contrib/extensions/electron-browser/extensions.contribution';
-// import 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen';
-// import 'vs/workbench/contrib/extensions/electron-browser/extensionsViewlet';
+import 'vs/workbench/contrib/extensions/electron-browser/extensions.contribution';
+import 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen';
+import 'vs/workbench/contrib/extensions/electron-browser/extensionsViewlet';
2019-07-13 00:09:07 +00:00
2019-07-10 21:29:15 +00:00
// Output Panel
import 'vs/workbench/contrib/output/browser/output.contribution';