/// <summary>
        /// Handles the ActievItemChanged in the Reflector AssemblyBrowser.
        /// </summary>
        /// <param name="sender">Object sending this event.</param>
        /// <param name="e">Argument associated with this event.</param>
        private void AssemblyBrowser_ActiveItemChanged(object sender, EventArgs e)
        {
            IAssembly assembly = AssemblyBrowser.ActiveItem as IAssembly;

            if (ArtifactsCache.IsBizTalkAssembly(assembly))
            {
                // The currently selected assembly is a BizTalk assembly: show our commands
                RegisterCommands();
                UpdateDisplay(assembly, false);
            }
            else
            {
                // The currently selected assembly is not a BizTalk assembly: hide our commands
                UnRegisterCommands();
                UpdateDisplay(null, false);
            }
        }
        /// <summary>
        /// Update the BizTalk Artifacts window display.
        /// </summary>
        /// <param name="assembly">Assembly for which artifacts should be displayed.</param>
        /// <param name="forceVisible">true if the artifact window show be made visible, false otherwise.</param>
        /// <remarks>The assembly can be null. This means that the selected assembly is not a BizTalk assembly.</remarks>
        private void UpdateDisplay(IAssembly assembly, bool forceVisible)
        {
            IWindowManager windowMgr = ServiceProvider.GetService(typeof(IWindowManager)) as IWindowManager;

            if (windowMgr != null)
            {
                // If we are asked to force the window to appear, do it now
                if (forceVisible)
                {
                    windowMgr.Windows[Constants.BizTalkArtifactWindowID].Visible = true;
                }

                // Update the window with the new list of artifacts
                if (windowMgr.Windows[Constants.BizTalkArtifactWindowID].Visible)
                {
                    List <DecompiledArtifact> artifacts = ArtifactsCache.GetBizTalkArtifactsForAssembly(assembly);
                    BizTalkArtifactsListControl.Display(artifacts);
                }
            }
        }