redhat-developer / redhat-developer/vscode-java

blank lines between import groups is ignored

Open
#2,980 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

With a format settings file containing

<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>

and java.completion.importOrder specifying groups, all imports are still not spaced.

"java.completion.importOrder": [
        "java",
        "javax",
        "org",
        "com",
        "",
        "#"
    ]
Environment
  • Operating System: Linux
  • JDK version:
  • Visual Studio Code version: 1.76
  • Java extension version: 1.15.0
Steps To Reproduce

With

import java.time.Duration;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
  1. Format document do not add or remove blank lines
Current Result
import java.time.Duration;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expected Result
import java.time.Duration;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Additional Informations

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

The issue names no repository files or tests. First reproduce the formatter behavior in VS Code using the supplied Eclipse formatter setting, import order, and imports; the fix is complete when formatting inserts a blank line between the java and org groups.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
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.