JsonLanguageServiceHost CreateHost(Project project) { var host = new JsonLanguageServiceHost(project); host.Start(); return(host); }
public override void Dispose() { if (host != null) { host.OnDiagnostics -= OnDiagnostics; } host = null; base.Dispose(); }
protected override void Initialize() { JsonServices.Activate(); host = JsonServices.Workspace.GetHost(DocumentContext.Project); host.OnDiagnostics += OnDiagnostics; Editor.TextChanged += TextChanged; base.Initialize(); }
public JsonLanguageServiceHost GetHost(Project project) { JsonLanguageServiceHost host = hosts.FirstOrDefault(currentHost => currentHost.Project == project); if (host != null) { return(host); } host = CreateHost(project); hosts.Add(host); return(host); }
void WorkbenchDocumentClosed(Document document) { JsonLanguageServiceHost host = GetHost(document); host.CloseDocument(document); }
void WorkbenchDocumentOpened(Document document) { JsonLanguageServiceHost host = GetHost(document); host.OpenDocument(document); }