Community
Participate
Working Groups
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 } } }
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"