Project: JDT
Bug 57622 ClassCastException using NLS tool
Reported: 2004-04-06 14:15:16 | Status: verified fixed

Using I20040406 Had a Compilation unit open that needed string externalized. Selected "Externalize Strings..." action and got the following error logged: java.lang.ClassCastException at org.eclipse.jdt.internal.corext.refactoring.nls.NLSHint.getAccessorClass (NLSHint.java:212) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSHint.findMessageClassHint (NLSHint.java:193) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSHint.<init> (NLSHint.java:61) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSRefactoring.getNlsHint (NLSRefactoring.java:720) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizardPage2.<init> (ExternalizeWizardPage2.java:100) at org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizard.addUserInputPages (ExternalizeWizard.java:50) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.addPages (RefactoringWizard.java:503) at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:466) at org.eclipse.jface.window.Window.create(Window.java:350) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:859) at org.eclipse.jface.window.Window.open(Window.java:639) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:62) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.openExternalizeStringsWizar d(ExternalizeStringsAction.java:152) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.run (ExternalizeStringsAction.java:123) at org.eclipse.jdt.ui.actions.ExternalizeStringsAction.run (ExternalizeStringsAction.java:105) 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:881) at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:212) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent (WWinPluginAction.java:212) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:550) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:502) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:435) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:769) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2587) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2265) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1561) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1532) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:257) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:140) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:279) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:241) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:117) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:267) at org.eclipse.core.launcher.Main.run(Main.java:692) at org.eclipse.core.launcher.Main.main(Main.java:676)

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/nls/NLSHintTest.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHint.java