// Gets called to create the UI context. It can be shared by any IFileTabContent in this tab.
		// Eg. there's only one text editor per tab, shared by all IFileTabContents that need a text
		// editor.
		public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) {
			// This custom view object is shared by all nodes of the same type. If we didn't want it
			// to be shared, we could use 'node' or 'this' as the key.
			var key = node.GetType();
			// var key = node;	// uncomment to not share it

			// If the UI object has already been created, use it, else create it. The object is
			// stored in a weak reference.
			return locator.Get(key, () => new AssemblyChildNodeUIContext());
		}
Exemple #2
0
 public TabContentImpl(FileTabManager fileTabManager, IFileTabUIContextLocator fileTabUIContextLocator, Lazy <IReferenceFileTabContentCreator, IReferenceFileTabContentCreatorMetadata>[] refFactories)
 {
     this.elementScaler = new TabElementScaler();
     this.tabHistory    = new TabHistory();
     this.tabHistory.SetCurrent(new NullFileTabContent(), false);
     this.fileTabManager          = fileTabManager;
     this.fileTabUIContextLocator = fileTabUIContextLocator;
     this.refFactories            = refFactories;
     this.uiContext = new NullFileTabUIContext();
     this.uiObject  = this.uiContext.UIObject;
 }
Exemple #3
0
 public TabContentImpl(FileTabManager fileTabManager, IFileTabUIContextLocator fileTabUIContextLocator, Lazy<IReferenceFileTabContentCreator, IReferenceFileTabContentCreatorMetadata>[] refFactories)
 {
     this.elementScaler = new TabElementScaler();
     this.tabHistory = new TabHistory();
     this.tabHistory.SetCurrent(new NullFileTabContent(), false);
     this.fileTabManager = fileTabManager;
     this.fileTabUIContextLocator = fileTabUIContextLocator;
     this.refFactories = refFactories;
     this.uiContext = new NullFileTabUIContext();
     this.uiObject = this.uiContext.UIObject;
 }
 public TabContentImpl(FileTabManager fileTabManager, IFileTabUIContextLocator fileTabUIContextLocator, Lazy <IReferenceFileTabContentProvider, IReferenceFileTabContentProviderMetadata>[] referenceFileTabContentProviders, Lazy <IDefaultFileTabContentProvider, IDefaultFileTabContentProviderMetadata>[] defaultFileTabContentProviders)
 {
     this.elementScaler = new TabElementScaler();
     this.tabHistory    = new TabHistory();
     this.tabHistory.SetCurrent(new NullFileTabContent(), false);
     this.fileTabManager                   = fileTabManager;
     this.fileTabUIContextLocator          = fileTabUIContextLocator;
     this.referenceFileTabContentProviders = referenceFileTabContentProviders;
     this.defaultFileTabContentProviders   = defaultFileTabContentProviders;
     this.uiContext = new NullFileTabUIContext();
     this.uiObject  = this.uiContext.UIObject;
 }
Exemple #5
0
        // Gets called to create the UI context. It can be shared by any IFileTabContent in this tab.
        // Eg. there's only one text editor per tab, shared by all IFileTabContents that need a text
        // editor.
        public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
        {
            // This custom view object is shared by all nodes of the same type. If we didn't want it
            // to be shared, we could use 'node' or 'this' as the key.
            var key = node.GetType();

            // var key = node;	// uncomment to not share it

            // If the UI object has already been created, use it, else create it. The object is
            // stored in a weak reference.
            return(locator.Get(key, () => new AssemblyChildNodeUIContext()));
        }
Exemple #6
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return(locator.Get(hexNode, () => new HexFileTabUIContext(hexNode.VMObject, hexNode.IsVirtualizingCollectionVM)));
 }
Exemple #7
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) => locator.Get <IDocumentViewer>();
Exemple #8
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return(locator.Get <ITextEditorUIContext>());
 }
Exemple #9
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return locator.Get<ITextEditorUIContext>();
 }
Exemple #10
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) =>
 locator.Get(typeof(NullFileTabUIContext), () => new NullFileTabUIContext());
		public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) {
			return locator.Get(hexDocument, () => new HexBoxFileTabUIContext(hexDocument, menuManager, hexEditorSettings, appSettings, hexBoxUndoManager.Value));
		}
Exemple #12
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return(locator.Get(hexDocument, () => new HexBoxFileTabUIContext(hexDocument, menuManager, hexEditorSettings, appSettings, hexBoxUndoManager.Value)));
 }
Exemple #13
0
		public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) {
			return locator.Get(hexNode, () => new HexFileTabUIContext(hexNode.VMObject, hexNode.IsVirtualizingCollectionVM));
		}
Exemple #14
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return locator.Get(typeof(NullFileTabUIContext), () => new NullFileTabUIContext());
 }