For several years I've maintained a number of Java projects using the jGRASP IDE. These projects tend have around 20 or so source files apiece. I'm used to the project files (.gpj) being fairly readable in an editor, and around 4 KB in size.
Recently, however, one of them has exploded in size up to 120 KB. Almost the entire size is taken by line 17 which starts off looking like this:
[\012 grasp [\012 legendy -382.20000000000005\012 legendx -408.40909090909116\012 version 1\012 winflags 3\012 eheight 880\012 ewidth 1600\012 iheight 300\012 iwidth 792\012 height 880\012 width 1608\012 wbp 0\012 initlayout 0\012 yoffs 12.149360103651361\012 xoffs 1.0597621285392052\012 scale 0.8333333333333334\012 args ""\012 otherflags 139\012 shallowjar 1\012 visflags 118423807\012 ]\012 directed 1\012 node [\012 ClassInfo [\012 fields "$VALUES\\011[LAlignment;\\011\\0114122\\011\\011\\011Alignment\011Chaotic\\011LAlignment;\\011\\01116409\\011\\011\\011Alignment\011Lawful\\011LAlignment;\\011\\01116409\\011\\011\\011Alignment\011Neutral\\011LAlignment;\\011\\01116409\\011\\011\\011Alignment\011Alignment\\011(Ljava/lang/String;I)V\\011c\\0112\\011\\011()V\\011Alignment\011<clinit>\\011()V\\011\\0118\\011\\011\\011Alignment\011getFromChar\\011(C)LAlignment;\\011\\0119\\011\\011\\011Alignment\011random\\011()LAlignment;\\011\\0119\\011\\011\\011Alignment\011valueOf\\011(Ljava/lang/String;)LAlignment;\\011\\0119\\011\\011\\011Alignment\011values\\011()[LAlignment;\\011\\0119\\011\\011\\011Alignment"\012
And it goes on like that for over 100K characters worth.
Why did this particular project file blow up on me, and how can I reset it or clear it out so it's not taking so much space and breaking my diff tools?
That's the layout for the UML diagram, which is stored with the project. If you have a lot of files or last displayed the UML with referenced Java classes included, that can get large.
I have a project with 90 files for which UML was generated, and the project file is 77K. If your project is smaller than that, you can probably display UML, turn off "View" -> "Visible Objects" -> "External References" and save the project and it should shrink.