当前位置: 首页>>代码示例>>C#>>正文


C# DTE.AddOutputWindowPane方法代码示例

本文整理汇总了C#中DTE.AddOutputWindowPane方法的典型用法代码示例。如果您正苦于以下问题:C# DTE.AddOutputWindowPane方法的具体用法?C# DTE.AddOutputWindowPane怎么用?C# DTE.AddOutputWindowPane使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DTE的用法示例。


在下文中一共展示了DTE.AddOutputWindowPane方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

        protected override void Initialize()
        {
            Debug.WriteLine (string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            _dte = (EnvDTE.DTE)GetService(typeof(SDTE));
            _eventsHandlers = _dte.Events.DocumentEvents;
            _eventsHandlers.DocumentSaved += documentSaved;

            _outputPane = _dte.AddOutputWindowPane("cppcheck analysis output");

            AnalyzerCppcheck cppcheckAnalayzer = new AnalyzerCppcheck();
            cppcheckAnalayzer.ProgressUpdated += checkProgressUpdated;
            _analyzers.Add(cppcheckAnalayzer);

            if (String.IsNullOrEmpty(Properties.Settings.Default.DefaultArguments))
                Properties.Settings.Default.DefaultArguments = CppcheckSettings.DefaultArguments;

            // 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.guidCPPCheckPluginCmdSet, (int)PkgCmdIDList.cmdidCheckProjectCppcheck);
                MenuCommand menuItem = new MenuCommand(onCheckCurrentProjectRequested, menuCommandID);
                mcs.AddCommand( menuItem );

                CommandID solutionMenuCommandID = new CommandID(GuidList.guidCPPCheckPluginCmdSet, (int)PkgCmdIDList.cmdidCheckSolutionCppcheck);
                MenuCommand solutionMenuItem = new MenuCommand(onCheckSolution, solutionMenuCommandID);
                mcs.AddCommand(solutionMenuItem);

                // Create the command for the settings window
                CommandID settingsWndCmdId = new CommandID(GuidList.guidCPPCheckPluginCmdSet, (int)PkgCmdIDList.cmdidSettings);
                MenuCommand menuSettings = new MenuCommand(onSettingsWindowRequested, settingsWndCmdId);
                mcs.AddCommand(menuSettings);

                CommandID projectMenuCommandID = new CommandID(GuidList.guidCPPCheckPluginProjectCmdSet, (int)PkgCmdIDList.cmdidCheckProjectCppcheck1);
                MenuCommand projectMenuItem = new MenuCommand(onCheckCurrentProjectRequested, projectMenuCommandID);
                mcs.AddCommand(projectMenuItem);

                CommandID projectsMenuCommandID = new CommandID(GuidList.guidCPPCheckPluginMultiProjectCmdSet, (int)PkgCmdIDList.cmdidCheckProjectsCppcheck);
                MenuCommand projectsMenuItem = new MenuCommand(onCheckAllProjectsRequested, projectsMenuCommandID);
                mcs.AddCommand(projectsMenuItem);
            }

            // Creating the tool window
            FindToolWindow(typeof(MainToolWindow), 0, true);
        }
开发者ID:2xmax,项目名称:cppcheck-vs-addin,代码行数:48,代码来源:CPPCheckPluginPackage.cs


注:本文中的DTE.AddOutputWindowPane方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。