| Summary: | [1.7][assist] No proposal inside catch statement from 3rd catch block onwards | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ayushman Jain <amj87.iitr> | ||||
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | Olivier_Thomann, satyam.kandula, srikanth_sankaran | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 197291 [details]
proposed fix v1.0 + regression tests
The problem is that now the astLengthPtr points to the no. of arguments in a union type ref rather than pointing to how many catch blocks have been encountered till now, as was the case earlier. That info is captured in astLengthPtr - 1 when the CompletionParser is in buildMoreTryStatementCompletionContext(..). The above patch captures the relevant change.
Released in BETA_JAVA7. Verified using "Eclipse Java Development Tools Patch for Java 7 Support (BETA) 1.0.0.v20110623-0900 org.eclipse.jdt.patch.feature.group Eclipse.org" |
BETA_JAVA7 branch. Content assist is broken when there are more than 2 catch blocks and proposal is asked inside the catch statement public class Abc { static void foo() throws IOException, IllegalArgumentException, OperationNotSupportedException, IndexOutOfBoundsException { } void bar() { try { Abc.foo(); } catch (IOException e) { } catch (OperationNotSupportedException e) { } catch ([CTRL-SPACE]) { // No proposal here } } }