internal async Task InitializeWindow(IWorkbenchWindow window) { this.window = window; window.Document = this; view = await controller.GetDocumentView(); view.IsRoot = true; window.SetRootView(view.CreateShellView(window)); LastTimeActive = DateTime.Now; this.window.CloseRequested += Window_CloseRequested; SubscribeControllerEvents(); DocumentRegistry.Add(this); }
public Document(IWorkbenchWindow window) { Counters.OpenDocuments++; LastTimeActive = DateTime.Now; this.window = window; window.Closed += OnClosed; window.ActiveViewContentChanged += OnActiveViewContentChanged; if (IdeApp.Workspace != null) { IdeApp.Workspace.ItemRemovedFromSolution += OnEntryRemoved; } if (window.ViewContent.Project != null) { window.ViewContent.Project.Modified += HandleProjectModified; } window.ViewsChanged += HandleViewsChanged; window.ViewContent.ContentNameChanged += ReloadAnalysisDocumentHandler; MonoDevelopWorkspace.LoadingFinished += ReloadAnalysisDocumentHandler; DocumentRegistry.Add(this); }
internal Document(DocumentManager documentManager, IShell shell, DocumentController controller, DocumentControllerDescription controllerDescription, IWorkbenchWindow window) { Counters.OpenDocuments++; this.shell = shell; this.documentManager = documentManager; this.documentControllerDescription = controllerDescription; this.controller = controller; controller.Document = this; callbackRegistration = documentManager.ServiceProvider.WhenServiceInitialized <RootWorkspace> (s => { s.ItemRemovedFromSolution += OnEntryRemoved; callbackRegistration = null; }); this.window = window; window.Document = this; LastTimeActive = DateTime.Now; this.window.CloseRequested += Window_CloseRequested; SubscribeControllerEvents(); DocumentRegistry.Add(this); }