我只需下载并安装Eclipse(Kepler)4.3.2 ,然后在Help>中安装JBoss Tools(仅安装Freemarker IDE)。 Eclipse Marketplace ...,请点击以下链接:http://tools.jboss.org/downloads/jbosstools/kepler/4.1.2.Final.html
当eclipse打开.ftl文件时发生错误。
活动详情:
消息:从插件调用代码时出现问题:" org.eclipse.ui.workbench"。
异常堆栈跟踪:
java.lang.NullPointerException
at org.jboss.ide.eclipse.freemarker.model.ItemSet.<init>(ItemSet.java:56)
at org.jboss.ide.eclipse.freemarker.editor.Editor.getItemSet(Editor.java:277)
at org.jboss.ide.eclipse.freemarker.outline.OutlineContentProvider.getElements(OutlineContentProvider.java:63)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1010)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:721)
at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1351)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391)
at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:620)
at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:820)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:797)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:768)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1548)
at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:833)
at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1532)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1525)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
at org.jboss.ide.eclipse.freemarker.outline.OutlinePage.createControl(OutlinePage.java:86)
at org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:137)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:412)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:753)
at org.eclipse.ui.part.PageBookView$4.partActivated(PageBookView.java:1055)
at org.eclipse.ui.internal.WorkbenchPage$15.run(WorkbenchPage.java:4794)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:4792)
at org.eclipse.ui.internal.WorkbenchPage.access$16(WorkbenchPage.java:4772)
at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:194)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:192)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:190)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:609)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:553)
at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:104)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:59)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1453)
at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1416)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2856)
at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2421)
at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:5235)
at org.eclipse.swt.widgets.Canvas.WM_SETFOCUS(Canvas.java:457)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4681)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
at org.eclipse.swt.widgets.Control.forceFocus(Control.java:1098)
at org.eclipse.swt.widgets.Control.setSavedFocus(Control.java:3620)
at org.eclipse.swt.widgets.Decorations.restoreFocus(Decorations.java:838)
at org.eclipse.swt.widgets.Decorations.WM_SETFOCUS(Decorations.java:1782)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4681)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2544)
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:498)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4706)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
at org.eclipse.jface.window.Window.open(Window.java:802)
at org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:180)
at org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:98)
at org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:536)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
非常感谢任何帮助。
答案 0 :(得分:1)
此错误是由文本文件编码引起的。
解决方案:打开Eclipse - Window - Preferences - General - Workspace,并将Text文件编码更改为Other - UTF-8
答案 1 :(得分:0)
尝试恢复到Eclipse中的先前配置。转至:Help > Installation Details > Installation History
,然后重新启动Eclipse。然后尝试再次打开.ftl。