Bug 83321

Summary: [1.5][assist][enum] no override completion proposals in type when followed by a package visible enum
Product: [Eclipse Project] JDT Reporter: Tom Hofmann <eclipse>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M6   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Tom Hofmann CLA 2005-01-20 12:13:25 EST
I20050118 + 0120 ZRH plug-in export

I don't get any completion proposals in the following cu, with the caret at |.
Note that completion proposals *are* reported after the enum declaration, and
even within the enum declaration after the semicolon-terminated list of enums,
but never before.

--------- Completion.java ---------

package test1;

public class Completion {
	| // does not work here
}

enum Natural {
	ONE;
     // works here
}

class After {
    // works here
}
Comment 1 Tom Hofmann CLA 2005-01-20 12:15:27 EST
Within methods, completion works as expected. Only the method override proposals
do not work.
Comment 2 Frederic Fusier CLA 2005-02-16 06:16:12 EST
Completion works in first class when you comment enum:
public class Completion {
	| // works now here...
}

//enum Natural {
//	ONE;
     // works here
//}

class After {
    // works here
}
Comment 3 David Audel CLA 2005-02-21 12:32:01 EST
Fixed and test added
  EnumCompletionParserTest#test0001()

Inside Parser#consumeEnumConstantHeaderName identifierPtr was decreased before
the call to createFieldDeclaration() and cause an exception catched by
CompletionEngine.
Comment 4 Olivier Thomann CLA 2005-03-30 14:42:09 EST
Verified in I20050330-0500