Bug 43269 - [content assist] No code completion after switch/case Block
Summary: [content assist] No code completion after switch/case Block
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-18 03:13 EDT by Heywinkel CLA
Modified: 2004-05-11 05:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heywinkel CLA 2003-09-18 03:13:00 EDT
The code-completion did not work after a Block like

switch (TestCaseMain.umgebung)
{
   case TestCaseMain.ENTWICKLUNG :
      GeossGlobals.theGeossGlobals().setEntwicklung();
      break;
}

It does not work for the rest of the method. When the case-block is deleted, 
the code completion works.
Comment 1 Dani Megert CLA 2003-09-18 05:30:26 EDT
Can be reproduced on I20030916.

Simpler test case:

private Object testSwitch() {
  int i;
  switch (i) {
    case 1:
      return null;
    case 2:
      return null;
    case 3:
	return null;
  }
  Li<CODE ASSIST HERE>
  return null;
}

Saving the file does not help.
Adding "Li" just before the switch statement fixes the problem.

Possible completions are provided by Jdt Core.
Comment 2 Daniel Schneller CLA 2004-01-06 07:06:22 EST
I find the same behavior. However it does not necessarily affect to whole rest
of the method. Just block that contains the switch. Workaround: Wrap the whole
switch block in another one:

{
 switch (x) {
   case 1: ...
   case 2: ....
   case 3: .....
   default: .....
 }
 Li<here it does not work>
}
Li<here it does>
Comment 3 David Audel CLA 2004-05-11 05:55:58 EDT
The bug cannot be reproduced in I20040506

Closed