简体   繁体   English

Visual Studio 2010中的代码Scratchpad扩展 - 如何?

[英]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.

相关问题 用于格式化代码注释的Visual Studio 2010扩展的示例代码在哪里? - Where is the sample code for the Visual Studio 2010 extension to format code comments? Visual Studio 2010宏程序包或扩展名为重新格式化代码? - Visual Studio 2010 macro package or extension to reformat code? Visual Studio 2010扩展:解析代码,呈现结果 - Visual Studio 2010 extension: parse code, render result 如何在Visual Studio 2010中将自己的扩展名添加到html / aspx代码编辑器的上下文菜单中? - How to add your own extension in Visual Studio 2010 to the context menu of the html/aspx code editor? Visual Studio 2010中的代码覆盖率测试? 怎么样? - Code coverage test in Visual Studio 2010? How? 在Visual Studio 2010中用于代码生成的Visual Studio.Uml.extension.dll在哪里? - where is Visual Studio.Uml.extension.dll for code generation in visual studio 2010? 如何在Visual Studio 2010扩展中获取文本光标的绝对位置 - How to obtain the absolute position of text cursor in Visual Studio 2010 extension 是否有Visual Studio 2010扩展来对方法进行排序? - Is there a Visual Studio 2010 extension to sort methods? Visual Studio 2010异常检查扩展 - Visual Studio 2010 Exceptions checking extension 如何从扩展代码中获取 Visual Studio 扩展版本 - How ot get Visual studio extension version from the extension code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM