示例#1
0
        private void OpenTextInNewTab(string text)
        {
            TempFileManager.PurgeOldTempFiles();
            var path = TempFileManager.GetTempFileFullPath();

            var formattedText = JsonFormatter.FormatIfPossible(text);

            File.WriteAllText(path, formattedText);

            VsExtensionHelper.OpenFile(path);
        }
示例#2
0
        private void OpenTextInNewTab(string text)
        {
            string errorMessage;
            var    formattedText = new JsonFormatter().FormatIfPossible(text, out errorMessage);

            TempFileManager.PurgeOldTempFiles();
            var path = TempFileManager.GetTempFileFullPath();

            File.WriteAllText(path, formattedText);

            DTEHelper.OpenFile(path);
        }