eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

Prompt user when switching to a locked workspace in Eclipse

Open SougandhS opened this issue 2 months ago • 6 comments

This change prompts the user when attempting to switch to a workspace in Eclipse that is currently locked by another instance, preventing Eclipse from restarting into the locked workspace. Previously, if Eclipse restarted with a locked workspace, the workspace lock prompt would appear, and clicking “OK” would exit the application, requiring the user to reopen Eclipse to select an active workspace. With this update, the user is warned before switching, informed about the lock via a dialog, and prevented from restarting into the locked workspace, improving workflow and avoiding unnecessary restarts.

Before :

https://github.com/user-attachments/assets/b719d795-ad60-4189-a31c-bb547c67d4f9

After : (commented out the initial development mode check for this video)

https://github.com/user-attachments/assets/da95abb1-119f-463f-8407-5f791f3bb0f5

SougandhS avatar Nov 08 '25 03:11 SougandhS

Test Results

 3 018 files  ±0   3 018 suites  ±0   2h 12m 57s ⏱️ - 9m 58s  8 242 tests ±0   7 993 ✅  - 1  248 💤 ±0  1 ❌ +1  23 646 runs  ±0  22 854 ✅  - 1  791 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 41c3dfe5. ± Comparison against base commit e15e9bf6.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Nov 08 '25 03:11 github-actions[bot]

Hi @iloveeclipse, could you please check this PR when you get some time ?

SougandhS avatar Nov 08 '25 04:11 SougandhS

would it be possible to bring up the exact same dialog (with the same information) in both situations?

BeckerWdf avatar Nov 10 '25 07:11 BeckerWdf

would it be possible to bring up the exact same dialog (with the same information) in both situations?

Sure 👍

SougandhS avatar Nov 10 '25 07:11 SougandhS

would it be possible to bring up the exact same dialog (with the same information) in both situations?

Updated as suggested

https://github.com/user-attachments/assets/dc8c411b-8974-4a36-88f6-79bf434d9afc

SougandhS avatar Nov 10 '25 09:11 SougandhS

@iloveeclipse Could u please re-check this ?

SougandhS avatar Nov 12 '25 15:11 SougandhS

This pull request changes some projects for the first time in this development cycle. Therefore the following files need a version increment:

bundles/org.eclipse.e4.ui.workbench.swt/META-INF/MANIFEST.MF
bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 4f32a5b6fd95dc2f7684b0f9a9b9faa18cf4b409 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Tue, 2 Dec 2025 04:47:34 +0000
Subject: [PATCH] Version bump(s) for 4.39 stream


diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench.swt/META-INF/MANIFEST.MF
index 8ecfefafc5..653acf36f8 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.workbench.swt;singleton:=true
-Bundle-Version: 0.17.1000.qualifier
+Bundle-Version: 0.17.1100.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
index 8e8ed96585..52a3fe6de8 100644
--- a/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.ide.application;singleton:=true
-Bundle-Version: 1.5.900.qualifier
+Bundle-Version: 1.5.1000.qualifier
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.21.0,4.0.0)",
diff --git a/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
index c115a47b5f..0d2916a41c 100644
--- a/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
-Bundle-Version: 3.22.800.qualifier
+Bundle-Version: 3.22.900.qualifier
 Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %Plugin.providerName
-- 
2.51.2

Further information are available in Common Build Issues - Missing version increments.

eclipse-platform-bot avatar Dec 02 '25 04:12 eclipse-platform-bot

I believe M3 is the bad time for changing workspace locking code. Take time, test the change also please with the workspace selection dialog that is shown on Eclipse startup, and if everything will work, it could land in the next release.

I have tested the change with a new SDK build and is even working with Eclipse startup case image


image

SougandhS avatar Dec 04 '25 09:12 SougandhS