[VSCode extension] Typing dot autocompletes in unintuitive ways
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 16
### What happened
Consider the following code:
```java
class Bar {
static void bar() {
class Foo { static void foo() {} }
// cursor here
}
}
```
Now type `Foo`. At this point NetBeans provides suggestions:

Then type a dot. Now NetBeans autocompletes `Foo.` to `ForLoopTree.` and gives suggestions for it.
What I expected to happen, is for NetBeans to just add the dot, and give suggestions for the class `Foo` defined in the line above:

In other words: when what's before the dot is valid in the current context, typing a dot should never (unless there's sensible exceptions I'm missing) autocomplete. When I want to autocomplete to a type, I can easily press Tab or Enter to autocomplete first, and then type the dot.
### How to reproduce
As described in `What happened`.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 11
### JDK
openjdk full version "20-ea+22-1594"
### Apache NetBeans packaging
Apache VSNetBeans for VSCode
### Anything else
_No response_
### Are you willing to submit a pull request?
Yes
### Code of Conduct
Yes
Contributor guide
Research direction
Reproduce the completion behavior in Apache NetBeans 16 using the Java snippet and the Apache VSNetBeans for VSCode packaging. Start by tracing the Java completion path that handles typing a dot after Foo; done means the dot is inserted without replacing a valid Foo reference and suggestions remain scoped to Foo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100