在的CodeRush using`的`自动ADITION [英] Automatic adition of `using` in CodeRush

查看:199
本文介绍了在的CodeRush using`的`自动ADITION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚安装的CodeRush临(试用评测)的Visual Studio,我可以说我喜欢它很多至今。比较ReSharper的只有一种类型的功能,我真的错过。它是采用的方式与的CodeRush 交易。当我键入未在使用中列出的一些包声明一些类名,的CodeRush强调它的红色为一个错误(它是什么),但如果我在它悬停光标不给我用的添加,它只是说,是未声明的元素。

I just installed CodeRush Pro (evaluation trial) for Visual Studio and I can say I like it much so far. Comparing to Resharper there is only one type of feature I'm really missing. It is the way CodeRush deals with using. When I type some class name that is not declared in some package listed in using, CodeRush underlines it red as an error(what it is) but if I hover over it with cursor it does not offer me to add using, it merely says it is "Undeclared element".

我在使用除(移动插入符标识VS默认使用,悬停光标置于下的第一个字母看起来非常小框,单击出现的按钮,并选择例如使用系统形成一个下拉菜单)。

I have to use VS default using addition (move caret to the identifier, hover cursor over that really small box that appears under first letter, click the button that appears and choose for example using System form a drop down menu).

有没有办法如何的CodeRush配置提供英里添加使用,当我悬停一个光标放在突出了问题(即表示未申报的元素)?

Is there a way how to configure CodeRush to offer mi add using when I hover a cursor over highlighted "issue"(that says Undeclared element)?

这样做的第二部分是ReSharper的已somethink所谓的类型名称完成的。它的一些改进的智能感知。比方说你没有使用在文件声明。然后你输入像 ICompar ,然后按Ctrl +空格键。原因也不会有意见。但随着ReSharper的你可以按下CTRL + ALT +空格键,你会得到各阶层的建议与 ICompar 开始,即使他们不使用。当你选择其中一个正确使用自动为你添加。

The second part of this is that Resharper has somethink called Type name completion. It some improved intellisense. Lets say you have no using declaration in your file. Then you type something like ICompar and press CTRL+SPACE. Of cause there will be no suggestions. But with Resharper you can press CTRL+ALT+SPACE and you get suggestions of all classes starting with ICompar even if they are not in using. When you choose one of them the correct using is automatically added for you.

有没有一种方法,使的CodeRush这样的行为?

Is there a way to make CodeRush behave this way ?

推荐答案

第一部分

的Visual Studio

默认情况下VS机制,你提的是使用Ctrl +周期跳闸或Shift + Alt + F10

The default VS mechanism you mention is tripped using Ctrl+Period or Shift+Alt+F10

的CodeRush模板

让我引用马克·米勒(的CodeRush总设计师)此部分:

Let me quote Mark Miller (Chief architect of CodeRush) for this part:

的CodeRush模板(如类固醇VS代码段)根据需要,将增加的命名空间,所以如果你使用模板来创建类,方法,变量,属性,事件,并键入引用然后命名空间引用将被自动添加,你会很少需要使用VS功能添加命名空间。要开始使用我们推荐对接的CodeRush培训窗口中的模板(的DevExpress |工具的Windows |的CodeRush)到编辑器的一侧,检查您可以用它来生成所需的代码提示和模板,培训窗口。只需键入模板,因为它在窗口中显示出来,并使用空格键展开它。

尝试V系列,M系列, ,N系列和T系列

Try the v-series, the m-series, the n-series and the t-series.

所以,我的意思是:


  • 启动的CodeRush培训窗口(DevExpress\Tool Windows\CodeRush)

  • 它停靠到左侧

  • 回到编辑

  • 类型v(不含引号)

    • 小心这是的背景敏感

      • 尝试此同时插入符号是一类。

      • 尝试这个,而插入符是一个方法。

      • Launch the CodeRush training window (DevExpress\Tool Windows\CodeRush)
      • Dock it to the left
      • Back to the editor
      • Type 'v' (no quotes)
        • Careful this is context sensitive
          • Try this whilst the caret is in a class.
          • Try this whilst the caret is in a method.

          那是你的介绍了v系列的模板。

          That was your introduction to the v-series of templates.

          随时检查出来的M系列,N系列和T系列。

          Feel free to check out the m-series, the n-series and the t-series.

          另外请注意,培训窗口还提供建议,当你在一个空行。

          Also note that the training window also provides suggestions when you are on a blank line.

          社区插件

          有什么内置的CodeRush提供添加使用这种类型的功能。

          There is nothing built into CodeRush which provides "Add using for this type" functionality.

          然而,有许多社区插件其各种功能添加到的CodeRush。这种可扩展性是的CodeRush的最佳功能之一。

          However there are numerous Community Plugins which add all sorts of functionality to CodeRush. This extensibility is one of the best features of CodeRush.

          在特定的 Refactor_Resolve 具有的功能,可能接近你的描述。

          One plugin in particular Refactor_Resolve has functionality that might come close to what you describe.

          第二部分

          我不相信有任何提供增强的智能感知通过的CodeRush在这个时候。

          I don't believe there are any intellisense enhancements provided by CodeRush at this time.

          对不起

          这篇关于在的CodeRush using`的`自动ADITION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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