2017-03-06 319 views
1

我刚开始开发可以使用libreoffice扩展与libreoffice进行通信的桌面应用程序。未处理的事件循环异常和编辑器无法在LibreOffice扩展Java Eclipse项目中初始化

我试图运行Github LibreOffice Extension Code Sample。 它显示错误“编辑器无法初始化”并记录在下面。

java.lang.NullPointerException 
at org.openoffice.ide.eclipse.core.editors.RegDocumentProvider.createDocument(RegDocumentProvider.java:98) 
at org.eclipse.ui.editors.text.FileDocumentProvider.createElementInfo(FileDocumentProvider.java:721) 
at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(AbstractDocumentProvider.java:392) 
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4178) 
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:229) 
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1466) 
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:150) 
at org.eclipse.ui.texteditor.AbstractTextEditor$5.run(AbstractTextEditor.java:3154) 
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437) 
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353) 
at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2184) 
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) 
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2180) 

它也显示了一些U字母上的项目文件夹和D字母下面的蓝色colors.rdb文件。那是什么意思?

enter image description here

在运行低于这个项目它的示值误差“未处理的事件循环异常”和错误日志。

java.lang.NullPointerException 
at org.libreoffice.ide.eclipse.core.launch.office.OfficeLaunchShortcut.createDefaultLaunchConfiguration(Unknown Source) 
at org.libreoffice.ide.eclipse.core.launch.office.OfficeLaunchShortcut.launch(Unknown Source) 
at org.libreoffice.ide.eclipse.core.launch.office.OfficeLaunchShortcut.launch(Unknown Source) 
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:431) 
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runInternal(LaunchShortcutAction.java:85) 
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:135) 
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) 
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397) 
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1349) 
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1134) 
at org.eclipse.jface.action.ActionContributionItem.lambda$8(ActionContributionItem.java:1258) 
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340) 
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4561) 
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4151) 
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) 
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) 
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) 
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) 
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) 
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) 
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) 
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) 
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) 
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:388) 
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) 
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) 
at org.eclipse.equinox.launcher.Main.run(Main.java:1519) 
at org.eclipse.equinox.launcher.Main.main(Main.java:1492) 

我尝试使用File-> New-> Project-> OpenOffice-> Extension Project创建一些示例项目。下面仍然会收到相同的错误。 enter image description here

此外,我尝试thisthis但仍然没有积极的结果。

任何帮助将不胜感激。

谢谢

回答

1

错误是由于项目运行为LibreOffice Extension。

为了解决这个问题,我创建了一个名称为LibreOffice Application(而不是扩展名)的新配置。它现在顺利运行。