Project: JDT
Bug 105651 [quick fix] Create getter for unused field
Reported: 2005-08-01 02:20:03 | Status: resolved fixed

Hi all, A nice to have would be 'quick fix' to automatiically generate a getter when a field is, currently unused. public class MyClass { private int field; // unused field } click on lightbulb, select "Generate getter" would result in public class MyClass { private int field; // warning gone public int getField() { return field; } } ----- *Thanks* all for the great work. Eclipse gets better and better. I have to use an old version (WSAD) at work and boy do I notice the difference!

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/GetterSetterCorrectionSubProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java