コード例 #1
0
        protected override void Initialize()
        {
            base.Initialize();

            var xDTE  = (EnvDTE80.DTE2)GetGlobalService(typeof(EnvDTE.DTE));
            var xPane = xDTE.ToolWindows.OutputWindow.OutputWindowPanes;

            Global.OutputPane = xPane.Add("Cosmos");
            Global.OutputPane.OutputString("Debugger windows loaded.\r\n");
            CosmosMenuCmdSet.Initialize(this);
        }
コード例 #2
0
        protected override void Initialize()
        {
            base.Initialize();

            var xOutputWindow   = (IVsOutputWindow)GetService(typeof(SVsOutputWindow));
            var xCosmosPaneGuid = Guid.NewGuid();

            ErrorHandler.ThrowOnFailure(
                xOutputWindow.CreatePane(ref xCosmosPaneGuid, "Cosmos", Convert.ToInt32(true), Convert.ToInt32(true)));
            ErrorHandler.ThrowOnFailure(xOutputWindow.GetPane(ref xCosmosPaneGuid, out var xOutputPane));

            Global.OutputPane = xOutputPane;
            xOutputPane.OutputString($"Debugger windows loaded.{Environment.NewLine}");

            CosmosMenuCmdSet.Initialize(this);
        }
コード例 #3
0
        protected override async Task InitializeAsync(
            CancellationToken cancellationToken,
            IProgress <ServiceProgressData> progress)
        {
            await base.InitializeAsync(cancellationToken, progress);

            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            var xOutputWindow = (IVsOutputWindow) await GetServiceAsync(typeof(SVsOutputWindow));

            var xCosmosPaneGuid = Guid.NewGuid();

            ErrorHandler.ThrowOnFailure(
                xOutputWindow.CreatePane(ref xCosmosPaneGuid, "Cosmos", Convert.ToInt32(true), Convert.ToInt32(true)));
            ErrorHandler.ThrowOnFailure(xOutputWindow.GetPane(ref xCosmosPaneGuid, out var xOutputPane));

            Global.OutputPane = xOutputPane;
            xOutputPane.OutputString($"Debugger windows loaded.{Environment.NewLine}");

            CosmosMenuCmdSet.Initialize(this);
        }