private void SetItemInternal(DockContent window, BaseItem item) { try { IActiveItemViewer viewer = window as IActiveItemViewer; IWindowPlugin plugin = window as IWindowPlugin; // Always set a main window plugin, but only set others if they've changed. if (plugin.GetKind() == WindowPluginKind.MainWindow || viewer.GetActiveItem() != item) { viewer.SetActiveItem(item); } } catch (Exception exc) { if (_logView.LogCatchAll(exc, "Unexpected plugin error")) { throw; } } }