Project: JDT
Bug 117706 Replace With > Latest from HEAD gives NPE
Reported: 2005-11-23 07:14:06 | Status: verified fixed

I20051123-1300 1. change a file which is shared (CVS team provider) 2. close the editor 3. in the Package Explorer: Replace With > Latest from HEAD ==> NPE (see below) This is caused by the fact that the JavaElementResourceMapper uses "return JavaRefactoringModelProvider.JAVA_REFACTORING_MODEL_PROVIDER_ID;" as model ID but this model has been commented out in JDT UI's plugin.xml. !ENTRY org.eclipse.ui 4 0 2005-11-23 12:54:52.718 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.team.internal.ui.dialogs.ResourceMappingResourceDisplayArea.getLabel(ResourceMappingResourceDisplayArea.java:66) at org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction$2.getSingleMappingMessage(ReplaceWithTagAction.java:45) at org.eclipse.team.internal.ui.dialogs.MappingSelectionDialog.createMainDialogArea(MappingSelectionDialog.java:45) at org.eclipse.team.internal.ui.dialogs.DetailsDialog.createDialogArea(DetailsDialog.java:189) at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:739) at org.eclipse.jface.window.Window.create(Window.java:417) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1051) at org.eclipse.jface.window.Window.open(Window.java:775) at org.eclipse.team.internal.ccvs.ui.actions.UncommittedChangesDialog.promptToSelectMappings(UncommittedChangesDialog.java:74) at org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction.checkOverwriteOfDirtyResources(ReplaceWithTagAction.java:74) at org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction$1.run(ReplaceWithRemoteAction.java:36) at org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager.run(RepositoryManager.java:677) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction$2.run(CVSAction.java:348) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction$3.run(CVSAction.java:357) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.run(CVSAction.java:354) at org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction.execute(ReplaceWithRemoteAction.java:31) at org.eclipse.team.internal.ccvs.ui.actions.CVSAction.run(CVSAction.java:118) at org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDelegate.java:70) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:530) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:480) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:392) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:905) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3241) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2861) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1794) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1758) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:381) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) 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:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:167) 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.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/JavaElementResourceMapping.java