public ToolWindowGroup(IToolWindowGroupManager toolWindowGroupManager, ITabGroup tabGroup) { this.toolWindowGroupManager = toolWindowGroupManager; this.tabGroup = tabGroup; this.tabGroup.Tag = this; this.tabGroup.TabContentAttached += TabGroup_TabContentAttached; }
public ToolWindowGroup(IToolWindowGroupService toolWindowGroupService, ITabGroup tabGroup) { this.ToolWindowGroupService = toolWindowGroupService; this.TabGroup = tabGroup; this.TabGroup.Tag = this; this.TabGroup.TabContentAttached += TabGroup_TabContentAttached; }
public ToolWindowGroup(IToolWindowGroupManager toolWindowGroupManager, ITabGroup tabGroup) { this.ToolWindowGroupManager = toolWindowGroupManager; this.TabGroup = tabGroup; this.TabGroup.Tag = this; this.TabGroup.TabContentAttached += TabGroup_TabContentAttached; }
TabContentImpl CreateNewTab(ITabGroup tabGroup) { var impl = new TabContentImpl(this, fileTabUIContextLocatorCreator.Create(), refFactories); tabGroup.Add(impl); return(impl); }
internal void Add(ITabGroup group, IFileTabContent tabContent, object serializedUI, Action <ShowTabContentEventArgs> onShown) { Debug.Assert(TabGroupManager.TabGroups.Contains(group)); var tab = OpenEmptyTab(group); tab.Show(tabContent, serializedUI, onShown); }
TabContentImpl CreateNewTab(ITabGroup tabGroup) { var impl = new TabContentImpl(this, documentTabUIContextLocatorProvider.Create(), referenceDocumentTabContentProviders, defaultDocumentTabContentProviders, referenceHandlers); tabGroup.Add(impl); return(impl); }
internal void Add(ITabGroup group, DocumentTabContent tabContent, object uiState, Action <ShowTabContentEventArgs> onShown) { Debug.Assert(TabGroupService.TabGroups.Contains(group)); var tab = OpenEmptyTab(group); tab.Show(tabContent, uiState, onShown); }
TabContentImpl CreateNewTab(ITabGroup tabGroup) { var impl = new TabContentImpl(this, fileTabUIContextLocatorProvider.Create(), referenceFileTabContentProviders, defaultFileTabContentProviders); tabGroup.Add(impl); return(impl); }
IDocumentTab OpenEmptyTab(ITabGroup g) { var impl = CreateNewTab(g); g.ActiveTabContent = impl; return(impl); }
public static SerializedTabGroup Create(IFileTabContentFactoryManager creator, ITabGroup g) { int index = g.TabContents.ToList().IndexOf(g.ActiveTabContent); var tg = new SerializedTabGroup(index); foreach (IFileTab tab in g.TabContents) { var t = SerializedTab.TryCreate(creator, tab); if (t != null) tg.Tabs.Add(t); } return tg; }
public void Close(ITabGroup tabGroup) { if (tabGroup == null) { throw new ArgumentNullException(); } var impl = tabGroup as TabGroup; if (impl == null) { throw new InvalidOperationException(); } impl.CloseAllTabs(); }
public static SerializedTabGroup Create(IDocumentTabContentFactoryService documentTabContentFactoryService, ITabGroup g) { int index = g.TabContents.ToList().IndexOf(g.ActiveTabContent); var tg = new SerializedTabGroup(index); foreach (IDocumentTab tab in g.TabContents) { var t = SerializedTab.TryCreate(documentTabContentFactoryService, tab); if (t != null) tg.Tabs.Add(t); } return tg; }
public static ToolWindowGroup GetToolWindowGroup(ITabGroup tabGroup) { return tabGroup == null ? null : (ToolWindowGroup)tabGroup.Tag; }
/// <summary> /// Constructor /// </summary> /// <param name="selected">Selected tab group or null</param> /// <param name="unselected">Unselected tab group or null</param> public TabGroupSelectedEventArgs(ITabGroup selected, ITabGroup unselected) { this.Selected = selected; this.Unselected = unselected; }
public IEnumerable <object> Restore(FileTabManager fileTabManager, IFileTabContentFactoryManager fileTabContentFactoryManager, ITabGroup g) { foreach (var st in Tabs) { foreach (var o in st.TryRestore(fileTabManager, fileTabContentFactoryManager, g)) { yield return(o); } } var ary = g.TabContents.ToArray(); if ((uint)Index < (uint)ary.Length) { g.ActiveTabContent = ary[Index]; } yield return(null); }
public static ToolWindowGroup GetToolWindowGroup(ITabGroup tabGroup) => (ToolWindowGroup)tabGroup?.Tag;
public ToolWindowGroup(IToolWindowGroupService toolWindowGroupService, ITabGroup tabGroup) { ToolWindowGroupService = toolWindowGroupService; TabGroup = tabGroup; TabGroup.Tag = this; TabGroup.TabContentAttached += TabGroup_TabContentAttached; }
internal IToolWindowGroup GetToolWindowGroup(ITabGroup tabGroup) => ToolWindowGroup.GetToolWindowGroup(tabGroup);
public GuidObjectsProvider(InitializeContextMenuHelper owner, ITabGroup tabGroup) { this.owner = owner; this.tabGroup = tabGroup; }
public void Close(ITabGroup tabGroup) { if (tabGroup == null) throw new ArgumentNullException(); var impl = tabGroup as TabGroup; if (impl == null) throw new InvalidOperationException(); impl.CloseAllTabs(); }
public bool Owns(ITabGroup tabGroup) => TabGroupService.TabGroups.Contains(tabGroup);
public IEnumerable<object> Restore(DocumentTabService documentTabService, IDocumentTabContentFactoryService documentTabContentFactoryService, ITabGroup g) { foreach (var st in Tabs) { foreach (var o in st.TryRestore(documentTabService, documentTabContentFactoryService, g)) yield return o; } var ary = g.TabContents.ToArray(); if ((uint)Index < (uint)ary.Length) g.ActiveTabContent = ary[Index]; yield return null; }
public IEnumerable<object> TryRestore(DocumentTabService documentTabService, IDocumentTabContentFactoryService documentTabContentFactoryService, ITabGroup g) { var guid = Content.Attribute<Guid?>(CONTENT_GUID_ATTR); if (guid == null) yield break; var ctx = new GetNodesContext(); foreach (var o in GetNodes(ctx, documentTabService.DocumentTreeView)) yield return o; if (ctx.Nodes == null) yield break; var tabContent = documentTabContentFactoryService.Deserialize(guid.Value, Content, ctx.Nodes); yield return null; if (tabContent == null) yield break; documentTabService.Add(g, tabContent, null, (Action<ShowTabContentEventArgs>)(a => { if (a.Success) { var uiContext = tabContent.DocumentTab.UIContext; tabContent.DocumentTab.DeserializeUI((ISettingsSection)TabUI); var obj = uiContext.DeserializeUIState(UI); uiContext.RestoreUIState(obj); } })); yield return null; }
/// <summary> /// Constructor /// </summary> /// <param name="selected">Selected tab group or null</param> /// <param name="unselected">Unselected tab group or null</param> public TabGroupSelectedEventArgs(ITabGroup selected, ITabGroup unselected) { Selected = selected; Unselected = unselected; }
public IEnumerable<object> Restore(FileTabManager fileTabManager, IFileTabContentFactoryManager creator, ITabGroup g) { foreach (var st in Tabs) { foreach (var o in st.TryRestore(fileTabManager, creator, g)) yield return o; } var ary = g.TabContents.ToArray(); if ((uint)Index < (uint)ary.Length) g.ActiveTabContent = ary[Index]; yield return null; }
/// <summary> /// Constructor /// </summary> /// <param name="added">true if it was added</param> /// <param name="tabGroup">Tab group</param> public TabGroupCollectionChangedEventArgs(bool added, ITabGroup tabGroup) { this.Added = added; this.TabGroup = tabGroup; }
public IContextMenuCreator InitializeContextMenu(IMenuManager menuManager, ITabGroup tabGroup, FrameworkElement elem) { return menuManager.InitializeContextMenu(elem, tabGroupGuid, new GuidObjectsCreator(this, tabGroup)); }
public IContextMenuProvider InitializeContextMenu(IMenuService menuService, ITabGroup tabGroup, FrameworkElement elem) => menuService.InitializeContextMenu(elem, tabGroupGuid, new GuidObjectsProvider(this, tabGroup));
public static ToolWindowGroup GetToolWindowGroup(ITabGroup tabGroup) { return(tabGroup == null ? null : (ToolWindowGroup)tabGroup.Tag); }
/// <summary> /// Constructor /// </summary> /// <param name="tabGroup">Tab group</param> /// <param name="selected">Selected content or null</param> /// <param name="unselected">Unselected content or null</param> public TabSelectedEventArgs(ITabGroup tabGroup, ITabContent selected, ITabContent unselected) { this.TabGroup = tabGroup; this.Selected = selected; this.Unselected = unselected; }
public TabGroupContext(ITabGroup tabGroup) { this.TabGroup = tabGroup; this.TabGroupService = tabGroup.TabGroupService; }
/// <summary> /// Constructor /// </summary> /// <param name="tabGroup">Tab group</param> /// <param name="selected">Selected content or null</param> /// <param name="unselected">Unselected content or null</param> public TabSelectedEventArgs(ITabGroup tabGroup, ITabContent?selected, ITabContent?unselected) { TabGroup = tabGroup; Selected = selected; Unselected = unselected; }
public MenuTabGroupContext(ITabGroupService tabGroupService) { TabGroup = tabGroupService.ActiveTabGroup; TabGroupService = tabGroupService; }
public IEnumerable<object> TryRestore(FileTabManager fileTabManager, IFileTabContentFactoryManager creator, ITabGroup g) { var guid = Content.Attribute<Guid?>(CONTENT_GUID_ATTR); if (guid == null) yield break; var ctx = new GetNodesContext(); foreach (var o in GetNodes(ctx, fileTabManager.FileTreeView)) yield return o; if (ctx.Nodes == null) yield break; var tabContent = creator.Deserialize(guid.Value, Content, ctx.Nodes); yield return null; if (tabContent == null) yield break; fileTabManager.Add(g, tabContent, null, a => { if (a.Success) { var uiContext = tabContent.FileTab.UIContext; tabContent.FileTab.DeserializeUI(TabUI); var obj = uiContext.CreateSerialized(UI); uiContext.Deserialize(obj); } }); yield return null; }
public TabGroupContext(ITabGroup tabGroup) { TabGroup = tabGroup; TabGroupService = tabGroup.TabGroupService; }
internal IToolWindowGroup GetToolWindowGroup(ITabGroup tabGroup) { return(ToolWindowGroup.GetToolWindowGroup(tabGroup)); }
public static SerializedTabGroup Create(IDocumentTabContentFactoryService documentTabContentFactoryService, ITabGroup g) { int index = g.TabContents.ToList().IndexOf(g.ActiveTabContent); var tg = new SerializedTabGroup(index); foreach (IDocumentTab tab in g.TabContents) { var t = SerializedTab.TryCreate(documentTabContentFactoryService, tab); if (t != null) { tg.Tabs.Add(t); } } return(tg); }
/// <summary> /// Constructor /// </summary> /// <param name="tabGroup">Tab group</param> /// <param name="selected">Selected content or null</param> /// <param name="unselected">Unselected content or null</param> public TabSelectedEventArgs(ITabGroup tabGroup, ITabContent selected, ITabContent unselected) { TabGroup = tabGroup; Selected = selected; Unselected = unselected; }
public IEnumerable <object> Restore(DocumentTabService documentTabService, IDocumentTabContentFactoryService documentTabContentFactoryService, ITabGroup g) { foreach (var st in Tabs) { foreach (var o in st.TryRestore(documentTabService, documentTabContentFactoryService, g)) { yield return(o); } } var ary = g.TabContents.ToArray(); if ((uint)Index < (uint)ary.Length) { g.ActiveTabContent = ary[Index]; } yield return(null); }
public IEnumerable <object> TryRestore(FileTabManager fileTabManager, IFileTabContentFactoryManager fileTabContentFactoryManager, ITabGroup g) { var guid = Content.Attribute <Guid?>(CONTENT_GUID_ATTR); if (guid == null) { yield break; } var ctx = new GetNodesContext(); foreach (var o in GetNodes(ctx, fileTabManager.FileTreeView)) { yield return(o); } if (ctx.Nodes == null) { yield break; } var tabContent = fileTabContentFactoryManager.Deserialize(guid.Value, Content, ctx.Nodes); yield return(null); if (tabContent == null) { yield break; } fileTabManager.Add(g, tabContent, null, (Action <ShowTabContentEventArgs>)(a => { if (a.Success) { var uiContext = tabContent.FileTab.UIContext; tabContent.FileTab.DeserializeUI((ISettingsSection)this.TabUI); var obj = uiContext.CreateSerialized(UI); uiContext.Deserialize(obj); } })); yield return(null); }
public IEnumerable <object> TryRestore(DocumentTabService documentTabService, IDocumentTabContentFactoryService documentTabContentFactoryService, ITabGroup g) { var guid = Content.Attribute <Guid?>(CONTENT_GUID_ATTR); if (guid == null) { yield break; } var ctx = new GetNodesContext(); foreach (var o in GetNodes(ctx, documentTabService.DocumentTreeView)) { yield return(o); } if (ctx.Nodes == null) { yield break; } var tabContent = documentTabContentFactoryService.Deserialize(guid.Value, Content, ctx.Nodes); yield return(null); if (tabContent == null) { yield break; } documentTabService.Add(g, tabContent, null, (Action <ShowTabContentEventArgs>)(a => { if (a.Success) { var uiContext = tabContent.DocumentTab.UIContext; tabContent.DocumentTab.DeserializeUI((ISettingsSection)TabUI); var obj = uiContext.DeserializeUIState(UI); uiContext.RestoreUIState(obj); } })); yield return(null); }
/// <summary> /// Constructor /// </summary> /// <param name="added">true if it was added</param> /// <param name="tabGroup">Tab group</param> public TabGroupCollectionChangedEventArgs(bool added, ITabGroup tabGroup) { Added = added; TabGroup = tabGroup; }
internal IToolWindowGroup GetToolWindowGroup(ITabGroup tabGroup) { return ToolWindowGroup.GetToolWindowGroup(tabGroup); }