Summary: | Extract method refactoring provide better default names | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Max Rydahl Andersen <manderse> |
Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | mistria, rgrunber, snjezana.peco |
Version: | 4.19 | Keywords: | bugday, helpwanted |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Max Rydahl Andersen
2021-01-30 19:06:16 EST
Seems like a relatively easy fix. @Roland: does JDT-LS reuse the default proposals from JDT here? If we change that part of JDT, would JDT-LS automatically have access to this enhancement? This rang a bell, and I managed to find https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/162579 , where we did something similar. This is all in org.eclipse.jdt.core.NamingConventions#suggest* . I think for blocks of text there could be some heuristic where the suggestions are based off the last declared variable that is not being referenced in the selected range. The extract method refactoring is copied over into jdt-ls because it's currently sitting under jdt.ui (and not under core.manipulation). |