When asking “Central Mankind Brain” you should always ask the "Great Teacher" 
Alois Drahoslav Drchlík for a second opinion ��.

I think it makes a lot of sense to limit the scan depth, stop descending once a 
project marker is found, show results as they come in, and offer a Cancel. 
Finding projects is cheap. Opening them (classpath, indexing) is what hurts 
with the repos Matthias listed.

For the "UI tweak", I think we already have the pattern. Maven parent POMs show 
a "Modules" node, and Gradle shows "Subprojects". Both list child projects 
without opening them, and you open one with a double click. Users understand 
that.

So Open Folder could:

1. open only the root folder (as a real project, or as the fallback from #9650),
2. show a "Projects" node under it, filled by a background scan, nothing opened 
yet,
3. offer "Open All Projects (N)", which opens directly below a configurable 
limit (as suggested by Sven) and asks for confirmation above it,
4. optionally, read a .nb-workspace.json (your option A) to preselect what gets 
opened.

Nothing gets opened by accident, Jan's "don't show them unless opened" holds, 
and anyone who needs Find Usages across everything is one click away.

Cheers,
Toni



Am 02.10.26, 11:33 schrieb "Jaroslav Tulach" <[email protected] 
<mailto:[email protected]>>:


When out of ideas, ask “Central Mankind Brain”:


UX Concept: Progressive Shallow Flattening for Deep Directory Scanning


When a user selects a root folder to scan for nested projects, recursively 
loading every subdirectory simultaneously can cause technical paralysis (IDE 
freezes, UI lags) and cognitive overload (a chaotic waterfall of hundreds of 
results).
To solve this, we combine Progressive Flattening (collapsing the path noise) 
with Asynchronous Lazy Loading(fetching data in chunks).
1. Shallow Scanning Boundaries


The IDE should never perform an unrestricted deep scan of the file system from 
the start.
First Wave Depth Limit: Limit the initial background scan to a depth of 2 or 3 
subdirectories.
Project Heuristics: The scanning algorithm should only look for specific 
project definition files (e.g., pom.xml, build.gradle, package.json, 
CMakeLists.txt).
Instant Pruning: Once a project marker is found in a directory, the algorithm 
flags that folder as a project, flattens it to the UI view, and stops scanning 
deeper into that specific branch (ignoring node_modules, target, bin, etc.).
2. Asynchronous UI Streaming


The user must not be forced to wait for the entire file system scan to finish 
before they can interact with the IDE.
Non-Blocking UI: As soon as the background thread discovers the first few 
projects, it immediately streams theminto the flattened list.
Progress Indicator: Display a discrete, non-intrusive loading indicator (e.g., 
a slim blue progress bar at the top of the sidebar, similar to VS Code or 
Chrome downloads) with a text status: Scanning directory for projects....
Immediate Interactivity: The user can hover over, click, or open any discovered 
project even while the rest of the disk is still being scanned.
3. List Virtualization and Pagination


Rendering thousands of UI elements simultaneously will crash the rendering 
engine (DOM or Swing layout management).
Hard Limit on Display: Cap the initial rendered view to the top 50 closest or 
most recently modified projects.
UI Virtualization: Ensure the Project View components are fully virtualized—the 
IDE should only allocate memory for and render the rows currently visible 
inside the viewport.
Manual Expansion (Pagination): Place a trigger action at the bottom of the list 
when more results are available:
🔄 Load 50 more projects... (412 total found so far)
4. UI Concept and Layout Mockup


This is how the Project View should transform during an active background scan:
📁 Selected Root: /Users/developer/work/


[🔍 Type to filter discovered projects... ]


▼ Discovered Projects (Showing 3 of 150+)
☕ [work/web/frontend] › ReactApp-Main
☕ [work/web/backend] › Java-API-Gateway
☕ [work/shared/utils] › Common-Logger


🔄 Load 50 more projects... [Background scan active] [Cancel]
Layout Breakdown:


The Repository Ticker ([...]): The parent directory context is flattened into a 
subtle, low-contrast prefix label.
The Project Leaf: The actual project name is pulled to the foreground with high 
contrast.
The Escape Hatch ([Cancel]): A clear action button to immediately abort the 
background file system scan if the user accidentally targeted an entire hard 
drive.
5. Interaction States & Edge Cases


A. The User Types a Filter While Scanning


Behavior: If the user types a keyword (e.g., "Auth"), the background scanning 
thread pivots its priority.
Technical Solution: It immediately prioritizes scanning directory names 
containing "Auth" and bubbles them up to the top of the flattened view 
instantly, while continuing the generic scan at a lower CPU priority.
B. Opening a Project (De-flattening)


Behavior: Clicking a project terminates or pauses the broader directory search.
Transition: The chosen project layout transitions smoothly from the flat 
discovery view into the regular, deeply nested Project Tree structure ready for 
coding.
Would you like to explore the technical implementation details for this 
approach (such as defining thread communication or UI virtualization 
libraries), or should we focus on designing the Settings panel where users can 
blacklist specific heavy folders (like node_modules or .git) from being scanned 
at all?






> 2. 10. 2026 v 10:17, Jaroslav Tulach <[email protected] 
> <mailto:[email protected]>>:
> 
> Sven Reimers wrote:
>> Maybe limit open all to a configurable limit by default.. ?
>> Would be good to be helpful in most cases without killing the others..
> 
> Thanks Matthias for the heads-up challenge. Yes, Sven we need a "UI tweak" as
> Jan Lahoda put it: https://github.com/apache/netbeans/pull/ 
> <https://github.com/apache/netbeans/pull/>
> 9631#discussion_r4163701215
> 
> The question is how such a tweak should look like? I was considering following
> alternatives:
> 
> ### A: Special File on Disk
> 
> There could be `.nb-workspace.json` file in the root of NetBeans repository
> (and other repositories as well) that would specify what projects to open
> instead of scanning for all.
> 
> ### B: Pre-scan Warning
> 
> When opening a project via a file chooser dialog a "pre-scan" for potential
> projects would be done. Warning the user if the scan looks too big.
> 
> What then? Limit to 100 modules? Limit the depth of scan?
> 
> ### C: Deferred Projects View
> 
> Display just a limited set of projects. Limited by a number or limited by a
> depth of hierarchy? Indicate that there is more. Give user a chance to proceed
> - by expanding a node? By invoking a "Scan for more projects" pop-up action?
> 
> 
> ### D: Precompute "Go to" Dialog
> 
> Initialize just some part of the functionality!? Scan for files or types and
> expose them in "Go to " dialogs, but don't really open the projects in
> OpenProjects.getDefault().
> 
> Solution with unpredictable consequences... out of existing concepts.
> 
> 
>> there could be a UI tweak to not show these projects, unless explicitly open
> by the user
> 
> I am trying hard to visualize such a UI tweak for weeks, but so far it is not
> materializing. Help welcomed.
> 
> -jt
> 
>> Matthias Bläsing via dev <[email protected] 
>> <mailto:[email protected]>> schrieb am Do., 1. Okt.
>> 
>> 2026, 21:44:
>>> Hi,
>>> 
>>>> Am Donnerstag, dem 01.10.2026 um 14:26 +0200 schrieb Jaroslav Tulach:
>>>>> When opening such a
>>>>> project, it (almost all the time) makes sense to **open all the
>>> 
>>> projects** in
>>> 
>>>> the Git repository. That's not a NetBeans philosophy. NetBeans allows
>>> 
>>> one to
>>> 
>>>> _cherry pick and open only some of the projects_.
>>> 
>>> before you implement this, think carefully what you reply to users,
>>> that shoots themselves in the foot with that behavior.
>>> 
>>> - Liferay: https://github.com/liferay/liferay-portal 
>>> <https://github.com/liferay/liferay-portal>
>>> 
>>> 150+x projects (based on modules/apps folder)
>>> 
>>> - NetBeans: https://github.com/apache/netbeans/ 
>>> <https://github.com/apache/netbeans/>
>>> 
>>> 1000+x projects (based on number of nbproject directories in the tree)
>>> 
>>> - OpenJDK: https://github.com/openjdk/jdk <https://github.com/openjdk/jdk>
>>> 
>>> 50+x projects (based on jdk/src)
>>> 
>>> - OpenHAB Addons: https://github.com/openhab/openhab-addons 
>>> <https://github.com/openhab/openhab-addons>
>>> 
>>> 500+x projects (based on bundles)
>>> 
>>> Any of these is not fun if you accidentally choose to open all projects
>>> at once.
>>> 
>>> Greetings
>>> 
>>> Matthias
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected] 
>>> <mailto:[email protected]>
>>> For additional commands, e-mail: [email protected] 
>>> <mailto:[email protected]>
>>> 
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists 
>>> <https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>
> 
> 
> 
> 





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to