示例#1
0
        internal Document(DocumentManager documentManager, IShell shell, DocumentController controller, DocumentControllerDescription controllerDescription)
        {
            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;
            });
        }
示例#2
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);
        }
        public override async Task <DocumentController> CreateController(FileDescriptor file, DocumentControllerDescription controllerDescription)
        {
            var window = GetWindow(file.FilePath, (Project)file.Owner);

            if (window == null)
            {
                throw new InvalidOperationException("GetWindow == null");
            }
            var view = new GuiBuilderView(window);

            return(view);
        }
示例#4
0
        public override async Task <DocumentController> CreateController(FileDescriptor file, DocumentControllerDescription controllerDescription)
        {
            enabled = false;
            var existing = await IdeServices.DocumentControllerService.CreateTextEditorController(file);

            enabled = true;
            return(new EtoDesignerViewContent(existing));
        }
示例#5
0
        internal Task <Document> OpenDocument(FilePath fileName, WorkspaceObject project, int line, int column, OpenDocumentOptions options, Encoding Encoding, DocumentControllerDescription binding, IShellNotebook dockNotebook)
        {
            var openFileInfo = new FileOpenInformation(fileName, project)
            {
                Options = options,
                Line    = line,
                Column  = column,
                DocumentControllerDescription = binding,
                Encoding     = Encoding,
                DockNotebook = dockNotebook
            };

            return(documentManager.OpenDocument(openFileInfo));
        }
示例#6
0
        internal Task <Document> OpenDocument(FilePath fileName, int line, int column, OpenDocumentOptions options, Encoding encoding, DocumentControllerDescription binding)
        {
            var openFileInfo = new FileOpenInformation(fileName, null)
            {
                Options = options,
                Line    = line,
                Column  = column,
                DocumentControllerDescription = binding,
                Encoding = encoding
            };

            return(documentManager.OpenDocument(openFileInfo));
        }
        public override async Task <DocumentController> CreateController(FileDescriptor file, DocumentControllerDescription controllerDescription)
        {
            var info = GtkDesignInfo.FromProject((DotNetProject)file.Owner);
            var view = new ActionGroupView(GetActionGroup(file.FilePath), info.GuiBuilderProject);

            return(view);
        }
示例#8
0
 public override Task <DocumentController> CreateController(ModelDescriptor modelDescriptor, DocumentControllerDescription controllerDescription)
 {
     return(Task.FromResult <DocumentController> (new AssemblyBrowserViewContent()));
 }
 public override Task <DocumentController> CreateController(FileDescriptor file, DocumentControllerDescription controllerDescription)
 {
     return(Task.FromResult <DocumentController> (new TextEditorViewContent()));
 }
        public override Task <DocumentController> CreateController(FileDescriptor modelDescriptor, DocumentControllerDescription controllerDescription)
        {
            var imports = Ide.Composition.CompositionManager.Instance.GetExportedValue <TImports> ();

            if (themeToClassification == null)
            {
                themeToClassification = CreateThemeToClassification(imports.EditorFormatMapService);
            }

            return(Task.FromResult(CreateContent(imports)));
        }
示例#11
0
 internal FileViewer(DocumentControllerDescription binding)
 {
     this.binding = binding;
 }