Beispiel #1
0
        public int SetName(string pszPaneName)
        {
            var result = target.SetName(pszPaneName);

            if (ErrorHandler.Failed(result))
            {
                throw new Win32Exception(result);
            }

            return(result);
        }
Beispiel #2
0
        public LogService(AWPackage package, IVsOutputWindowPane vsOutputWindowPane)
        {
            _package            = package;
            _vsOutputWindowPane = vsOutputWindowPane;

            _vsOutputWindowPane.SetName(AWPackage.NAME_CS_PLUGIN);
            bool activate = false;

#if DEBUG
            LogLevel = EErrorLevel.Debug;
            activate = true;
#endif
            // say hello
            Log(AWPackage.NAME_CS_PLUGIN + " " + getCurrentVersion() + " running", EErrorLevel.Info, activate);
        }
Beispiel #3
0
        protected override void WriteLine(string format, params object[] args)
        {
            if (outputPane == null)
            {
                var output          = (IVsOutputWindow)Package.GetGlobalService(typeof(SVsOutputWindow));
                var generalPaneGuid = VSConstants.GUID_OutWindowGeneralPane;

                if (ErrorHandler.Failed(output.GetPane(ref generalPaneGuid, out outputPane)) || outputPane == null)
                {
                    if (ErrorHandler.Failed(output.CreatePane(ref generalPaneGuid, "Global Command Capture Output", 1, 1)))
                    {
                        statusBar.SetText("Attempt to create output pane failed");

                        Stop();

                        return;
                    }

                    if (ErrorHandler.Failed(output.GetPane(ref generalPaneGuid, out outputPane)) || outputPane == null)
                    {
                        statusBar.SetText("Attempt to get output pane failed");

                        Stop();

                        return;
                    }
                }

                outputPane.SetName("Global Command Capture Output");

                WriteLine(format, args);
            }
            else
            {
                outputPane.OutputStringThreadSafe(string.Format(format + "\r\n", args));
            }
        }
Beispiel #4
0
 public void SetName(string text)
 {
     _pane.SetName(text);
 }