Papyrus:将图表导出为图像文件时出错

时间:2014-03-25 12:55:54

标签: eclipse eclipse-plugin papyrus

此问题涉及在Ubuntu 12.04上运行的Eclipse Kepler实例。我有一个用例图,我需要将其作为图像文件包含在文档中。我右键单击 .di 文件,选择 导出所有图表 ,然后选择 PDF 作为文件格式。作为回报,我得到一个错误窗口,其中包含以下内容:

  

ExportAll报告

     

原因:
  某些测试的生成失败

在错误日志中提交了一个例外:

  

消息:
  在资源平台生成图表NewDiagram时出错:/resource/EMS-iGUESS_Components/models/UseCasesNew.notation

     

异常堆栈跟踪:
java.lang.IllegalArgumentException:java.awt.BasicStroke的负宽度。(BasicStroke.java:181)     在   org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.graphics.GraphicsToGraphics2DAdaptor.createStroke(GraphicsToGraphics2DAdaptor.java:1544)     在   org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.graphics.GraphicsToGraphics2DAdaptor.drawPolygon(GraphicsToGraphics2DAdaptor.java:633)     在org.eclipse.draw2d.Graphics.drawPolygon(Graphics.java:293)处   org.eclipse.gmf.runtime.draw2d.ui.internal.graphics.ScaledGraphics.drawPolygon(ScaledGraphics.java:356)     在   org.eclipse.papyrus.uml.diagram.usecase.draw2d.StickMan.outlineShape(StickMan.java:62)     在   org.eclipse.papyrus.uml.diagram.usecase.draw2d.ShadowShape.outlineShape(ShadowShape.java:134)     在org.eclipse.draw2d.Shape.paintOutline(Shape.java:175)at   org.eclipse.draw2d.Shape.paintFigure(Shape.java:147)at   org.eclipse.papyrus.uml.diagram.usecase.draw2d.ShadowShape.paint(ShadowShape.java:109)     在org.eclipse.draw2d.Figure.paintChildren(图.java:1167)at   org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1202)at   org.eclipse.draw2d.Figure.paint(Figure.java:1117)at   org.eclipse.draw2d.Figure.paintChildren(Figure.java:1167)at   org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1202)at   org.eclipse.draw2d.Figure.paint(Figure.java:1117)at   org.eclipse.gmf.runtime.diagram.ui.render.clipboard.DiagramGenerator.paintFigure(DiagramGenerator.java:373)     在   org.eclipse.gmf.runtime.diagram.ui.render.clipboard.DiagramGenerator.renderToGraphics(DiagramGenerator.java:226)     在   org.eclipse.gmf.runtime.diagram.ui.render.clipboard.DiagramGenerator.createSWTImageDescriptorForParts(DiagramGenerator.java:721)     在   org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:376)     在   org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:305)     在   org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:123)     在   org.eclipse.papyrus.infra.export.ExportAllDiagrams.exportDiagram(ExportAllDiagrams.java:357)     在   org.eclipse.papyrus.infra.export.ExportAllDiagrams.access $ 3(ExportAllDiagrams.java:354)     在   org.eclipse.papyrus.infra.export.ExportAllDiagrams $ 6.run(ExportAllDiagrams.java:336)     在   org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)     在   org.eclipse.ui.internal.UISynchronizer $ 3.run(UISynchronizer.java:158)     在org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)at   org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)     在   org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3717)     在org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3366)     在   org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine $ 9.run(PartRenderingEngine.java:1113)     在   org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)     在   org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)     在   org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)     在org.eclipse.ui.internal.Workbench $ 5.run(Workbench.java:611)at   org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)     在   org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)     在   org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)     在   org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)     在   org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)     在   org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)     在   org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)     在   org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)     在   org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     在java.lang.reflect.Method.invoke(Method.java:597)at   org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)at at   org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)at at   org.eclipse.equinox.launcher.Main.run(Main.java:1450)at   org.eclipse.equinox.launcher.Main.main(Main.java:1426)

     

会话数据:
  eclipse.buildId = 4.3.2.M20140221-1700
java.version = 1.6.0_26
java.vendor = Sun Microsystems Inc. BootLoader
  常量:OS = linux,ARCH = x86_64,WS = gtk,NL = en_GB框架
  参数:-product org.eclipse.epp.package.standard.product
  命令行参数:-os linux -ws gtk -arch x86_64 -product
  org.eclipse.epp.package.standard.product

这里有什么问题?如何将图表导出为图像文件?感谢。

2 个答案:

答案 0 :(得分:1)

我发现某些元素(如Actors,ReceiveSignal)不接受Line width字段的负值。在这些元素上,您可以在 属性 / 外观 /中将“-1”值替换为“1” 线宽字段

希望它有所帮助...

答案 1 :(得分:0)

将其导出为SVG文件。您可以在浏览器中查看它们并稍后将它们转换为其他格式