java - Eclipse 3.5 中的 FreeMarker 编辑器给出非法参数异常

标签 java eclipse ide freemarker

我尝试在 eclipse 3.5 Galileo 中使用 freemarker 编辑器并发现异常:

java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.SWT.error(SWT.java:3865)
    at org.eclipse.swt.SWT.error(SWT.java:3799)
    at org.eclipse.swt.SWT.error(SWT.java:3770)
    at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9029)
    at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:9123)
    at org.eclipse.jface.text.TextViewer.applyTextPresentation(TextViewer.java:4801)
    at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4853)
    at org.eclipse.jface.text.presentation.PresentationReconciler.applyTextRegionCollection(PresentationReconciler.java:579)
    at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:568)
    at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:564)
    at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inputDocumentChanged(PresentationReconciler.java:119)
    at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2870)
    at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2919)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:545)
    at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:500)
    at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3951)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3466)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:427)
    at org.eclipse.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)
    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
    at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:129)
    at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:181)
    at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:470)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:880)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:569)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:125)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1191)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036)
    at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1368)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4053)
    at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:346)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:3946)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:342)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2410)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3471)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
    at org.eclipse.ui.internal.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)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.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)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
    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:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    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:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)

我替换了插件目录中的 freemarker jar,并且我也使用 clean 选项..但找不到任何东西...

最佳答案

FreeMarker有点旧(最新版本 December 2008 )。

您能否检查是否使用 eclipse Ganymede 3.4(.x)(旧版本)或 eclipse 3.5.1(更新版本)重现了该问题?
从那时起,SWT 可能以不兼容的方式发展。或者它可能只是一个尚未解决的旧错误(例如 115253 onethe 287886 ,应该已修复 in 282218 ,但对于 Mac,可能仅在 3.5.1 中)。

关于java - Eclipse 3.5 中的 FreeMarker 编辑器给出非法参数异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1649812/

相关文章:

Eclipse+Maven 编译问题

java - 如何防止 Eclipse 将文件标记为错误

java - 关于 EMR 错误 : Java heap space 的 Mahout

java - 如何使用 Apache POI - HSMF 提取嵌套到另一个 Outlook 消息中?

java - Java中根据模型- View - Controller 制作 View

intellij-idea - 如何在 PhpStorm(或 WebStorm)中创建多文件模板?

java - 与通过通配符(星号)导入相比,导入单个类的编码风格优势

java - java中如何从HashMap中返回关键内容?

eclipse - 在eclipse 3.5和jd-eclipse插件中打开源代码而不是反编译类

java - 使用 Repast Simphony 2.0 Eclipse 在关闭透视图和关闭应用程序后不再打开