DevExpress通过Javascript重构获得了多远? [英] How far did DevExpress get with Javascript refactoring?

查看:135
本文介绍了DevExpress通过Javascript重构获得了多远?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一年以前,我记得看到一个DevExpress传播者预览或者至少在Visual Studio shell中推广丰富的Javascript重构(超出限定的智能感知),我记得了CodeRush / DevExpress产品系列的一部分。我很兴奋。



今天检查(lmgtfy)我可以找到只有非常有限的参考,只有一个关于测试版的小的斜体线在产品描述,没有视频,没有博客文章,没有社区嗡嗡声。是否掉线?雾件?执行不好,他们甚至不推广它?



在过去10年里,Javascript可以说是最流行的编程语言,并且在几乎每台机器上都有一个虚拟机,为什么编辑支持如此差? (与Java和C#相比)?你看到ScottGu吹牛的样子,我们现在有了jQuery intellisense,但是将其与IDE中丰富的C#支持进行比较,这是一个笑话。有人曾经说过,因为有很多风格的写作,一个丰富的IDE(超越智能感知)与重构支持是困难的,但是如果几个引擎可以解释/编译JS结果肯定应该很难分析,以支持像重命名变量,提取方法,移动到另一个命名空间(或它的JS minic)等等东西。我错了吗?

解决方案

CodeRush支持五十二个JavaScript重构:




  • 添加块分隔符

  • 添加参数

  • Break Apart Arguments

  • Break Apart Parameters

  • 条件

  • 组合条件(嵌套)

  • 组合条件(并行)

  • 压缩作业

  • 压缩到三元表达式

  • 连接字符串

  • 有条件

  • 创建多变量声明

  • 创建超载

  • 创建Setter方法

  • 使用声明创建

  • 展开作业

  • 展开三元表达式

  • 提取方法

  • 有条件的平铺

  • For Forach

  • ForEach to For

  • 有条件地初始化

  • 内联最近作业

  • 内联结果

  • 内联温度

  • 内置语句

  • 介绍本地

  • 介绍本地(全部替换)

  • 引入结果变量

  • 阵容参数

  • 阵容参数

  • 移动声明接近参考

  • 将初始化移动到声明

  • 促进参数

  • 删除块分隔符

  • 删除参数

  • 删除有条件的冗余

  • 重命名本地

  • 重新排序参数

  • 用查询替换Temp

  • 替换为本地


  • 简化表达式

  • 拆分条件

  • 拆分条件(和重复的其他块)

  • 从声明中拆分初始化

  • 拆分多变量声明

  • 拆分字符串

  • 拆分临时变量

  • 拆分声明

  • 扩大范围

  • 扩大范围(促销到字段)



八个消费者声明和快速修复功能:




  • 添加合约

  • 添加其他声明

  • 声明字段

  • 声明本地

  • 镜像代码

  • 反向循环

  • 旋转90度

  • 拼写Checker



此外,我们正在努力改进10.2版本的重构支持。我们最近也改进了Quick Nav,以便导航到JavaScript函数,就像C#或VB中的导航一样简单。这种改进将在10.2中发布,但现在可供CodeRush客户在日常生活中使用。



全面披露 - 我领导DevExpress的CodeRush团队。


Over a year ago, I remember watching one of DevExpress evangelists previewing or at least promoting rich Javascript refactoring (beyond just limited intellisense) within the Visual Studio shell, I recall part of CodeRush/DevExpress product line. I was excited.

On checking today (lmgtfy) I can find only very very limited reference to it, just one small italtic line about beta in product description, no videos, no blog posts, no community buzz. Was it dropped? Vapourware? Poor implementation that they dont even promote it?

With Javascript arguably the most popular programming language ever and with a VM for it on practically every machine in last 10 years, why is editor support so poor? (Compared with those for Java and C#)? You see the likes of ScottGu bragging we now have jQuery intellisense but compare this to richness of C# support in the IDE it is a joke.

Someone once said since there are many style of writing Javascript a rich IDE (beyond intellisense) with refactoring support is difficult, but if several engines can interpret/compile JS with same result surely it should be hard to analysis it to support stuff like rename variable, extract method, move to another namespace (or JS minic of it), etc.. Am I wrong?

解决方案

CodeRush supports fifty-two JavaScript refactorings:

  • Add Block Delimiters
  • Add Parameter
  • Break Apart Arguments
  • Break Apart Parameters
  • Case to Conditional
  • Combine Conditionals (nested)
  • Combine Conditionals (parallel)
  • Compress Assignment
  • Compress to Ternary Expression
  • Concatenate Strings
  • Conditional to Case
  • Create Multi-variable Declaration
  • Create Overload
  • Create Setter Method
  • Create With Statement
  • Expand Assignment
  • Expand Ternary Expression
  • Extract Method
  • Flatten Conditional
  • For to ForEach
  • ForEach to For
  • Initialize Conditionally
  • Inline Recent Assignment
  • Inline Result
  • Inline Temp
  • Inline With Statement
  • Introduce Local
  • Introduce Local (replace all)
  • Introduce Result Variable
  • Line-up Arguments
  • Line-up Parameters
  • Move Declaration Near Reference
  • Move Initialization to Declaration
  • Promote to Parameter
  • Remove Block Delimiters
  • Remove Parameter
  • Remove Redundant Conditional
  • Rename Local
  • Reorder Parameters
  • Replace Temp with Query
  • Replace with Local
  • Reverse Conditional
  • Simplify Expression
  • Split Conditional
  • Split Conditional (and duplicate else block)
  • Split Initialization from Declaration
  • Split Multi-variable Declaration
  • Split String
  • Split Temporary Variable
  • Split With Statement
  • Widen Scope
  • Widen Scope (promote to field)

And eight consume-first declaration and quick fix features:

  • Add Contract
  • Add Else Statement
  • Declare Field
  • Declare Local
  • Mirror Code
  • Reverse For Loop
  • Rotate 90 Degrees
  • Spell Checker

Also, we're working to improve our refactoring support for the 10.2 release. We've also recently improved Quick Nav to make navigating to JavaScript functions as easy as navigation in C# or VB. This improvement will ship in 10.2 but is available now for CodeRush customers in a daily build.

Full Disclosure -- I lead the CodeRush team at DevExpress.

这篇关于DevExpress通过Javascript重构获得了多远?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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