Community
Participate
Working Groups
Build id: I20111207-2118 The Quick Assist menu supports refactorings such as Extract Method, Extract Local Variable, and Inline Local Variable, but not Inline Method. One of the results of the CodingSpectator <http://codingspectator.cs.illinois.edu/> study was that Quick Assist is a preferred method of invoking refactorings. I think that adding Inline Method to Quick Assist would be a natural extension of Quick Assist. However, I didn't find any bug reports on this issue. So, I decided to open one. Steps to Reproduce: 1. Add a class called "C" with the following contents to a Java project: --- // C.java public class C { void m1() { System.out.println("m1"); } void m2() { m1(); } } --- 2. Select "m1" either in the declaration or use of the method and press "CTRL+1". The Quick Assist menu will open but won't propose the Inline Method refactoring.
This feature request is similar to the one in Bug 367672.
Makes sense. We already have a 'Inline local variable' quick assist, and I do not see any reason to not add a 'Inline method' quick assist. Fix would be similar to QuickAssistProcessor.getInlineLocalProposal(...).
Quick Assist/Fix actions are intended to be quick local actions that only change a single file. We won't add refactorings as quick assists if they touch more than one file. We could do something like bug 354147, but just adding all commands one by one as quick assist is not a good strategy.