예제 #1
0
        FileTabManager(IFileTabUIContextLocatorProvider fileTabUIContextLocatorProvider, FileTreeView fileTreeView, ITabManagerProvider tabManagerProvider, IFileTabContentFactoryManager fileTabContentFactoryManager, IFileTabManagerSettings fileTabManagerSettings, IWpfFocusManager wpfFocusManager, IDecompilationCache decompilationCache, [ImportMany] IEnumerable <Lazy <IReferenceFileTabContentProvider, IReferenceFileTabContentProviderMetadata> > referenceFileTabContentProviders, [ImportMany] IEnumerable <Lazy <IDefaultFileTabContentProvider, IDefaultFileTabContentProviderMetadata> > defaultFileTabContentProviders)
        {
            this.Settings = fileTabManagerSettings;
            this.fileTabUIContextLocatorProvider = fileTabUIContextLocatorProvider;
            this.fileTabContentFactoryManager    = fileTabContentFactoryManager;
            this.wpfFocusManager    = wpfFocusManager;
            this.decompilationCache = decompilationCache;
            this.referenceFileTabContentProviders = referenceFileTabContentProviders.OrderBy(a => a.Metadata.Order).ToArray();
            this.defaultFileTabContentProviders   = defaultFileTabContentProviders.OrderBy(a => a.Metadata.Order).ToArray();
            var tvElem = fileTreeView.TreeView.UIObject as UIElement;

            Debug.Assert(tvElem != null);
            if (tvElem != null)
            {
                tvElem.IsVisibleChanged += TreeView_IsVisibleChanged;
                isTreeViewVisible        = tvElem.IsVisible;
            }
            this.FileTreeView = fileTreeView;
            this.FileTreeView.FileManager.CollectionChanged += FileManager_CollectionChanged;
            this.FileTreeView.SelectionChanged     += FileTreeView_SelectionChanged;
            this.FileTreeView.NodesTextChanged     += FileTreeView_NodesTextChanged;
            this.FileTreeView.NodeActivated        += FileTreeView_NodeActivated;
            this.FileTreeView.TreeView.NodeRemoved += TreeView_NodeRemoved;
            this.tabManager      = tabManagerProvider.Create();
            this.TabGroupManager = this.tabManager.Create(new TabGroupManagerOptions(MenuConstants.GUIDOBJ_FILES_TABCONTROL_GUID));
            this.TabGroupManager.TabSelectionChanged      += TabGroupManager_TabSelectionChanged;
            this.TabGroupManager.TabGroupSelectionChanged += TabGroupManager_TabGroupSelectionChanged;
        }
 ToolWindowManagerProvider(ITabManagerProvider tabManagerProvider)
 {
     this.tabManagerProvider = tabManagerProvider;
 }