Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 66949

Summary: [linked mode] Cut in linked edit mode throws exception
Product: [Eclipse Project] JDT Reporter: Randy Hudson <hudsonr>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Randy Hudson CLA 2004-06-14 10:33:31 EDT
Select "rename in file" on a field or local variable.  Select a range of text 
inside the variable name and press CTRL+X.

org.eclipse.jface.text.Assert$AssertionFailedException: null argument;
at org.eclipse.jface.text.Assert.isNotNull(Assert.java:146)
at org.eclipse.jface.text.Assert.isNotNull(Assert.java:122)
at org.eclipse.text.edits.ReplaceEdit.<init>(ReplaceEdit.java:36)
at org.eclipse.jface.text.link.LinkedPositionGroup.handleEvent
(LinkedPositionGroup.java:203)
at org.eclipse.jface.text.link.LinkedModeModel$DocumentListener.documentChanged
(LinkedModeModel.java:214)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2
(AbstractDocument.java:673)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged
(AbstractDocument.java:638)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged
(AbstractDocument.java:623)
at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged
(AbstractDocument.java:698)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:989)
at org.eclipse.jdt.internal.ui.javaeditor.PartiallySynchronizedDocument.replace
(PartiallySynchronizedDocument.java:92)
at org.eclipse.jface.text.source.projection.ProjectionViewer.copyToClipboard
(ProjectionViewer.java:1211)
at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation
(ProjectionViewer.java:1107)
at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.doOperation
(JavaSourceViewer.java:151)
at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer
.doOperation(CompilationUnitEditor.java:198)
at 
org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.doCutCopyWithImp
ortsOperation(ClipboardOperationAction.java:305)
at 
org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.internalDoOperat
ion(ClipboardOperationAction.java:257)
at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction$1.run
(ClipboardOperationAction.java:226)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.run
(ClipboardOperationAction.java:224)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:141)
at org.eclipse.ui.internal.commands.Command.execute(Command.java:132)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand
(WorkbenchKeyboard.java:469)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press
(WorkbenchKeyboard.java:887)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent
(WorkbenchKeyboard.java:928)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings
(WorkbenchKeyboard.java:546)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$2
(WorkbenchKeyboard.java:494)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent
(WorkbenchKeyboard.java:259)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:712)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:795)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805)
at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1724)
at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1720)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3048)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:2951)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3282)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1459)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2380)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1363)
Comment 1 Dani Megert CLA 2004-06-15 05:20:48 EDT

*** This bug has been marked as a duplicate of 66914 ***
Comment 2 Randy Hudson CLA 2004-06-15 10:35:11 EDT
The stack traces are not the same.  How is this a duplicate?
Comment 3 Tom Hofmann CLA 2004-06-15 10:52:54 EDT
oops, they aren't.
Comment 4 Dani Megert CLA 2004-06-15 10:55:09 EDT
Tom, next time I let you enter your own statements yoursef ;-)
Comment 5 Dani Megert CLA 2005-06-16 06:23:00 EDT
Resetting priority to P3. Will be reassessed for the next release.
Comment 6 Dani Megert CLA 2007-05-07 07:23:45 EDT
This has been fixed a while ago.

Tested with I20070503-1400.