So how are people finding the refactoring tools in JADE 7?
I find binding the refactor (rename / change) operation to a shortcut key especially useful.
- Dr Danyo
I'm really enjoying being able to type the name of a new variable in-line in the code, and then use the Ctrl+F2 context menu to "automatically" create it as a new local variable without losing my current context in the code. Saves having to go back up to the vars section, add the new variable, and then reposition back to the place in the code where you actually wanted to use it.
Cheers,
BeeJay.
More useful would be a language extension that allowed us to have actual "inline" methods as you do in C++. An additional JADE method call can be an expensive affair if put in a critical piece of code, a tight loop or deeply nested recursion. So we end us sacrificing maintainability, ease of reading and ease of refactoring in favour of performance. It would be nice to not have to do that. Inline methods would be one way to have the best of both worlds (with some caveats, of course).I agree, that is a very useful feature, it definitely allows you to flow more when coding, the same goes for promote to parameter or class property.
I typically remap the keys to something a little easier to reach than Ctrl+F2.
Would you find an "inline" refactor useful?
Hi Allistar,More useful would be a language extension that allowed us to have actual "inline" methods as you do in C++. An additional JADE method call can be an expensive affair if put in a critical piece of code, a tight loop or deeply nested recursion. So we end us sacrificing maintainability, ease of reading and ease of refactoring in favour of performance. It would be nice to not have to do that. Inline methods would be one way to have the best of both worlds (with some caveats, of course).I agree, that is a very useful feature, it definitely allows you to flow more when coding, the same goes for promote to parameter or class property.
I typically remap the keys to something a little easier to reach than Ctrl+F2.
Would you find an "inline" refactor useful?
I'm still using Jade 6.3 and always use Shift-F11 to achieve the same result, as long as the selected token resolves to a class. Shift-F11 also works for methods and other entities.Only slightly related to refactoring, but I'm also really enjoying when you use F4 to find a class that is inherited from a superschema that you can use the "New Browser" button so that it opens that class in a new class browser window with a schema context of the schema in which the class is actually defined!!
Very useful when your current context is say your view schema and you want to open a model schema class, or some other "base schema" class.
Cheers,
BeeJay.
Return to “Tips and Techniques”
Users browsing this forum: No registered users and 10 guests