[英]A Code Scratchpad Extension in Visual Studio 2010 - How to?
Maybe it's somehow freaky, but I'd like to write an extension for Visual Studio 2010, which mimics the behavior of the Command Window in Visual Foxpro. 也许它有点奇怪,但我想为Visual Studio 2010编写一个扩展,它模仿Visual Foxpro中命令窗口的行为。 For those of you who don't know about it:
对于那些不了解它的人:
In Foxpro, you could enter code in the command window, which got executed directly. 在Foxpro中,您可以在命令窗口中输入代码,该代码直接执行。 This way, you where able to try things out without messing with your project or "real code".
通过这种方式,您可以在不弄乱项目或“真实代码”的情况下尝试。 And you had some kind of Intellisense.
你有某种Intellisense。 If you created an object via CREATEOBJECT, you got an Intellisense with all available methods and functions in the next step.
如果您通过CREATEOBJECT创建了一个对象,那么您将在下一步中获得包含所有可用方法和函数的Intellisense。 Somehow like a Code Scratchpad.
不知何故像Code Scratchpad。 This is something I'm missing in VS 2010.
这是我在VS 2010中缺少的。
I've seen the EditorToolwindow - Demo from the Visual Studio 2010 SDK, but I'd like to have a Syntax Highlighter and Intellisense, and provide my own logic for dealing with the code in this window, eg on-the-fly execution etc. A little bit like LINQPad. 我已经看过EditorToolwindow - 来自Visual Studio 2010 SDK的Demo,但是我想要一个语法高亮显示器和智能感知器,并提供我自己的逻辑来处理这个窗口中的代码,例如即时执行等有点像LINQPad。
Does anyone have an idea how I could accomplish this? 有谁知道我怎么能做到这一点?
Have a look at Jon Skeet's Snippy utility which allows you to execute dot net code in a stand alone editor. 看看Jon Skeet的Snippy实用程序,它允许您在独立编辑器中执行点网络代码。 There is also a Snippy Reflector add-in .
还有一个Snippy Reflector插件 。
You could take a look through reflection to see how Snippy was built and go from there. 您可以通过反射来了解Snippy是如何构建的并从那里开始。 Or just use it on it's own merit.
或者只是根据它自己的优点使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.