/// <summary>
        /// Configures the environment to load the plugin manager and verify we
        /// have access to our plugin and projectPlugin.
        /// </summary>
        private void SetupPlugin(
            out ProjectBlockCollection blocks,
            out BlockCommandSupervisor commands,
            out PluginSupervisor plugins,
            out LocalWordsProjectPlugin projectPlugin)
        {
            // Start getting us a simple plugin manager.
            var spelling      = new SpellingFrameworkPlugin();
            var nhunspell     = new LocalWordsPlugin();
            var pluginManager = new PluginManager(spelling, nhunspell);

            PluginManager.Instance = pluginManager;

            // Create a project and pull out the useful properties we'll use to
            // make changes.
            var project = new Project();

            blocks   = project.Blocks;
            commands = project.Commands;
            plugins  = project.Plugins;

            // Load in the immediate correction editor.
            if (!plugins.Add("Spelling Framework"))
            {
                // We couldn't load it for some reason.
                throw new ApplicationException("Cannot load 'Spelling' plugin.");
            }

            if (!plugins.Add("Local Words"))
            {
                // We couldn't load it for some reason.
                throw new ApplicationException("Cannot load 'Local Words' plugin.");
            }

            // Pull out the projectPlugin for the correction and cast it (since we know
            // what type it is).
            ProjectPluginController pluginController = plugins.Controllers[1];

            projectPlugin = (LocalWordsProjectPlugin)pluginController.ProjectPlugin;
            projectPlugin.CaseSensitiveDictionary.Add("Correct");
            projectPlugin.CaseInsensitiveDictionary.Add("one");
        }
        /// <summary>
        /// Configures the environment to load the plugin manager and verify we
        /// have access to our plugin and projectPlugin.
        /// </summary>
        private void SetupPlugin(
			out ProjectBlockCollection blocks,
			out BlockCommandSupervisor commands,
			out PluginSupervisor plugins,
			out LocalWordsProjectPlugin projectPlugin)
        {
            // Start getting us a simple plugin manager.
            var spelling = new SpellingFrameworkPlugin();
            var nhunspell = new LocalWordsPlugin();
            var pluginManager = new PluginManager(spelling, nhunspell);

            PluginManager.Instance = pluginManager;

            // Create a project and pull out the useful properties we'll use to
            // make changes.
            var project = new Project();

            blocks = project.Blocks;
            commands = project.Commands;
            plugins = project.Plugins;

            // Load in the immediate correction editor.
            if (!plugins.Add("Spelling Framework"))
            {
                // We couldn't load it for some reason.
                throw new ApplicationException("Cannot load 'Spelling' plugin.");
            }

            if (!plugins.Add("Local Words"))
            {
                // We couldn't load it for some reason.
                throw new ApplicationException("Cannot load 'Local Words' plugin.");
            }

            // Pull out the projectPlugin for the correction and cast it (since we know
            // what type it is).
            ProjectPluginController pluginController = plugins.Controllers[1];
            projectPlugin = (LocalWordsProjectPlugin) pluginController.ProjectPlugin;
            projectPlugin.CaseSensitiveDictionary.Add("Correct");
            projectPlugin.CaseInsensitiveDictionary.Add("one");
        }