1

我已经定义了 DiagramWithPrintGlobalActionHandlerProvider 来打印我的 GMF 图编辑部分。但不知道为什么我在打印图表时内存不足。请检查以下异常:-

!ENTRY org.eclipse.gmf.runtime.diagram.ui.printing 2 5 2018-02-17 13:42:41.942
!MESSAGE Java heap space
!STACK 0
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:3544)
    at java.util.Arrays.copyOf(Arrays.java:3515)
    at java.util.ArrayList.grow(ArrayList.java:272)
    at java.util.ArrayList.ensureExplicitCapacity(ArrayList.java:246)
    at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:238)
    at java.util.ArrayList.add(ArrayList.java:469)
    at org.eclipse.gmf.runtime.diagram.ui.printing.render.internal.JPSDiagramPrinter.printToScale(JPSDiagramPrinter.java:235)
    at org.eclipse.gmf.runtime.diagram.ui.printing.render.internal.JPSDiagramPrinter.doPrintDiagram(JPSDiagramPrinter.java:491)
    at org.eclipse.gmf.runtime.diagram.ui.printing.render.internal.JPSDiagramPrinter.run(JPSDiagramPrinter.java:171)
    at org.eclipse.gmf.runtime.diagram.ui.printing.internal.util.DiagramPrinterHelper.printDiagrams(DiagramPrinterHelper.java:73)
    at org.eclipse.gmf.runtime.diagram.ui.printing.render.internal.JPSDiagramPrinterHelper.printWithSettings(JPSDiagramPrinterHelper.java:123)
    at com.arcadsoftware.diagram.ui.providers.SampleDiagramWithPrintGlobalActionHandler$1.doPrint(SampleDiagramWithPrintGlobalActionHandler.java:82)
    at com.arcadsoftware.diagram.ui.providers.SampleDiagramWithPrintGlobalActionHandler.doPrint(SampleDiagramWithPrintGlobalActionHandler.java:135)
    at org.eclipse.gmf.runtime.diagram.ui.printing.providers.DiagramWithPrintGlobalActionHandler.getCommand(DiagramWithPrintGlobalActionHandler.java:48)
    at org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction.doRun(GlobalAction.java:109)
    at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:359)
    at org.eclipse.gmf.runtime.common.ui.action.ActionManager$1.run(ActionManager.java:225)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:223)
    at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:377)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:782)
    at org.eclipse.jface.action.ActionContributionItem$9.handleEvent(ActionContributionItem.java:1293)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
    at org.eclipse.equinox.launcher.Main.main(Main.java:14

38)

这是 GMF 中的已知错误吗?请建议。

4

0 回答 0