eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
class file in source root directory interferes with package explorer
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 35
Description
I have a Maven project with the usual structure. When for some reason any `*.class` file is present in the `src/main/java` root directory, the Package Explorer shows an empty source directory without subpackages/classes and no expansion option.
Additionally when the class file is empty, the Error Log view infos:
```
Could not index empty /project/src/main/java/x.class
```
# Versions
* Eclipse IDE for RCP and RAP Developers
Version: 2026-06 (4.40.0)
Build id: 20260604-0653
* openjdk version "21.0.12.1" 2026-08-18 LTS
OpenJDK Runtime Environment Temurin-21.0.12.1+1 (build 21.0.12.1+1-LTS)
Contributor guide
Research direction
Reproduce this in a Maven project by placing a valid or empty *.class file in the src/main/java root directory. Start with the Package Explorer behavior and the Error Log message, then trace the relevant indexing or source-folder handling; done means packages and classes remain expandable and an empty class file does not break the explorer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100