Skip to content

Create imported projects in a single workspace operation - #4257

Open
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:smartimport-batch-project-creation
Open

Create imported projects in a single workspace operation#4257
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:smartimport-batch-project-creation

Conversation

@vogella

@vogella vogella commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Smart import created every selected project in its own workspace operation, so an import of N projects produced N resource deltas and woke every listener (JDT, PDE, Project Explorer, team providers) N times. Running the creation loop as one workspace operation collapses that into a single delta, in the same spirit as the batching done for the existing projects import. The parallel configuration phase and its scheduling rules are untouched, no configurator runs in the batched loop.

The second change removes a duplicated full refresh: the container is refreshed with DEPTH_INFINITE and then the project created for that container is refreshed again, which is the same resource for a project selected in the wizard. The extra refresh is now done only for nested projects, where the project really is a different resource than the container.

Both are covered by a new test asserting that all projects arrive in one resource change event. Builds on #4256, so the first commit belongs to that PR.

SmartImportJob turns auto-building off for the duration of the import and
turns it back on as the last statement of its try block. A configurator
that throws, or a cancellation, skips that statement, so the workspace is
left with auto-building permanently disabled until the user notices and
toggles it manually.

Restore the previous setting in a finally block instead. Also null check
the optional import listener when closing projects after the import.
SmartImportJob created every selected project in its own workspace
operation, so each project produced its own resource delta and every
listener (JDT, PDE, Project Explorer, team providers) was notified once
per project. The creation loop now runs as one workspace operation, which
collapses those deltas into a single one. No configurator runs in that
loop, so the parallel configuration phase and its scheduling rules stay
as they are.

The import also walked each project twice: importProjectAndChildrenRecursively
refreshes the container with DEPTH_INFINITE and afterwards refreshes the
project it created for that container, which is the same resource for a
project selected in the wizard. The second refresh is now done only when
the project differs from the container, which is the case for nested
projects detected in a child folder.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   49m 19s ⏱️ - 5m 13s
 8 174 tests +2   7 931 ✅ +2  243 💤 ±0  0 ❌ ±0 
20 424 runs  +6  19 768 ✅ +6  656 💤 ±0  0 ❌ ±0 

Results for commit d815981. ± Comparison against base commit 6e05cae.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant