提交 bddc5d69 编写于 作者: M Martin Aeschlimann

add IJSONContributionRegistry.notifySchemaChanged

上级 ad6067ae
...@@ -143,7 +143,7 @@ class ConfigurationRegistry implements IConfigurationRegistry { ...@@ -143,7 +143,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
} }
public notifyConfigurationSchemaUpdated(configuration: IConfigurationNode) { public notifyConfigurationSchemaUpdated(configuration: IConfigurationNode) {
contributionRegistry.registerSchema(editorConfigurationSchemaId, this.editorConfigurationSchema); contributionRegistry.notifySchemaChanged(editorConfigurationSchemaId);
} }
public registerOverrideIdentifiers(overrideIdentifiers: string[]): void { public registerOverrideIdentifiers(overrideIdentifiers: string[]): void {
......
...@@ -25,6 +25,13 @@ export interface IJSONContributionRegistry { ...@@ -25,6 +25,13 @@ export interface IJSONContributionRegistry {
*/ */
registerSchema(uri: string, unresolvedSchemaContent: IJSONSchema): void; registerSchema(uri: string, unresolvedSchemaContent: IJSONSchema): void;
/**
* Notifies all listeneres that the content of the given schema has changed.
* @param uri The id of the schema
*/
notifySchemaChanged(uri: string): void;
/** /**
* Get all schemas * Get all schemas
*/ */
...@@ -60,6 +67,10 @@ class JSONContributionRegistry implements IJSONContributionRegistry { ...@@ -60,6 +67,10 @@ class JSONContributionRegistry implements IJSONContributionRegistry {
this._onDidChangeSchema.fire(uri); this._onDidChangeSchema.fire(uri);
} }
public notifySchemaChanged(uri: string): void {
this._onDidChangeSchema.fire(uri);
}
public getSchemaContributions(): ISchemaContributions { public getSchemaContributions(): ISchemaContributions {
return { return {
schemas: this.schemasById, schemas: this.schemasById,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册