0

只是试图从给定的 UML 模型转换为 Ecore 模型。在此之后,我试图创建一个生成器模型。

每次我尝试这样做时,我都会收到错误消息,表明此日志存在“未处理的事件循环异常”:

org.eclipse.swt.SWTException:无法在 org.eclipse.swt.SWT.error(SWT.java) 的 org.eclipse.swt.SWT.error(SWT.java:3884) 处执行可运行 (java.lang.NullPointerException) :3799) 在 org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137) 在 org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885) 在 org.eclipse.swt.widgets。 Display.readAndDispatch(Display.java:3506) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org .eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316) at org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63 ) 在 org.eclipse.draw2d.SWTEventDispatcher 的 org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873)。dispatchMousePressed(SWTEventDispatcher.java:214) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) at org.eclipse .swt.widgets.EventTable.sendEvent(EventTable.java:84) 在 org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) 在 org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java :3910) 在 org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) 在 org.eclipse.ui.internal 的 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)。 Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)在 org.eclipse.ui 的 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)。internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java: 113) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppHandle.run(EclipseAppHandle.java:194) .core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) 在 org.eclipse.core.runtime.adaptor .EclipseStarter.run(EclipseStarter.java:179) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 在 sun.reflect.DelegatingMethodAccessorImpl。在 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) 在 org.eclipse.equinox.launcher.Main.basicRun 的 java.lang.reflect.Method.invoke(Unknown Source) 调用(Unknown Source) (Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) 原因:org.eclipse.emf.converter.util.ConverterUtil.computeRequiredPackages(ConverterUtil) 中的 java.lang.NullPointerException .java:374) 在 org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage.validate(ModelConverterPackagePage.java:965) 在 org.eclipse.emf.importer.ui.contribution.base.ModelImporterPackagePage.validate(ModelImporterPackagePage .java:101) 在 org.eclipse.emf.converter.ui.contribution.base.ModelConverterPackagePage$1.run(ModelConverterPackagePage.java:155) 在 org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)在 org.eclipse.swt.widgets。Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 34 更多

在此之后,此文本出现另一个异常:“无法创建编辑器 ID org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditorID:引发了意外异常。”

会话数据显示:eclipse.buildId=unknown java.version=1.6.0_13 java.vendor=Sun Microsystems Inc. BootLoader 常量:OS=win32, ARCH=x86, WS=win32, NL=de_DE 框架参数:-product org. eclipse.epp.package.modeling.product 命令行参数:-os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.modeling.product -consoleLog

有了这个长日志:

java.lang.NullPointerException at org.eclipse.emf.ecore.util.EcoreUtil.getURI(EcoreUtil.java:2887) at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.diagnose(GenModelImpl.java:2930 ) 在 org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.initialize(GenModelEditor.java:596) 的 org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.validate(GenModelEditor.java:1773) ) 在 org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:357) 上的 org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModelEditor.createPages(GenModelEditor.java:1080)。 ui.internal.EditorReference.createPartHelper(EditorReference.java:662) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) 在 org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857) 在 org.eclipse.ui.internal.WorkbenchPage 的 org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286) .busyOpenEditor(WorkbenchPage.java:2762) 在 org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754) 在 org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705) 在org.eclipse.swt.custom.BusyIndi​​cator.showWhile(BusyIndi​​cator.java:70) 在 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701) 在 org.eclipse.ui.internal.WorkbenchPage.openEditor( WorkbenchPage.java:2685) 在 org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668) 在 org.eclipse.emf.converter.ui.contribution.base.ModelConverterWizard.openEditor(ModelConverterWizard.java:318)在 org.eclipse.emf.importer.ui。org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752) at org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$ 上的contribution.base.ModelImporterWizard.performFinish(ModelImporterWizard.java:167) RunWizardAction$1.finishPressed(DashboardMediator.java:311) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)在 org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) 在 org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 在 org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1003) 在 org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) 在 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) 在 org.eclipse。 jface.window.Window.runEventLoop(Window.java:825) 在 org.eclipse.jface.window.Window.open(Window.java:801) 在 org.eclipse.gmf.internal.bridge.ui.dashboard.DashboardMediator$RunWizardAction.run(DashboardMediator.java:316) 在 org.eclipse.gmf。 internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63) at org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:873) at org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java :214) 在 org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) 在 org.eclipse.swt.widgets 的 org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513)。 EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org .eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) 在 org.eclipse.ui.internal.Workbench 的 org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) 的 org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) .access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332 ) 在 org.eclipse.ui.internal.ide.application 的 org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 的 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)。 IDEApplication.start(IDEApplication.java:113) 在 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher. java:110) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher。开始(EclipseAppLauncher.java:79)在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 在 java.lang.reflect.Method.invoke(Unknown Source)在 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) 在 org.eclipse.equinox.launcher.Main.run (Main.java:1311)在 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 在 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 在 java.lang.reflect.Method.invoke(Unknown Source) 在 org.eclipse.equinox 的 invoke0(Native Method)。 launcher.Main.invokeFramework(Main.java:559) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1311)在 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 在 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 在 java.lang.reflect.Method.invoke(Unknown Source) 在 org.eclipse.equinox 的 invoke0(Native Method)。 launcher.Main.invokeFramework(Main.java:559) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1311)

Has anyone an idea what is going wrong? I looked a while at my model but were not able to find something wrong. I just thought there might be a recursion due to the "Unhandled event loop exception" but is this even possible?

Thanks in advance, Dominik

4

1 回答 1

0

Ok, got the error.

It was because a generated datatype was not inside a package. After fixing this, everything works fine.

于 2010-05-27T09:56:15.473 回答