//
        // Called during early stage toolset deinitialization.
        //
        public virtual void Unload(INWN2PluginHost Host)
        {
            ListView Lv;

            //
            // Early toolset teardown; deinitialize the script compiler hook so
            // that we may unload cleanly.
            //

            Lv = PluginUI.GetVerifyOutputListView();

            if (Lv != null)
                Lv.ItemActivate -= this.OnVerifyOutputListViewItemActivated;

            UnhookScriptCompiler();

            if (NWN2ToolsetMainForm.VersionControlManager.Preferences != null)
            {
                if (NWN2ToolsetMainForm.VersionControlManager.Preferences.ActiveProvider == this)
                    NWN2ToolsetMainForm.VersionControlManager.Preferences.ActiveProvider = m_OriginalVCPlugin;

                m_OriginalVCPlugin = null;
            }

            m_SettingsManager = null;
        }
        //
        // Called when the version control manager preferences have changed,
        // for purposes of allowing us to insert our hook if preferences were
        // not available at initialization time.
        //
        private void OnVersionControlManagerPrefsChanged(object sender, EventArgs e)
        {
            if (NWN2ToolsetMainForm.VersionControlManager.Preferences == null)
                return;

            m_OriginalVCPlugin = NWN2ToolsetMainForm.VersionControlManager.Preferences.ActiveProvider;

            if (m_OriginalVCPlugin == this)
                m_OriginalVCPlugin = null;

            NWN2ToolsetMainForm.VersionControlManager.Preferences.ActiveProvider = this;

            //
            // Remove the change notification registration now as we no longer
            // have need of it.
            //

            NWN2Toolset.Plugins.NWN2VersionControlManagerPreferences.PreferencesChanged -= this.OnVersionControlManagerPrefsChanged;
        }
        //
        // Standard INWN2Plugin methods.
        //
        //
        // Called during late stage toolset initialization.
        //
        public virtual void Load(INWN2PluginHost Host)
        {
            ListView Lv;

            m_SettingsManager = new SettingsManager();
            m_SettingsManager.NeedSettingsLoad = true;

            //
            // By the time Load is invoked, the compiler is present.  Install
            // the compiler hook now.
            //

            m_CompilerField = GetMainFormCompilerField();

            m_ResourceAccessor = new ResourceAccessor(this);

            HookScriptCompiler();

            //
            // Hook the version control system for resource change notification
            // distribution if preferences were available at this point.
            //
            // Otherwise, wait for a change notification to install the hook.
            //
            //

            if (NWN2ToolsetMainForm.VersionControlManager.Preferences != null)
            {
                m_OriginalVCPlugin = NWN2ToolsetMainForm.VersionControlManager.Preferences.ActiveProvider;

                if (m_OriginalVCPlugin == this)
                    m_OriginalVCPlugin = null;

                NWN2ToolsetMainForm.VersionControlManager.Preferences.ActiveProvider = this;
            }
            else
            {
                NWN2Toolset.Plugins.NWN2VersionControlManagerPreferences.PreferencesChanged += this.OnVersionControlManagerPrefsChanged;
            }

            Lv = PluginUI.GetVerifyOutputListView();

            if (Lv != null)
                Lv.ItemActivate += this.OnVerifyOutputListViewItemActivated;
        }