如何在 VSIX 项目中以编程方式打开 Visual Studio 编辑器
How to open the Visual Studio Editor Programmatically in a VSIX project
我正在开发一个 VSIX(Visual Studio 扩展)项目,从服务中获取 html 文本。我需要在 Visual Studio 编辑器中打开检索到的 html 文本。关于如何实现它或任何示例代码的任何想法?
谢谢
您可以将文本保存到 .html 文件,然后使用 DTE.ItemOperations.OpenFile(file);
在 VS 编辑器中打开它
看看AutoFindReplace extension which opens existing files in the editor window. You can download it from the VS Gallery。
我正在开发一个 VSIX(Visual Studio 扩展)项目,从服务中获取 html 文本。我需要在 Visual Studio 编辑器中打开检索到的 html 文本。关于如何实现它或任何示例代码的任何想法?
谢谢
您可以将文本保存到 .html 文件,然后使用 DTE.ItemOperations.OpenFile(file);
看看AutoFindReplace extension which opens existing files in the editor window. You can download it from the VS Gallery。