@@ -10,6 +10,7 @@ import { Event, Emitter } from 'vs/base/common/event';
1010import { localize } from 'vs/nls' ;
1111import { Extensions as JSONExtensions , IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry' ;
1212import { RunOnceScheduler } from 'vs/base/common/async' ;
13+ import * as Codicons from 'vs/base/common/codicons' ;
1314
1415// ------ API types
1516
@@ -96,7 +97,7 @@ class IconRegistry implements IIconRegistry {
9697
9798 public registerIcon ( id : string , defaults : IconDefaults , description ?: string , deprecationMessage ?: string ) : ThemeIcon {
9899 if ( ! description ) {
99- description = localize ( 'icon.defaultDescription' , 'Icon with identifier {0}' , id ) ;
100+ description = localize ( 'icon.defaultDescription' , 'Icon with identifier \' {0}\' ' , id ) ;
100101 }
101102 let iconContribution : IconContribution = { id, description, defaults, deprecationMessage } ;
102103 this . iconsById [ id ] = iconContribution ;
@@ -163,8 +164,13 @@ export function getIconRegistry(): IIconRegistry {
163164 return iconRegistry ;
164165}
165166
166-
167-
167+ function initialize ( ) {
168+ for ( const icon of Codicons . iconRegistry . all ) {
169+ registerIcon ( icon . id , icon . definition ) ;
170+ }
171+ Codicons . iconRegistry . onDidRegister ( icon => registerIcon ( icon . id , icon . definition ) ) ;
172+ }
173+ initialize ( ) ;
168174
169175
170176export const iconsSchemaId = 'vscode://schemas/icons' ;
0 commit comments