Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 264093

Summary: error in adding quick fix to cast method receiver
Product: [Eclipse Project] JDT Reporter: Francis Upton IV <francisu>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Francis Upton IV CLA 2009-02-08 14:47:34 EST
I20090203-1200

1) I did a control-F1 and selected "Add cast"
2) Got an error dialog that there was an error applying the cast (something like that, I forget the exact message).  I copied the text in the error dialog below.

Here is the line of code:

		_contentService.getFilterService().resetPreferences();

The _content service is an INavigatorContentService and the desired method is in NavigatorContentService.

I can't make this happen again.

Here are the traces from the error log:

!ENTRY org.eclipse.jdt.ui 4 10001 2009-02-08 11:32:47.547
!MESSAGE Internal Error
!STACK 1
org.eclipse.core.runtime.CoreException: First position: '' at 4709, this position: 'Object' at 4711
	at org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal.performChange(CUCorrectionProposal.java:343)
	at org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal.apply(CUCorrectionProposal.java:301)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:931)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:877)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:1304)
	at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:806)
	at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:482)
	at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:62)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1156)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1180)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1165)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1005)
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5693)
	at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5398)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1156)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1180)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1165)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1192)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:698)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2767)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:702)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1541)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4508)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4174)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:7534)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1184)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1850)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3093)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492)
	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:368)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1270)
Caused by: org.eclipse.jface.text.BadLocationException: First position: '' at 4709, this position: 'Object' at 4711
	at org.eclipse.jface.text.link.LinkedPositionGroup.enforceEqualContent(LinkedPositionGroup.java:132)
	at org.eclipse.jface.text.link.LinkedPositionGroup.addPosition(LinkedPositionGroup.java:113)
	at org.eclipse.jdt.internal.ui.viewsupport.LinkedProposalModelPresenter.enterLinkedMode(LinkedProposalModelPresenter.java:82)
	at org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal.performChange(CUCorrectionProposal.java:332)
	... 51 more
!SUBENTRY 1 org.eclipse.jdt.ui 4 4 2009-02-08 11:32:47.548
!MESSAGE First position: '' at 4709, this position: 'Object' at 4711
!STACK 0
org.eclipse.jface.text.BadLocationException: First position: '' at 4709, this position: 'Object' at 4711
	at org.eclipse.jface.text.link.LinkedPositionGroup.enforceEqualContent(LinkedPositionGroup.java:132)
	at org.eclipse.jface.text.link.LinkedPositionGroup.addPosition(LinkedPositionGroup.java:113)
	at org.eclipse.jdt.internal.ui.viewsupport.LinkedProposalModelPresenter.enterLinkedMode(LinkedProposalModelPresenter.java:82)
	at org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal.performChange(CUCorrectionProposal.java:332)
	at org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal.apply(CUCorrectionProposal.java:301)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:931)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:877)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:1304)
	at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:806)
	at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:482)
	at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:62)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1156)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1180)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1165)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1005)
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5693)
	at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5398)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1156)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1180)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1165)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1192)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:698)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:2767)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:702)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1541)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4508)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4174)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:7534)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1184)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1850)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3093)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492)
	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:368)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1270)
Comment 1 Dani Megert CLA 2009-02-09 05:15:49 EST

*** This bug has been marked as a duplicate of bug 195834 ***