More javascript refactor

I believe IDEA's javascript plugin is out of comparison with other IDEs from many perspectives, but right now there's really very few facting patterns available for javascript codes ( despite the existence of quite complete AST ), I guess you're already planning some in the dev , I just share a wish list here:

  1. Transform between function declarition and function assigment:
  2. function refactor(){} <-> var refactor = function(){};

  3. Moving function ( as object definition ):
  4. function refactor(){}
    //OR
    var refactor = function(){};

    ->

    obj = {
      refactor : function(){}
    };

  5. Moving function ( as object assignment ):
  6. function refactor(){} //OR var refactor = function(){}; -> obj.refactor = function(){};

  7. Moving closure ( change scope ):
    1. function outter() { var private; function inner() { private; } inner(); } -> function inner( private ) { private; }
      function outter() { var private; var private( private ); }

Please sign in to leave a comment.