Inheritance: Microsoft.VisualStudio.Shell.Package
        protected override void Initialize()
        {
            base.Initialize();

            Instance = this;
            _dispatcher = Dispatcher.CurrentDispatcher;

            var mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if (null != mcs)
            {
                // Create the command for the menu item.
                var generateCommandId = new CommandID(Guids.guidTranslatorCmdSet, (int)Guids.GenerationCmdId);
                var menuItemTranslate = new OleMenuCommand(GenerateMenu_Clicked, generateCommandId);
                menuItemTranslate.BeforeQueryStatus += MenuItemTranslateOnBeforeQueryStatus;
                mcs.AddCommand(menuItemTranslate);
            }
        }
 protected override void Dispose(bool disposing)
 {
     Instance = null;
     base.Dispose(disposing);
 }