groovy / groovy/groovy-eclipse

Enum values not proposed on switch statement

Open
#764 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
681
Forks
197
PR merge metrics
No merged PRs in 30d

Description

Follow-up to #762.

Consider the following enum:

package test40;
public enum MyEnum {
	FOO, BAR;
}

And the following Groovy class:

package test40
class Test40 {
	void foo() {
		MyEnum e = MyEnum.FOO
		switch(e) {
			case |
		}
	}
}

Let the cursor be at "|" and invoke code assist: I would expected to see MyEnum.FOO and MyEnum.BAR (as the top suggestions).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the example in the Test40 Groovy class with the cursor after case and invoke code assist; inspect the switch-statement completion path. Done means the suggestions include MyEnum.FOO and MyEnum.BAR at the top.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.