Project: JDT
Bug 89553 [nls tooling] Exception during Externalize... with no key
Reported: 2005-03-30 09:56:15 | Status: verified fixed

I20050330 1. Externalize Strings on any file 2. Enable Use Eclipse's string 3. Delete common prefix 4. Select a key and delete it java.lang.StringIndexOutOfBoundsException at java.lang.String.charAt(String.java:373) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage.isKeyValid(ExternalizeWizardPage.java:919) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage.access$6(ExternalizeWizardPage.java:914) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage$NLSSubstitutionLabelProvider.getNLSImage(ExternalizeWizardPage.java:262) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage$NLSSubstitutionLabelProvider.getColumnImage(ExternalizeWizardPage.java:240) at org.eclipse.jface.viewers.TableViewer.doUpdateItem(TableViewer.java:437) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:351) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1021) at org.eclipse.core.runtime.Platform.run(Platform.java:757) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:40) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1670) at org.eclipse.jface.viewers.TableViewer.internalRefreshAll(TableViewer.java:773) at org.eclipse.jface.viewers.TableViewer.internalRefresh(TableViewer.java:712) at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1198) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1108) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1196) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1153) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage$7.modifyText(ExternalizeWizardPage.java:876) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:187) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:866) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2019) at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:3155) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3032) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3466) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:1549) at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:127) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3114) at org.eclipse.swt.widgets.Text.windowProc(Text.java:1742) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3466) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1625) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2525) at org.eclipse.jface.window.Window.runEventLoop(Window.java:803) at org.eclipse.jface.window.Window.open(Window.java:781) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:125) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:138) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:40) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.openExternalizeStringsWizard(ExternalizeStringsAction.java:147) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction$1.run(ExternalizeStringsAction.java:120) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.run(ExternalizeStringsAction.java:117) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.run(ExternalizeStringsAction.java:99) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:216) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:338) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:151) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:268) at org.eclipse.core.launcher.Main.basicRun(Main.java:260) at org.eclipse.core.launcher.Main.run(Main.java:887) at org.eclipse.core.launcher.Main.main(Main.java:871) !ENTRY org.eclipse.ui 4 4 2005-03-30 09:50:17.650 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 2005-03-30 09:50:17.660 !MESSAGE java.lang.StringIndexOutOfBoundsException !STACK 0 java.lang.StringIndexOutOfBoundsException at java.lang.String.charAt(String.java:373) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage.isKeyValid(ExternalizeWizardPage.java:919) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage.checkInvalidKeys(ExternalizeWizardPage.java:907) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage.validateKeys(ExternalizeWizardPage.java:899) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage.access$3(ExternalizeWizardPage.java:897) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage$7.modifyText(ExternalizeWizardPage.java:877) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:187) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:866) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2019) at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:3155) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3032) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3466) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:1549) at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:127) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3114) at org.eclipse.swt.widgets.Text.windowProc(Text.java:1742) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3466) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1625) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2525) at org.eclipse.jface.window.Window.runEventLoop(Window.java:803) at org.eclipse.jface.window.Window.open(Window.java:781) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:125) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:138) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:40) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.openExternalizeStringsWizard(ExternalizeStringsAction.java:147) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction$1.run(ExternalizeStringsAction.java:120) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.run(ExternalizeStringsAction.java:117) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.run(ExternalizeStringsAction.java:99) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:216) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:338) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:151) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:268) at org.eclipse.core.launcher.Main.basicRun(Main.java:260) at org.eclipse.core.launcher.Main.run(Main.java:887) at org.eclipse.core.launcher.Main.main(Main.java:871)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/ExternalizeWizardPage.java