mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Add SchemaRetry notification to jsonServerMain
This commit is contained in:
@@ -34,6 +34,10 @@ namespace SchemaContentChangeNotification {
|
||||
export const type: NotificationType<string, any> = new NotificationType('json/schemaContent');
|
||||
}
|
||||
|
||||
namespace SchemaRetryNotification {
|
||||
export const type: NotificationType<string, any> = new NotificationType('json/schemaRetry');
|
||||
}
|
||||
|
||||
// Create a connection for the server
|
||||
const connection: IConnection = createConnection();
|
||||
|
||||
@@ -207,6 +211,14 @@ connection.onNotification(SchemaContentChangeNotification.type, uri => {
|
||||
languageService.resetSchema(uri);
|
||||
});
|
||||
|
||||
// Retry schema validation on all open documents
|
||||
connection.onNotification(SchemaRetryNotification.type, uri => {
|
||||
const document = documents.get(uri);
|
||||
if (document) {
|
||||
triggerValidation(document);
|
||||
}
|
||||
});
|
||||
|
||||
function updateConfiguration() {
|
||||
const languageSettings = {
|
||||
validate: true,
|
||||
@@ -405,4 +417,4 @@ connection.onFoldingRanges((params, token) => {
|
||||
});
|
||||
|
||||
// Listen on the connection
|
||||
connection.listen();
|
||||
connection.listen();
|
||||
|
||||
Reference in New Issue
Block a user