Project: JDT
Bug 299155 [implementation] NPE while editing breakpoint properties in JavaAutoIndentStrategy's computeSmartMode
Reported: 2010-01-08 13:23:23 | Status: resolved fixed

I tried to cut some text and got this error. No luck in reproducing it so far. I'm using an 0106 e4 SDK. java.lang.NullPointerException at org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy.computeSmartMode(JavaAutoIndentStrategy.java:1275) at org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy.clearCachedValues(JavaAutoIndentStrategy.java:1265) at org.eclipse.jdt.internal.ui.text.java.JavaAutoIndentStrategy.customizeDocumentCommand(JavaAutoIndentStrategy.java:1210) at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3744) at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3774) at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:433) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1059) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:773) at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:6715) at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:7554) at org.eclipse.swt.custom.StyledText.doDelete(StyledText.java:2514) at org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:6558) at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5914) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5940) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5634) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1050) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1059) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1096) at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1805) at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4288) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3983) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:348) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4678) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2437) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3522) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.jdt.internal.debug.ui.actions.JavaBreakpointPropertiesAction.run(JavaBreakpointPropertiesAction.java:44) at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager$1.run(JavaDebugOptionsManager.java:645) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3906) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3527) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2407) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2371) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220) 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:367) 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:611) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566) at org.eclipse.equinox.launcher.Main.run(Main.java:1363)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java