可以修改变量名称的 Visual Studio 扩展
我正在尝试构建一个 Visual Studio(不是 VSCode)扩展,它可以从工具菜单启动,并且可以在代码中重写变量名称。然而,在扩展编辑器文档(分类器、装饰等)时,我没有找到我要找的东西。
我所知道的:
- 我知道如何将命令添加到工具菜单
- 我可以打印出状态消息来调试我正在做的任何
事情 我不知道:
- 访问当前正在 Visual Studio 中编辑的文件
- 获取访问 ?
- 如果有方法可以区分局部变量名称、方法名称等...
我将如何解决这个问题
I'm trying to build a Visual Studio(not VSCode) extension that can be started from the tools menu and can write over variable names in code. However, while looking around extending the editor documentation(classifier, adornments etc.), I didn't find what I'm looking for.
What I do know:
- I figured out how to add command to the tools menu
- I can print out a status message for debugging whatever I'm doing
What I don't know:
- Getting access to the file currently being edited in Visual Studio
- Getting access to the code inside of it
- If there are methods available to differentiate local variable names, method names, etc...
How would I go about this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论