Beispiel #1
0
        private CompilerOutputCmds(DevUtilsPackage package)
        {
            this.package = package;

            // Add our command handlers for menu (commands must exist in the .vsct file)
            OleMenuCommandService mcs = serviceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                // Create the command for the menu item.
                CommandID menuCommandID = new CommandID(guidDevUtilsCmdSet, cmdShowAssembly);
                var       cmd           = new OleMenuCommand((s, e) => showCppOutput(1), changeHandler, beforeQueryStatus, menuCommandID);
                cmd.Properties["lang"] = "C/C++";
                mcs.AddCommand(cmd);

                menuCommandID          = new CommandID(guidDevUtilsCmdSet, cmdShowPreprocessed);
                cmd                    = new OleMenuCommand((s, e) => showCppOutput(2), changeHandler, beforeQueryStatus, menuCommandID);
                cmd.Properties["lang"] = "C/C++";
                mcs.AddCommand(cmd);

                menuCommandID          = new CommandID(guidDevUtilsCmdSet, cmdShowDecompiledCSharp);
                cmd                    = new OleMenuCommand((s, e) => showDecompiledCSharp(), changeHandler, beforeQueryStatus, menuCommandID);
                cmd.Properties["lang"] = "CSharp";
                mcs.AddCommand(cmd);
            }
        }
Beispiel #2
0
        public BuildEventsHandler(DevUtilsPackage pkg)
        {
            _vspkg       = pkg;
            _buildEvents = pkg.dte.Events.BuildEvents;
            _buildEvents.OnBuildBegin          += buildStarted;
            _buildEvents.OnBuildDone           += buildDone;
            _buildEvents.OnBuildProjConfigDone += buildProjDone;

            _taskbarItemInfo = Application.Current.MainWindow.TaskbarItemInfo;
            if (_taskbarItemInfo == null)
            {
                Application.Current.MainWindow.TaskbarItemInfo = _taskbarItemInfo = new TaskbarItemInfo();
            }
        }
Beispiel #3
0
 public static void Initialize(DevUtilsPackage package)
 {
     Instance = new CompilerOutputCmds(package);
 }