Skip to content

Ergonomics detect missing support for apisupport projects - #9636

Merged
jtulach merged 1 commit into
apache:masterfrom
jtulach:jtulach/DetectMissingJavaSourceGroup
Sep 29, 2026
Merged

jtulach merged 1 commit into
apache:masterfrom
jtulach:jtulach/DetectMissingJavaSourceGroup

Conversation

@jtulach

@jtulach jtulach commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Steps to Reproduce

Let's reproduce with ergonomics.

  • let's build it all as $ JAVA_HOME=/jdk-21 ant build
  • let's clean previous debris: rm -rf nbbuild/testuserdir/
  • let's run it: netbeans$ JAVA_HOME=/jdk-21 ant tryme
  • let's open internal terminal and netbeans ide/projectui/src/org/netbeans/modules/project/ui/ProjectsRootNode.java
    • that enables Java Support, but not API support
  • there should be errors when importing types for any other project
    • with 8a5d960 that gets detected
    • and the user is asked to open the project to fix the problem
initialize?
  • When the project is opened and the classpath scanning finishes, then the errors disappear.

Task list

  • Write some tests, maybe?

@jtulach jtulach self-assigned this Sep 23, 2026
@jtulach jtulach added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) Project UI View labels Sep 23, 2026
@jtulach
jtulach requested a review from MartinBalin September 23, 2026 13:16
}
);
}
return new SourceGroup[0];

@JaroslavTulach JaroslavTulach Sep 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MartinBalin told me there are two problems:

  • original code had GenericSources.genericOnly(project) for Sources.TYPE_GENERIC
  • listeners aren't implemented. They should as after associate() the old Sources impl starts to return new values without firing any event
  • here is a test suggested by Martin: 96d0a4c

@jtulach
jtulach force-pushed the jtulach/DetectMissingJavaSourceGroup branch from 0dda5d6 to 933ce5c Compare September 29, 2026 15:25
@JaroslavTulach

Copy link
Copy Markdown

Squashed. Will merge when it is green.

@jtulach
jtulach merged commit 51035bd into apache:master Sep 29, 2026
32 of 33 checks passed
if (!Sources.TYPE_GENERIC.equals(type)) {
Project prj = getLookup().lookup(Project.class);
if (prj != null && openingPrj == null) {
openingPrj = NotificationDisplayer.getDefault().notify(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) Project UI View

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants