Bug 5140

Summary: Array out of bounds during code completion
Product: [Eclipse Project] JDT Reporter: John Arthorne <john.arthorne>
Component: UIAssignee: Claude Knaus <Claude_Knaus>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akiezun
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John Arthorne CLA 2001-10-22 11:22:05 EDT
Build 20011018

Unfortunately, this happened a couple of days ago so I can't remember the 
context.  All I have is the following stack trace from my log file.  Sorry for 
the lack of details but if I'm able to reproduce it, I'll provide the code...

Log: Fri Oct 19 16:44:42 EDT 2001
4 org.eclipse.ui 0 Index out of bounds
java.lang.IllegalArgumentException: Index out of bounds
	at org.eclipse.swt.SWT.error(SWT.java:1791)
	at 
org.eclipse.swt.custom.StyledText.getLocationAtOffset(StyledText.java(Compiled 
Code))
	at 
org.eclipse.swt.custom.StyledText.getLocationAtOffset(StyledText.java(Compiled 
Code))
	at 
org.eclipse.jdt.internal.ui.text.template.TemplateEditorPopup.updatePosition(Tem
plateEditorPopup.java:263)
	at 
org.eclipse.jdt.internal.ui.text.template.TemplateEditorPopup.show(TemplateEdito
rPopup.java:107)
	at 
org.eclipse.jdt.internal.ui.text.template.TemplateEditorPopup.open(TemplateEdito
rPopup.java:125)
	at 
org.eclipse.jdt.internal.ui.text.template.TemplateProposal.apply(TemplateProposa
l.java:97)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(Comp
letionProposalPopup.java:157)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedPropo
sal(CompletionProposalPopup.java:142)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.proposalProcessEven
t(CompletionProposalPopup.java:353)
	at 
org.eclipse.jface.text.contentassist.CompletionProposalPopup.processEvent(Comple
tionProposalPopup.java:325)
	at 
org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.processEv
ent(ContentAssistant.java(Compiled Code))
	at 
org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java(Compiled 
Code))
	at 
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled 
Code))
	at 
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at 
org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java(Compiled Code))
	at org.eclipse.swt.custom.StyledText.doContent(StyledText.java(Compiled 
Code))
	at org.eclipse.swt.custom.StyledText.doContent(StyledText.java(Compiled 
Code))
	at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java(Compiled 
Code))
	at 
org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java(Compiled Code))
	at 
org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled 
Code))
	at 
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled 
Code))
	at 
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:658)
	at 
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:82
0)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
	at org.eclipse.core.launcher.Main.run(Main.java:502)
	at org.eclipse.core.launcher.Main.main(Main.java:362)
Comment 1 Claude Knaus CLA 2001-10-25 04:33:32 EDT
fixed by new implementation which operates on the original document directly.
Comment 2 Claude Knaus CLA 2001-10-25 05:21:23 EDT
*** Bug 5166 has been marked as a duplicate of this bug. ***