Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        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);
        }