RCP - org.eclipse.swt.SWTException:无法执行runnable

时间:2016-01-21 11:17:18

标签: eclipse-rcp rcp

我使用Eclipse Mars和相关模板" RCP 3.x应用程序创建了一个空的RCP 3.x,其中包含一个视图"将它命名为" com.view"。

我创建了一个功能" com.view.feature"与" com.view"相关联,最后我在" com.view"内创建了产品配置。

这是feature.xml的代码:

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="newP.feature"
      label="Feature"
      version="1.0.0.qualifier">

   <description url="http://www.example.com/description">
      [Enter Feature Description here.]
   </description>

   <copyright url="http://www.example.com/copyright">
      [Enter Copyright Description here.]
   </copyright>

   <license url="http://www.example.com/license">
      [Enter License Description here.]
   </license>

   <includes
         id="net.enilink.komma.edit.feature"
         version="0.0.0"/>

   <includes
         id="net.enilink.komma.edit.ui.feature"
         version="0.0.0"/>

   <includes
         id="net.enilink.komma.editor.feature"
         version="0.0.0"/>

   <includes
         id="net.enilink.komma.feature"
         version="0.0.0"/>

   <includes
         id="org.teiid.datatools.connectivity.feature"
         version="0.0.0"/>

   <includes
         id="org.teiid.datatools.connectivity.feature.source"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.feature"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.feature.source"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.library.feature"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.library.feature.source"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.runtime.feature"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.runtime.feature.source"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.teiid.client.feature"
         version="0.0.0"/>

   <includes
         id="org.teiid.designer.teiid.client.feature.source"
         version="0.0.0"/>

   <requires>
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.core.runtime"/>
      <import plugin="org.eclipse.jface.text"/>
      <import plugin="org.eclipse.ui.editors"/>
      <import plugin="org.eclipse.core.resources"/>
      <import plugin="org.eclipse.ui.ide"/>
      <import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/>
      <import plugin="org.eclipse.update.configurator" version="3.1.100" match="compatible"/>
      <import plugin="org.eclipse.equinox.registry" version="3.6.0" match="equivalent"/>
   </requires>

   <plugin
         id="newP"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.core.runtime.compatibility"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.core.runtime.compatibility.registry"
         download-size="0"
         install-size="0"
         version="0.0.0"
         fragment="true"/>

   <plugin
         id="org.eclipse.jface"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.jface.databinding"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.jface.text"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.osgi.compatibility.state"
         download-size="0"
         install-size="0"
         version="0.0.0"
         fragment="true"
         unpack="false"/>

   <plugin
         id="org.eclipse.e4.ui.di"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.eclipse.e4.ui.dialogs"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="org.johnstonshome.jenatool.ui"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature>

我使用功能&#34; com.view.feature&#34;集成了另一个插件。但是当我使用第三部分插件时,我有这个错误:

org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)))
    at org.eclipse.swt.SWT.error(SWT.java:4491)
    at org.eclipse.swt.SWT.error(SWT.java:4406)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.executeRunnable(UiBusyIndicator.java:227)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhileInternal(UiBusyIndicator.java:159)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhile(UiBusyIndicator.java:116)
    at org.teiid.designer.ui.editors.ModelEditorManager.open(ModelEditorManager.java:344)
    at org.teiid.designer.ui.explorer.ModelExplorerResourceNavigator$12.doubleClick(ModelExplorerResourceNavigator.java:1097)
    at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:832)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
    at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:829)
    at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1470)
    at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1263)
    at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:252)
    at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:249)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:311)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at newp.Application.start(Application.java:20)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
Caused by: org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException))
    at org.eclipse.swt.SWT.error(SWT.java:4491)
    at org.eclipse.swt.SWT.error(SWT.java:4406)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.executeRunnable(UiBusyIndicator.java:227)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhileInternal(UiBusyIndicator.java:159)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhile(UiBusyIndicator.java:116)
    at org.teiid.designer.diagram.ui.editor.DiagramEditor.openContext(DiagramEditor.java:1256)
    at org.teiid.designer.ui.editors.ModelEditor.openModelObject(ModelEditor.java:1014)
    at org.teiid.designer.ui.editors.ModelEditor.openModelObject(ModelEditor.java:985)
    at org.teiid.designer.ui.editors.ModelEditorManager$5.run(ModelEditorManager.java:350)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator$2$1.run(UiBusyIndicator.java:206)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    ... 43 more
Caused by: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
    at org.eclipse.swt.SWT.error(SWT.java:4491)
    at org.eclipse.swt.SWT.error(SWT.java:4406)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.executeRunnable(UiBusyIndicator.java:227)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhileInternal(UiBusyIndicator.java:159)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhile(UiBusyIndicator.java:116)
    at org.teiid.designer.ui.editors.MultiPageModelEditor$3.widgetSelected(MultiPageModelEditor.java:452)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:788)
    at org.teiid.designer.ui.editors.MultiPageModelEditor.selectPage(MultiPageModelEditor.java:914)
    at org.teiid.designer.ui.editors.ModelEditorManager$3.run(ModelEditorManager.java:183)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    ... 55 more
Caused by: java.lang.NullPointerException
    at org.teiid.designer.diagram.ui.editor.DiagramActionContributor.pageActivated(DiagramActionContributor.java:454)
    at org.teiid.designer.ui.editors.AbstractModelEditorPageActionBarContributor.setActiveEditor(AbstractModelEditorPageActionBarContributor.java:216)
    at org.teiid.designer.ui.editors.ModelEditorActionContributor.setActivePage(ModelEditorActionContributor.java:210)
    at org.teiid.designer.ui.editors.ModelEditor.pageChange(ModelEditor.java:1124)
    at org.teiid.designer.ui.editors.MultiPageModelEditor$3$1.run(MultiPageModelEditor.java:464)
    at org.teiid.designer.ui.common.viewsupport.UiBusyIndicator$2$1.run(UiBusyIndicator.java:206)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    ... 72 more

阅读本教程http://www.vogella.com/tutorials/EclipseJobs/article.html似乎线程之间存在问题,但我不知道如何修复它。

有什么建议吗?

0 个答案:

没有答案