Skip to content

Commit ae5b304

Browse files
authored
views implicit activation events (microsoft#167344)
1 parent 262fe2c commit ae5b304

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/vs/workbench/api/browser/viewsExtensionPoint.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,18 @@ type ViewExtensionPointType = { [loc: string]: IUserFriendlyViewDescriptor[] };
251251
const viewsExtensionPoint: IExtensionPoint<ViewExtensionPointType> = ExtensionsRegistry.registerExtensionPoint<ViewExtensionPointType>({
252252
extensionPoint: 'views',
253253
deps: [viewsContainersExtensionPoint],
254-
jsonSchema: viewsContribution
254+
jsonSchema: viewsContribution,
255+
activationEventsGenerator: (viewExtensionPointTypeArray, result) => {
256+
for (const viewExtensionPointType of viewExtensionPointTypeArray) {
257+
for (const viewDescriptors of Object.values(viewExtensionPointType)) {
258+
for (const viewDescriptor of viewDescriptors) {
259+
if (viewDescriptor.id) {
260+
result.push(`onView:${viewDescriptor.id}`);
261+
}
262+
}
263+
}
264+
}
265+
}
255266
});
256267

257268
const CUSTOM_VIEWS_START_ORDER = 7;

0 commit comments

Comments
 (0)