//TODO: can remove PackageSettings and use GlobalPackageSettings
        public FormSelectObjects(DTE2 dte2, PackageSettings settings)
        {
            _dte2 = dte2;
            _settings = settings;

            InitializeComponent();
            LoadLocals();

            TypeRetriever retriever = new TypeRetriever(dte2);
            List<IRuleSet> ruleSets = new List<IRuleSet>();
            if (settings.IgnoreDynamicallyAddedProperties)
            {
                ruleSets.Add(new PropertyInClassRuleSet(retriever));
            }

            bool excludePrivates = radCheckBoxExcludePrivate.Checked;
            if (excludePrivates)
            {
                ruleSets.Add(new AccessiblePropertiesRuleSet(retriever));
            }

            _ruleSetValidator = new RuleSetValidator(ruleSets);
        }
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", ToString()));
            base.Initialize();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if (null != mcs)
            {
                // Create the command for the menu item.
                CommandID menuCommandID = new CommandID(GuidList.guidObjectExporter_CmdSet, (int)PkgCmdIDList.cmdidExportObjects);
                var menuItem = new OleMenuCommand(MenuItemCallback, menuCommandID);

                menuItem.BeforeQueryStatus += menuItem_BeforeQueryStatus;
                mcs.AddCommand(menuItem);
            }

            //Initialize Object Exporter settings for use with Aspects (can't pass any objects into constructor)
            _packageSettings = (PackageSettings)GetDialogPage(typeof(PackageSettings));
            GlobalPackageSettings.Initialize(_packageSettings);

            //Add user information for exception handling with raygun
            UserInfo info = new UserInfo()
            {
                VisualStudioVersion = _dte2.Version
            };

            Raygun.Initialize(info);

            //Load Scintilla dependencies (SciLexer.dll)
            LoadUnmanagedLibraries();
        }