如何在 VSIX 项目中以编程方式打开 Visual Studio 编辑器 [英] How to open the Visual Studio Editor Programmatically in a VSIX project

查看:62
本文介绍了如何在 VSIX 项目中以编程方式打开 Visual Studio 编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个 VSIX(Visual Studio 扩展)项目,我正在从服务中获取 html 文本.我需要在 Visual Studio 编辑器中打开检索到的 html 文本.关于如何实现它或任何示例代码的任何想法?

I am working on a VSIX(Visual Studio Extension) project where I am fetching html text from a Service. I need to open the retrieved html text in the Visual Studio Editor. Any idea on how to achieve it or any sample code ?

谢谢

推荐答案

您可以将文本保存为 .html 文件,然后在 VS 编辑器中使用 DTE.ItemOperations.OpenFile(file);

You can save the text to a .html file and then open it in the VS editor with DTE.ItemOperations.OpenFile(file);

这篇关于如何在 VSIX 项目中以编程方式打开 Visual Studio 编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆