Skip to content

Smart Import: offer to open/show already-imported projects#4170

Open
deepika-u wants to merge 1 commit into
eclipse-platform:masterfrom
deepika-u:already_existing_project
Open

Smart Import: offer to open/show already-imported projects#4170
deepika-u wants to merge 1 commit into
eclipse-platform:masterfrom
deepika-u:already_existing_project

Conversation

@deepika-u

Copy link
Copy Markdown
Contributor

Problem
When Smart Import found a folder that was already imported as a project, it greyed out the row and silently ignored any attempt to check it - no explanation, no way forward. Users had to abandon the wizard just to go interact with a project that was already sitting right there in the workspace.
That row is still greyed out and still can't be selected for import - that part is correct and unchanged.

Fixes eclipse-platform/eclipse.platform#1978

What's now
Now that it's no longer a dead end:

  • Already open?Show In Project Explorer jumps you straight to the project.
  • Closed?Open Project opens it, then shows it.
  • Changed your mind?Cancel leaves everything exactly as it was.

Additionally,
The wizard also gets out of your way on its own: if the project you just acted on was the only thing selected, the wizard closes for you automatically. If other projects are still queued up for import, it stays open so that you can finish the job.

What's different for the user

  • No more silent, unexplained dead end when a project already exists.
  • One click to get to where you actually meant to go - open or reveal, instead of quitting the wizard and hunting for the project
    yourself manually.
  • The wizard now senses when there's nothing left to do and closes itself, instead of sitting there disabled and waiting to be
    dismissed manually.
  • The affected row is also highlighted the moment the popup appears, so it's obvious at a glance which project the dialog is talking about, even in a long list.

Scope
Only applies to projects matching by location - i.e. the exact project is already imported. Projects that merely collide by name (different folder, same project name) are untouched and keep their existing silent-exclusion behavior.

Implementation notes

  • isExistingProject now delegates to a new findExistingProject, which returns the actual matching IProject instead of just a boolean, so the checkbox handler has something to act on.
  • The auto-close after a completed action is dispatched via asyncExec - this lets the current checkbox-event callback finish
    cleanly before the wizard container is torn down, rather than closing the shell out from under its own event loop.

Before pr

  1. Select a project which is already imported, unable to do anything on that specific project. ->
image
  1. Select a project which is already imported but closed, unable to do anything on that specific project. ->
image

After pr

  1. Select a project which is already imported. It gets highlighted and what next can be done is shown in the pop-up window ->
image

Once the user clicks on "Show In Project Explorer", focus is shifted to the new project.
image

  1. Select a project which is already imported but closed. ->
image

Once the user clicks on "Open Project", project is opened and focused on.
image

  1. Select a project which needs to be imported then another which is already imported. ->
image

Once the user clicks on "Show In Project Explorer", focus is shifted to the project but wizard continues to retain so that other project can be imported when "Finish" is clicked on.
image

  1. Select a project which needs to be imported then another which is already imported but closed. ->
image

Once the user clicks on "Open Project", focus is shifted to the opened project but wizard continues to retain so that other project can be imported when "Finish" is clicked on.
image

@deepika-u deepika-u force-pushed the already_existing_project branch from b892066 to 53f5c94 Compare July 8, 2026 12:46
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

   855 files  ±0     855 suites  ±0   53m 33s ⏱️ + 1m 24s
 8 109 tests ±0   7 866 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 229 runs  ±0  19 575 ✅ ±0  654 💤 ±0  0 ❌ ±0 

Results for commit f8085f0. ± Comparison against base commit 0e1835a.

♻️ This comment has been updated with latest results.

@deepika-u

Copy link
Copy Markdown
Contributor Author

@merks : When you get some time, can you review this please?

@deepika-u deepika-u force-pushed the already_existing_project branch from 53f5c94 to f8085f0 Compare July 9, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If importing a project failed because its exist, ask the user to open/jump to the project

1 participant