Skip to content

Code completion for class names is broken in record component list #9182

@nmatt

Description

@nmatt

Apache NetBeans version

Apache NetBeans 28

What happened

Code completion for class names only works on the first component of a record. On the second and subsequent components, only interface names are completed, class names are not.

Language / Project Type / NetBeans Component

Java, Editor

How to reproduce

  1. Invoke code completion in public record Example(TU|), where the "|" indicates the caret position where code completion is invoked.
    => The code completion popup shows the expected types:

    Image
  2. Invoke code completion in public record Example(TimeUnit a, TU|), where the "|" indicates the caret position where code completion is invoked.
    => The code completion popup only shows matching interface types (just one in this example):

    Image

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

JDK 17

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    EditorJava[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)kind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions