ITabGroup GetTabGroup(IMenuItemContext context) { if (context.CreatorObject.Guid != new Guid(MenuConstants.GUIDOBJ_FILES_TABCONTROL_GUID)) { return(null); } var g = context.Find <ITabGroup>(); return(g != null && fileTabManager.Owns(g) ? g : null); }
TabGroupContext CreateContextInternal(IMenuItemContext context) { if (context.CreatorObject.Guid != new Guid(MenuConstants.GUIDOBJ_FILES_TABCONTROL_GUID)) { return(null); } var tabGroup = context.Find <ITabGroup>(); if (tabGroup == null || !fileTabManager.Owns(tabGroup)) { return(null); } return(new TabGroupContext(tabGroup)); }