Community
Participate
Working Groups
Eclipse 20021113 1/ Create a new project and a new class (did not update build path). 2/ Copy the source from an existing class into this file. You can now choose to save or not. Obviously there are compile errors. 3/ Now shift all code to the right, then shift back to the left !ENTRY org.eclipse.ui 4 4 Nov 13, 2002 16:04:43.957 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Nov 13, 2002 16:04:43.957 !MESSAGE Argument not valid !STACK 0 java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:2166) at org.eclipse.swt.SWT.error(SWT.java:2110) at org.eclipse.jface.text.DocumentAdapter.replaceTextRange (DocumentAdapter.java:164) at org.eclipse.swt.custom.StyledText.modifyContent (StyledText.java:5621) at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6545) at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2652) at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5007) at org.eclipse.swt.custom.StyledText.handleKeyDown (StyledText.java:5030) at org.eclipse.swt.custom.StyledText$8.handleEvent (StyledText.java:4800) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1418) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:831) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
Reassigning to text component. Invalid argument being passed in by the application.
I think this has to do with the text optimizations that are being done during shift-right/left. If you shift > 20 lines at the end of a document, this is when the problem is occurring. Are you generating the correct text changing/text changed events? The caretOffset is out of sync with the document content and is leading to the error.
*** Bug 26280 has been marked as a duplicate of this bug. ***
Fixed for M3.
*** Bug 26518 has been marked as a duplicate of this bug. ***
verified and closed