Skip to content

Organize Imports should auto-import missing imports (and allow the user to resolve ambiguities) #50

@anthonyvdotbe

Description

@anthonyvdotbe

At the start, I had no imports.

The logs only say:

INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS
INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=jdk.internal.org.objectweb.asm.Attribute$Set ]
INFO [org.netbeans.modules.java.editor.imports.ComputeImports]: Cannot resolve type element "ElementHandle[kind=CLASS; sigs=jdk.internal.org.objectweb.asm.Attribute$Set ]".

I ended up importing everything via the quick fixes one by one. The required imports were:

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Set;

Extension version 1.0.0 with VS Code

Version: 1.83.1 (user setup)
Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc
Date: 2023-10-10T23:48:05.904Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions