Project: JDT
Bug 269611 [nls tooling] Error "Must be in Externalized State !" when externalizing strings
Reported: 2009-03-22 08:34:17 | Status: resolved fixed

Build ID: M20090211-1700 Steps To Reproduce: 1. Source --> Externalize Strings --> select some file with strings to externalize 2. click into the Key column so that the cell editor is enabled 3. click Ignore button --> error message java.lang.IllegalStateException: Must be in Externalized State ! at org.eclipse.jdt.internal.corext.refactoring.nls.NLSSubstitution.setKey(NLSSubstitution.java:118) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage$CellModifier.modify(ExternalizeWizardPage.java:195) at org.eclipse.jface.viewers.ColumnViewer$2.setValue(ColumnViewer.java:274) at org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:109) at org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:454) at org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:311) at org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorActivationEvent(ColumnViewerEditor.java:438) at org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivationEvent(ColumnViewer.java:680) at org.eclipse.jface.viewers.ColumnViewer.handleMouseDown(ColumnViewer.java:664) at org.eclipse.jface.viewers.ColumnViewer.access$0(ColumnViewer.java:660) at org.eclipse.jface.viewers.ColumnViewer$1.mouseDown(ColumnViewer.java:89) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482) at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java:3024) at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.java:2104) at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375) at org.eclipse.swt.widgets.Display.controlProc(Display.java:862) at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native Method) at org.eclipse.swt.widgets.Table.kEventMouseDown(Table.java:2275) at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1326) at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2929) at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3051) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:144) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:156) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:37) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizard$1.run(ExternalizeWizard.java:74) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizard.open(ExternalizeWizard.java:70) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction$2.widgetDefaultSelected(ExternalizeStringsAction.java:483) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:113) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482) at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java:3024) at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.java:2104) at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375) at org.eclipse.swt.widgets.Display.controlProc(Display.java:862) at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native Method) at org.eclipse.swt.widgets.Table.kEventMouseDown(Table.java:2275) at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1326) at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2929) at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3051) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.showResults(ExternalizeStringsAction.java:308) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.run(ExternalizeStringsAction.java:183) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3068) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490) 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:193) 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:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

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