Summary: | Error while entering expression in change variable value dialog | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Darin Wright <darin.eclipse> | ||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 RC3 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Darin Wright
2005-06-13 09:17:19 EDT
Looks like the internal runtime exception InvalidCursorLocation should be handled by JCORE. Moving to JCORE for comment. The call stack looks like this: Thread [main] (Suspended (exception org.eclipse.jdt.internal.codeassist.complete.InvalidCursorLocation)) owns: org.eclipse.swt.widgets.RunnableLock (id=35095372) org.eclipse.jdt.internal.codeassist.complete.CompletionScanner.scanNumb er(boolean) line: 804 org.eclipse.jdt.internal.codeassist.complete.CompletionScanner (org.eclipse.jdt.internal.compiler.parser.Scanner).jumpOverMethodBody() line: 1933 org.eclipse.jdt.internal.codeassist.complete.CompletionScanner.getNextT oken() line: 90 org.eclipse.jdt.internal.codeassist.complete.CompletionParser (org.eclipse.jdt.internal.compiler.parser.Parser).parse() line: 8473 org.eclipse.jdt.internal.codeassist.complete.CompletionParser (org.eclipse.jdt.internal.compiler.parser.Parser).parse (org.eclipse.jdt.internal.compiler.env.ICompilationUnit, org.eclipse.jdt.internal.compiler.CompilationResult, int, int) line: 8653 org.eclipse.jdt.internal.codeassist.complete.CompletionParser (org.eclipse.jdt.internal.compiler.parser.Parser).parse (org.eclipse.jdt.internal.compiler.env.ICompilationUnit, org.eclipse.jdt.internal.compiler.CompilationResult) line: 8618 org.eclipse.jdt.internal.codeassist.complete.CompletionParser (org.eclipse.jdt.internal.compiler.parser.Parser).dietParse (org.eclipse.jdt.internal.compiler.env.ICompilationUnit, org.eclipse.jdt.internal.compiler.CompilationResult) line: 7417 org.eclipse.jdt.internal.codeassist.complete.CompletionParser.dietParse (org.eclipse.jdt.internal.compiler.env.ICompilationUnit, org.eclipse.jdt.internal.compiler.CompilationResult, int) line: 3123 org.eclipse.jdt.internal.codeassist.CompletionEngine.parseSnippeInitial izer(char[], int, char[][], char[][], int[], boolean) line: 1350 org.eclipse.jdt.internal.codeassist.CompletionEngine.complete (org.eclipse.jdt.core.IType, char[], int, char[][], char[][], int[], boolean) line: 1262 org.eclipse.jdt.internal.core.SourceType.codeComplete(char[], int, int, char[][], char[][], int[], boolean, org.eclipse.jdt.core.CompletionRequestor, org.eclipse.jdt.core.WorkingCopyOwner) line: 105 org.eclipse.jdt.internal.core.SourceType.codeComplete(char[], int, int, char[][], char[][], int[], boolean, org.eclipse.jdt.core.CompletionRequestor) line: 75 org.eclipse.jdt.internal.debug.ui.display.DisplayCompletionProcessor.co mputeCompletionProposals(org.eclipse.jdt.debug.core.IJavaStackFrame, org.eclipse.jface.text.ITextViewer, int) line: 177 org.eclipse.jdt.internal.debug.ui.display.DisplayCompletionProcessor.co mputeCompletionProposals(org.eclipse.jface.text.ITextViewer, int) line: 148 org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletion Proposals(org.eclipse.jface.text.ITextViewer, int) line: 1503 org.eclipse.jface.text.contentassist.CompletionProposalPopup.computePro posals(int) line: 256 org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7 (org.eclipse.jface.text.contentassist.CompletionProposalPopup, int) line: 253 org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run() line: 216 org.eclipse.swt.custom.BusyIndicator.showWhile (org.eclipse.swt.widgets.Display, java.lang.Runnable) line: 69 org.eclipse.jface.text.contentassist.CompletionProposalPopup.showPropos als(boolean) line: 211 org.eclipse.jface.text.contentassist.ContentAssistant$2.run() line: 327 org.eclipse.swt.widgets.RunnableLock.run() line: 35 org.eclipse.ui.internal.UISynchronizer (org.eclipse.swt.widgets.Synchronizer).runAsyncMessages(boolean) line: 118 org.eclipse.swt.widgets.Display.runAsyncMessages(boolean) line: 3035 org.eclipse.swt.widgets.Display.readAndDispatch() line: 2694 org.eclipse.jdt.internal.debug.ui.actions.ExpressionInputDialog (org.eclipse.jface.window.Window).runEventLoop(org.eclipse.swt.widgets.Shell) line: 809 org.eclipse.jdt.internal.debug.ui.actions.ExpressionInputDialog (org.eclipse.jface.window.Window).open() line: 787 org.eclipse.jdt.internal.debug.ui.actions.JavaObjectValueEditor.editVar iable(org.eclipse.debug.core.model.IVariable, org.eclipse.swt.widgets.Shell) line: 76 org.eclipse.jdt.internal.debug.ui.actions.JavaVariableValueEditor.editV ariable(org.eclipse.debug.core.model.IVariable, org.eclipse.swt.widgets.Shell) line: 47 org.eclipse.debug.internal.ui.actions.ChangeVariableValueAction.delegat eEdit(org.eclipse.swt.widgets.Shell) line: 92 org.eclipse.debug.internal.ui.actions.ChangeVariableValueAction.doActio nPerformed(org.eclipse.debug.core.model.IVariable) line: 73 org.eclipse.debug.internal.ui.actions.ChangeVariableValueAction.run() line: 166 org.eclipse.debug.internal.ui.actions.ChangeVariableValueAction (org.eclipse.jface.action.Action).runWithEvent(org.eclipse.swt.widgets.Event) line: 996 org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (org.eclipse.swt.widgets.Event, boolean) line: 538 org.eclipse.jface.action.ActionContributionItem.access$2 (org.eclipse.jface.action.ActionContributionItem, org.eclipse.swt.widgets.Event, boolean) line: 488 org.eclipse.jface.action.ActionContributionItem$5.handleEvent (org.eclipse.swt.widgets.Event) line: 400 org.eclipse.swt.widgets.EventTable.sendEvent (org.eclipse.swt.widgets.Event) line: 66 org.eclipse.swt.widgets.MenuItem (org.eclipse.swt.widgets.Widget).sendEvent(org.eclipse.swt.widgets.Event) line: 844 org.eclipse.swt.widgets.Display.runDeferredEvents() line: 3058 org.eclipse.swt.widgets.Display.readAndDispatch() line: 2691 org.eclipse.ui.internal.Workbench.runEventLoop (org.eclipse.jface.window.Window$IExceptionHandler, org.eclipse.swt.widgets.Display) line: 1716 org.eclipse.ui.internal.Workbench.runUI() line: 1680 org.eclipse.ui.internal.Workbench.createAndRunWorkbench (org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 365 org.eclipse.ui.PlatformUI.createAndRunWorkbench (org.eclipse.swt.widgets.Display, org.eclipse.ui.application.WorkbenchAdvisor) line: 143 org.eclipse.ui.internal.ide.IDEApplication.run(java.lang.Object) line: 103 org.eclipse.core.internal.runtime.PlatformActivator$1.run (java.lang.Object) line: 226 org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.Object) line: 376 org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.String [], java.lang.Runnable) line: 163 sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method] sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 85 sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: 58 sun.reflect.DelegatingMethodAccessorImpl.invoke (java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: 60 java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) line: 391 org.eclipse.core.launcher.Main.invokeFramework(java.lang.String[], java.net.URL[]) line: 334 org.eclipse.core.launcher.Main.basicRun(java.lang.String[]) line: 278 org.eclipse.core.launcher.Main.run(java.lang.String[]) line: 973 org.eclipse.core.launcher.Main.main(java.lang.String[]) line: 948 +1 for RC3. Darin: pls cast your vote. We already handle proper exceptions on different API call, fix would be to make this API similar. +1 from Darin W Created attachment 23096 [details]
Proposed patch
Add the same protection as inside CompletionEngine#complete(ICompilationUnit,
int, int)
Fix released and test added SnippetCompletionTests#testCodeSnippetAssistInsideNumber() Verified using build N20050616-0010 + JDT Core HEAD. |