How to open the Visual Studio Editor Programmatically in a VSIX project

纵饮孤独 提交于 2020-01-07 09:15:53

问题


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 ?

Thanks


回答1:


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




回答2:


Take a look at AutoFindReplace extension which opens existing files in the editor window. You can download it from the VS Gallery.



来源:https://stackoverflow.com/questions/39414944/how-to-open-the-visual-studio-editor-programmatically-in-a-vsix-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!