redhat-developer / redhat-developer/vscode-java

New imports are added before folded ones when using editor.foldingImportsByDefault

Open
#3,821 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

editor-folding upstream
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

When I autoimport the suggested claasname, prior to enabling the fold imports, it will add new import before folded ones.
image

Environment
  • Operating System: Windows 11
  • JDK version: 21
  • Visual Studio Code version: 1.94.2
  • Java extension version: 1.35.1

Steps:

  1. Open demo.zip
  2. Navigate to DemoApplication.java and try to add new import by typing claas name instead of ArrayList by autocompleting the classname.
  3. It will add new import before the folded ones

Contributor guide

Open the contributing guide

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 behavior with demo.zip in DemoApplication.java, using editor.foldingImportsByDefault and the Java autocomplete flow described in the steps. Inspect how the extension places a newly suggested import relative to folded imports. Done means the new import is placed in the appropriate import section when imports are folded, with the reported reproduction no longer occurring.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.