There is no java refactor action: "extract to method"
@torzsmokus - we need issues to be documented with specificity. Features like refactoring are not instantly ported and have to be moved one at a time. So please, write full feature as separate issue for tracking and resolution.
I will reopen this issue we've consider it as important for developer experience i will be part of big #5529
With Extract Method feature, we can make code more clearer, a code fragment that can be grouped together and can be reused in other places
Example of usage:
before:
void printOwing() {
printBanner();
//print details
System.out.println ("name: " + _name);
System.out.println ("amount " + getOutstanding());
}
after:
void printOwing() {
printBanner();
printDetails(getOutstanding());
}
//extracted method
void printDetails (double outstanding) {
System.out.println ("name: " + _name);
System.out.println ("amount " + outstanding);
}
@vparfonov @sunix
This is definitely important task but
Can we consider removing it from MUST HAVE list of #5529 ?
WDYT?
FYI. this is being added to jdt.ls https://github.com/eclipse/eclipse.jdt.ls/pull/381
If this is being added to jdt ls, and
if we are going to switch to jdt ls
then it's not worth it spending time in implementing this
Will be done in https://github.com/eclipse/che/issues/6157
Most helpful comment
With Extract Method feature, we can make code more clearer, a code fragment that can be grouped together and can be reused in other places
Example of usage:
before:
after: