Skip to content

Commit 533844a

Browse files
committed
More plugin -> extension
1 parent f693ba1 commit 533844a

22 files changed

Lines changed: 46 additions & 46 deletions

src/vs/platform/actions/common/actionsService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ export default class ActionsService implements IActionsService {
107107
let rejects: string[] = [];
108108

109109
if (isValidCommand(command, rejects)) {
110-
// make sure this plugin is activated by this command
110+
// make sure this extension is activated by this command
111111
let activationEvent = `onCommand:${command.command}`;
112112

113-
// action that (1) activates the plugin and dispatches the command
113+
// action that (1) activates the extension and dispatches the command
114114
let label = command.category ? localize('category.label', "{0}: {1}", command.category, command.title) : command.title;
115115
let action = new Action(command.command, label, undefined, true, () => {
116116
return this._extensionService.activateByEvent(activationEvent).then(() => {

src/vs/platform/extensions/common/ipcRemoteCom.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ function createRPC(serializeAndSend: (obj: any) => void): IRPCFunc {
5353
};
5454
}
5555

56-
export interface IPluginsIPC extends remote.IRemoteCom {
56+
export interface IMainProcessExtHostIPC extends remote.IRemoteCom {
5757
handle(msg: string[]): void;
5858
}
5959

60-
export function create(send: (obj: string[]) => void): IPluginsIPC {
60+
export function create(send: (obj: string[]) => void): IMainProcessExtHostIPC {
6161
let rpc = createRPC(marshallAndSend);
6262
let bigHandler: remote.IManyHandler = null;
6363
let invokedHandlers: { [req: string]: winjs.TPromise<any>; } = Object.create(null);
@@ -134,7 +134,7 @@ export function create(send: (obj: string[]) => void): IPluginsIPC {
134134
});
135135
};
136136

137-
let r: IPluginsIPC = {
137+
let r: IMainProcessExtHostIPC = {
138138
callOnRemote: rpc,
139139
setManyHandler: (_bigHandler: remote.IManyHandler): void => {
140140
bigHandler = _bigHandler;

src/vs/platform/extensions/common/nativeExtensionService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export interface IExtensionContext {
241241
asAbsolutePath(relativePath: string): string;
242242
}
243243

244-
@Remotable.PluginHostContext('ExtHostExtensionService')
244+
@Remotable.ExtHostContext('ExtHostExtensionService')
245245
export class ExtHostExtensionService extends AbstractExtensionService<ExtHostExtension> {
246246

247247
private _threadService: IThreadService;

src/vs/platform/extensions/test/node/extensionValidator.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import * as assert from 'assert';
88
import {INormalizedVersion, IParsedVersion, IReducedExtensionDescription, isValidExtensionVersion, isValidVersion, isValidVersionStr, normalizeVersion, parseVersion} from 'vs/platform/extensions/node/extensionValidator';
99

10-
suite('Plugin Version Validator', () => {
10+
suite('Extension Version Validator', () => {
1111

1212
test('isValidVersionStr', () => {
1313
assert.equal(isValidVersionStr('0.10.0-dev'), true);

src/vs/platform/telemetry/common/abstractRemoteTelemetryService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class RemoteTelemetryServiceHelper {
3030
}
3131

3232
/**
33-
* Base class for remote telemetry services (instantiated in plugin host or in web workers)
33+
* Base class for remote telemetry services (instantiated in extension host or in web workers)
3434
*/
3535
export class AbstractRemoteTelemetryService extends AbstractTelemetryService.AbstractTelemetryService implements ITelemetryService {
3636

src/vs/platform/test/common/nullThreadService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ export class NullThreadService extends abstractThreadService.AbstractThreadServi
4848
this._registerLocalInstance(id, actor);
4949
}
5050

51-
protected _registerAndInstantiatePluginHostActor<T>(id: string, descriptor: SyncDescriptor0<T>): T {
51+
protected _registerAndInstantiateExtHostActor<T>(id: string, descriptor: SyncDescriptor0<T>): T {
5252
return this._getOrCreateLocalInstance(id, descriptor);
5353
}
5454

55-
protected _registerPluginHostActor<T>(id: string, actor: T): void {
55+
protected _registerExtHostActor<T>(id: string, actor: T): void {
5656
throw new Error('Not supported in this runtime context!');
5757
}
5858

src/vs/platform/thread/common/abstractThreadService.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ export abstract class AbstractThreadService implements remote.IManyHandler {
134134
return this._registerAndInstantiateMainProcessActor(id, desc);
135135
}
136136

137-
if (Remotable.Registry.PluginHostContext[id]) {
138-
return this._registerAndInstantiatePluginHostActor(id, desc);
137+
if (Remotable.Registry.ExtHostContext[id]) {
138+
return this._registerAndInstantiateExtHostActor(id, desc);
139139
}
140140

141141
if (Remotable.Registry.WorkerContext[id]) {
@@ -155,8 +155,8 @@ export abstract class AbstractThreadService implements remote.IManyHandler {
155155
return this._registerMainProcessActor(id, instance);
156156
}
157157

158-
if (Remotable.Registry.PluginHostContext[id]) {
159-
return this._registerPluginHostActor(id, instance);
158+
if (Remotable.Registry.ExtHostContext[id]) {
159+
return this._registerExtHostActor(id, instance);
160160
}
161161

162162
if (Remotable.Registry.WorkerContext[id]) {
@@ -168,8 +168,8 @@ export abstract class AbstractThreadService implements remote.IManyHandler {
168168

169169
protected abstract _registerAndInstantiateMainProcessActor<T>(id: string, descriptor: SyncDescriptor0<T>): T;
170170
protected abstract _registerMainProcessActor<T>(id: string, actor: T): void;
171-
protected abstract _registerAndInstantiatePluginHostActor<T>(id: string, descriptor: SyncDescriptor0<T>): T;
172-
protected abstract _registerPluginHostActor<T>(id: string, actor: T): void;
171+
protected abstract _registerAndInstantiateExtHostActor<T>(id: string, descriptor: SyncDescriptor0<T>): T;
172+
protected abstract _registerExtHostActor<T>(id: string, actor: T): void;
173173
protected abstract _registerAndInstantiateWorkerActor<T>(id: string, descriptor: SyncDescriptor0<T>, whichWorker: ThreadAffinity): T;
174174
protected abstract _registerWorkerActor<T>(id: string, actor: T): void;
175175
}

src/vs/platform/thread/common/pluginHostThreadService.ts renamed to src/vs/platform/thread/common/extHostThreadService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import descriptors = require('vs/platform/instantiation/common/descriptors');
1111
import abstractThreadService = require('./abstractThreadService');
1212
import {IThreadService, IThreadSynchronizableObject, ThreadAffinity, IThreadServiceStatusListener} from 'vs/platform/thread/common/thread';
1313

14-
export class PluginHostThreadService extends abstractThreadService.AbstractThreadService implements IThreadService {
14+
export class ExtHostThreadService extends abstractThreadService.AbstractThreadService implements IThreadService {
1515
public serviceId = IThreadService;
1616
protected _remoteCom: remote.IRemoteCom;
1717

@@ -45,16 +45,16 @@ export class PluginHostThreadService extends abstractThreadService.AbstractThrea
4545
throw new Error('Not supported in this runtime context!');
4646
}
4747

48-
protected _registerAndInstantiatePluginHostActor<T>(id: string, descriptor: descriptors.SyncDescriptor0<T>): T {
48+
protected _registerAndInstantiateExtHostActor<T>(id: string, descriptor: descriptors.SyncDescriptor0<T>): T {
4949
return this._getOrCreateLocalInstance(id, descriptor);
5050
}
5151

52-
protected _registerPluginHostActor<T>(id: string, actor: T): void {
52+
protected _registerExtHostActor<T>(id: string, actor: T): void {
5353
this._registerLocalInstance(id, actor);
5454
}
5555

5656
protected _registerAndInstantiateWorkerActor<T>(id: string, descriptor: descriptors.SyncDescriptor0<T>, whichWorker: ThreadAffinity): T {
57-
throw new Error('Not supported in this runtime context! Cannot communicate directly from Plugin Host to Worker!');
57+
throw new Error('Not supported in this runtime context! Cannot communicate directly from Extension Host to Worker!');
5858
}
5959

6060
protected _registerWorkerActor<T>(id: string, actor: T): void {

src/vs/platform/thread/common/mainThreadService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ export class MainThreadService extends abstractThreadService.AbstractThreadServi
263263
this._registerLocalInstance(id, actor);
264264
}
265265

266-
protected _registerAndInstantiatePluginHostActor<T>(id: string, descriptor: SyncDescriptor0<T>): T {
267-
throw new Error('Not supported in this runtime context: Cannot communicate to non-existant Plugin Host!');
266+
protected _registerAndInstantiateExtHostActor<T>(id: string, descriptor: SyncDescriptor0<T>): T {
267+
throw new Error('Not supported in this runtime context: Cannot communicate to non-existant Extension Host!');
268268
}
269269

270-
protected _registerPluginHostActor<T>(id: string, actor: T): void {
270+
protected _registerExtHostActor<T>(id: string, actor: T): void {
271271
throw new Error('Not supported in this runtime context!');
272272
}
273273

src/vs/platform/thread/common/thread.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Remotable {
5151

5252
public static Registry = {
5353
MainContext: <IRemotableCtorMap>Object.create(null),
54-
PluginHostContext: <IRemotableCtorMap>Object.create(null),
54+
ExtHostContext: <IRemotableCtorMap>Object.create(null),
5555
WorkerContext: <IRemotableCtorAffinityMap>Object.create(null),
5656
};
5757

@@ -67,10 +67,10 @@ export class Remotable {
6767
};
6868
}
6969

70-
public static PluginHostContext(identifier: string) {
70+
public static ExtHostContext(identifier: string) {
7171
return function(target: Function) {
7272
Remotable._ensureUnique(identifier);
73-
Remotable.Registry.PluginHostContext[identifier] = target;
73+
Remotable.Registry.ExtHostContext[identifier] = target;
7474
target[Remotable.PROP_NAME] = identifier;
7575
};
7676
}
@@ -87,7 +87,7 @@ export class Remotable {
8787
}
8888

8989
private static _ensureUnique(identifier: string): void {
90-
if (Remotable.Registry.MainContext[identifier] || Remotable.Registry.PluginHostContext[identifier] || Remotable.Registry.WorkerContext[identifier]) {
90+
if (Remotable.Registry.MainContext[identifier] || Remotable.Registry.ExtHostContext[identifier] || Remotable.Registry.WorkerContext[identifier]) {
9191
throw new Error('Duplicate Remotable identifier found');
9292
}
9393
}

0 commit comments

Comments
 (0)