|
|
|
Note: a key poroblem for the user is that even if (s)he is aware of the bug, when looking at a very large codebase it is not immediately obvious how many files are under each node in the tree, nor how "deep" to go in trying to divide the tree up into reformattable chunks. The result is that either the user must investigate carefully, or guess, but if guesses are taken there is a good chance that IDEA will freeze, which means killing it from the task manager and restarting it. This is quite frustrating.
I'm not sure why this has been open for so long, but in the interests of getting it fixed I'm going to give exact instructions for getting a "problem project" up quickly.
Using Sun JDK 1.5.0_11, installed in (for example) C:\Program Files\Java\jdk1.5.0_11: (2) Create a "src" directory under that directory, and copy the contents of the src.zip file in the jdk directory into that directory (3) Create a "lib" directory as a sibling or src. Go to C:\Program Files\Java\jdk1.5.0_11\jre\lib and do a search for all .jar files in that directory and subdirectories. Copy them all to the newly created lib directory. This list must include rt.jar. (4) You will need to delete two packages from the src tree because they don't compile. These are (5) Create a "classes" directory as a sibling to "src" at "lib" for output. (6) In IDEA, make sure that the exact same version of the JDK is available and set up as a JDK, i.e. 1.5.0_11 in this example. Create a new project "from existing sources" in the project directory. (7) under compiler settings, set the heap size to 1024. (8) try compiling. It should work fine. (9) Now try reformatting. Observe the problem. To see the problem manisfest in a less dire fashion, pic a directory that is merely large, e.g. the org package at the top level. This keeps my machine busy for about 4 minutes before completing successfully. With IntelliJ 8.0 build#9013 and JDK 1.6.0_10 I can now reformat the entire javax.swing directory in 10 minutes, which is an improvement as I've never seen this succeeed before. However, for most of that time the GUI is frozen.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The attempt to reformat this package by its subpackages processing one-by-one works perfectly.
With changed vmoptions (i've tried
-Xms128m
-Xmx1024m
-XX:MaxPermSize=128m )
the java package is processed normally, but for the whole project i had to kill idea after ~1 hour.