| Summary: | [xtend] extract method refactoring | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Steve Ash <stevemash> |
| Component: | Core | Assignee: | Project Inbox <xtend-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jan, sven.efftinge, xtend-inbox |
| Version: | 2.2.0 | ||
| Target Milestone: | M3 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Steve Ash
Cool, thanks for the list. Seems like we did prioritization right so far :-) It also pretty much looks like the stuff I do most often. What do you mean by "create method"? Yes agreed! I was really happy to use the rename successfully :-)
The create method is this: I'm creating a class like:
1 class ZombieScout {
2
3 def scout() {
4 val zombiesFound = isZombiesHere();
5 if (zombiesFound) {
6 startShooting();
7 }
8 }
9}
So as I'm typing (at my highest business-ey level of abstraction) and I get to line #4 no method names isZombiesHere exists. In the java editor, I almost without thinking just hit ctrl+1 and it offers me a quick-fix of "create method isZombiesHere()" which I hit enter, and then it invokes the template allowing me to fill in the param types and names and return types or accept the defaults. Same would be true of line #6 as well. Then once I have my high level scout() method, I go flesh out the private helper isZombiesHere() and startShooting() methods.
This is a pretty big deal for me because I just do it all the time, but maybe that's not very typical. Its only #15 on the lambok list, but like I said-- I think that's mainly because it is worded poorly.
As an FYI: here is the survey its quite comprehensive:
http://www.google.com/url?sa=D&q=https://spreadsheets.google.com/spreadsheet/viewform%3Fformkey%3DdGkxQXVxU3ZDMkpJc0ctd3doSDVyTGc6MQ&usg=AFQjCNHETBxPJCtMOnuyYxlOxTY1yQaegA
I see. Could you do me a favor and copy your description to a separate ticket. Yep- create Bug 364687 First shot commited. Missing parts: - rename of method parameters - methods with type parameters - check parameter order wrt. varargs Parameters renamable, support for type parameters added. Vararg parameters are handed through as arrays anyway, so I can live without the validation. Pushed to MASTER Requested via bug 522520. -M. Requested via bug 522520. -M. |