Project: JDT
Bug 46923 Introduce Factory: Preview doesn't work sometimes
Reported: 2003-11-19 05:00:03 | Status: resolved fixed

I20031119 The preview doesn't work when introducing a factory method on this example: public class HelloWorld { private static HelloWorld instance; public static void main(String [] args) { instance= new HelloWorld(); instance.run(); } private HelloWorld() { } private void run() { } } The factory method is introduced correctly, though. It must have something to do with the constructor being private; if it is public, the preview appears as expected.

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/textmanipulation/GroupDescription.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/TextChange.java org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeElementContentProvider.java