groovy / groovy/groovy-eclipse

Cannot easily type an Enum range when "Enable auto activation" for code assist is enabled

Open
#697 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Another case similar to #676.

Consider this enumeration:

package test33;

public enum MyEnum {
  FOO, BAR;
}

And assume you want to type this:

package test33

class Test33 {

	void foo() {
		(MyEnum.FOO..MyEnum.BAR).each {
			
		}
	}
}

When you start to type (MyEnum.FOO. and then you hit the second dot, this is what gets inserted: (MyEnum.FOO.BAR..

I see two problems here:

  • in general, having code assist propose BAR when you are at MyEnum.FOO. doesn't make sense to me (this happens even outside the range context)
  • I still think . as a triggering character should simply be disabled whenever preceded by another dot, as discussed in #676.

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

Reproduce the issue in Eclipse using the Java MyEnum and Groovy Test33 examples, with code-assist auto activation enabled. Check that typing a second dot does not insert BAR or trigger completion; done means the enum range can be entered without the unwanted insertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.