为什么我的 jGRASP 项目文件如此臃肿?

Why is my jGRASP project file so bloated?

几年来,我使用 jGRASP IDE 维护了许多 Java 个项目。这些项目往往每个都有大约 20 个左右的源文件。我已经习惯了项目文件 (.gpj) 在编辑器中的可读性,大小约为 4 KB。

然而,最近其中一个文件的大小激增至 120 KB。几乎整个大小都由第 17 行占用,它开始看起来像这样:

[2 grasp [2 legendy -382.200000000000052 legendx -408.409090909091162 version 12 winflags 32 eheight 8802 ewidth 16002 iheight 3002 iwidth 7922 height 8802 width 16082 wbp 02 initlayout 02 yoffs 12.1493601036513612 xoffs 1.05976212853920522 scale 0.83333333333333342 args ""2 otherflags 1392 shallowjar 12 visflags 1184238072 ]2 directed 12 node [2 ClassInfo [2 fields "$VALUES\011[LAlignment;\011\0114122\011\011\011Alignment1Chaotic\011LAlignment;\011\01116409\011\011\011Alignment1Lawful\011LAlignment;\011\01116409\011\011\011Alignment1Neutral\011LAlignment;\011\01116409\011\011\011Alignment1Alignment\011(Ljava/lang/String;I)V\011c\0112\011\011()V\011Alignment1<clinit>\011()V\011\0118\011\011\011Alignment1getFromChar\011(C)LAlignment;\011\0119\011\011\011Alignment1random\011()LAlignment;\011\0119\011\011\011Alignment1valueOf\011(Ljava/lang/String;)LAlignment;\011\0119\011\011\011Alignment1values\011()[LAlignment;\011\0119\011\011\011Alignment"2

就这样继续下去,超过 10 万个字符。

为什么这个特定的项目文件在我身上爆炸了,我该如何重置或清除它,以免占用太多 space 和破坏我的 diff 工具?

这是与项目一起存储的 UML 图的布局。如果您有很多文件或最后显示了包含引用 Java 类 的 UML,那么它可能会变大。

我有一个项目,其中包含 90 个生成 UML 的文件,项目文件为 77K。如果你的项目比那个小,你可能可以显示 UML,关闭“视图”->“可见对象”->“外部引用”并保存项目,它应该会缩小。