Community
Participate
Working Groups
Version: 3.2.0 Build id: N20060421-0010 While editing SourceTypeBinding.java (JDT/Core source), I did manually change the name of a variable (no refactor or other tool), and copied it for pasting it in place of an existing reference to another variable. Got an error dialog telling about a NPE, stack trace is below: !ENTRY org.eclipse.ui 4 0 2006-04-21 11:08:31.917 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.jface.text.TreeLineTracker$Node.pureLength(TreeLineTracker.java:146) at org.eclipse.jface.text.TreeLineTracker.getLineInformationOfOffset(TreeLineTracker.java:1079) at org.eclipse.jface.text.AbstractLineTracker.getLineInformationOfOffset(AbstractLineTracker.java:145) at org.eclipse.jface.text.AbstractDocument.getLineInformationOfOffset(AbstractDocument.java:862) at org.eclipse.jface.text.rules.FastPartitioner.documentChanged2(FastPartitioner.java:299) at org.eclipse.jface.text.AbstractDocument.updateDocumentStructures(AbstractDocument.java:632) at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:719) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1080) at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1087) at org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy.addIndent(JavaAutoIndentStrategy.java:807) at org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy.smartPaste(JavaAutoIndentStrategy.java:702) at org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy.customizeDocumentCommand(JavaAutoIndentStrategy.java:1151) at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3296) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.customizeDocumentCommand(CompilationUnitEditor.java:228) at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3318) at org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1261) at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:348) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:202) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:934) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706) at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5761) at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6518) at org.eclipse.swt.custom.StyledText.paste(StyledText.java:5842) at org.eclipse.jface.text.TextViewer.doOperation(TextViewer.java:3479) at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:862) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1439) at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.doOperation(JavaSourceViewer.java:178) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:201) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.doPasteWithImportsOperation(ClipboardOperationAction.java:493) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.internalDoOperation(ClipboardOperationAction.java:277) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction$1.run(ClipboardOperationAction.java:248) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.jdt.internal.ui.javaeditor.ClipboardOperationAction.run(ClipboardOperationAction.java:246) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185) at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:460) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:424) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:160) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:466) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:799) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:846) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:564) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:506) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:122) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:982) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:924) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:934) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:958) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1272) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3346) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3246) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1922) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2964) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
Created attachment 39151 [details] Edited version of SourceTypeBinding 1. Check out JDT/Core from CVS (HEAD). 2. Goto type: SourceTypeBinding (ctrl-shift-T) 3. In editor, paste the attached source over original 4. Goto line 91, select "addedMethods", copy it to clipboard (ctrl-C) 5. Goto line 102, select "hasAddedMethods", perform a paste (ctrl-V)
fixed > 20060421. I will attach a fixed org.eclipse.text plug-in to go with N20060421.
Created attachment 39153 [details] org.eclipse.text_3.2.0.zzz20060421-1151.jar Replacement for the broken org.eclipse.text plug-in in N20060421. To use it, replace plugins/org.eclipse.text_3.2.0.N20060421-0010.jar by this plug-in.
*** Bug 137915 has been marked as a duplicate of this bug. ***
*** Bug 137973 has been marked as a duplicate of this bug. ***
verified in 20060426