2009-10-30 64 views
1

我想使用在Eclipse 3.5伽利略FreeMarker的編輯器,發現異常:FreeMarker的編輯器在Eclipse 3.5給非法參數異常

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的罐子在插件目錄,我用乾淨的選項也..但找不到任何東西...

回答

0

FreeMarker是有點舊(最新版本December 2008)。

你可以檢查你用eclipse Ganymede 3.4(.x),這是舊版本還是eclipse 3.5.1(更新)重現問題?
從那以後,SWT可能會以不兼容的方式進化。或者它可能只是一個尚未解決的舊bug(如115253 onethe 287886,應該已經修復in 282218,但對於Mac並且可能只在3.5.1中)。

0

在上面的堆棧跟蹤中沒有提及Freemarker類。你在用什麼編輯器?

我有Eclipse 3.5.20090621-0832和Freemarker IDE 1.1.0.M1-N200906060434-H241,兩者都正常工作。 Freemarker IDE是JBoss Tools的一部分。

您可以獲得latest development milestone(穩定版本僅支持Eclipse 3.4.2) - 請注意,它需要Eclipse 3.5.1/Galileo SR1。

或者,如果你正在使用Eclipse內置的包管理,更新網站是here隨着installation instructions

0

正好遇到了同樣的問題,並跟蹤它到:

<style type="text/css"> 
<?php ?> 

基本上,它看起來像,這個異常被拋出b/c解析器被HTML和PHP的某些組合所困惑。

我可以通過創建一個新的PHP文件引發這個異常,並用類似的東西填充它。但奇怪的是,似乎在玩了一陣之後,Exception消失了。所以也許這是一段時間以來由我編輯而中和的Unicode事物。

無論如何,你去了。

最佳

拉斐爾