Skip to content

DirectoryProjectProvider with GenericProject impl and DirectoryGroup replacement - #9737

Draft
mbien wants to merge 13 commits into
apache:masterfrom
mbien:dir-project-group
Draft

mbien wants to merge 13 commits into
apache:masterfrom
mbien:dir-project-group

Conversation

@mbien

@mbien mbien commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Refactors the directory-based project group action to use the new generic project type as base, combined with the pre-existing SubprojectsGroup. (see #9738 for generated design doc)

new API in lookup:

  • DirectoryProjectProvider API added with GpDirectoryProjectProvider as reference impl
  • Single method interface defines a single createProject(FileObject dir) method and is located in ide/projectuiapi

-> Relationship is now reversed. Functionality moved into the Lookup instead of hardcoded logic within a specialized Group impl. (could be potentially swapped out if needed)

Migration path was added to restore groups (old user config) of kind directory as generic project based SubprojectsGroup.

UI difference:

directory groups will now have their generic project displayed as node. We could probably find a way to hide it if needed.

this builds on top of #9736 and contains the commits so that it can be tested together. Commits marked with [2] belong to this PR.

Assisted-by: qwen3.8-27b + granite4.2:8b

@mbien mbien added Editor ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Oct 21, 2026
@neilcsmith-net

neilcsmith-net commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Thanks. Generally going in the right direction in my opinion. Initial comments after quick glance through -

  • DirectoryProjectProvider should probably be an SPI in projectapi in https://github.com/apache/netbeans/tree/master/ide/projectapi/src/org/netbeans/spi/project The docs should be more general, and not special case groups - there are other potential use cases (at least one in the fallback PR).
  • The SPI method might be better named something like findOrCreateProject to convey what it does? On the other hand, depends what the API side does ....
  • General usage of the SPI should be via the project API, possibly ProjectManager::findOrCreateProject adjacent to ProjectManager::findProject ? Groups should use this via the API.
  • The API should use lookup all, first wins, to support 0, 1 or multiple DirectoryProjectProvider implementations.
  • Directory groups should probably not fail if no provider is available - one hiding mechanism is disabling / excluding the generic project module. The feature should not break if that is done.

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

Labels

ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants