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

Improve workspace lock dialog.

Open raghucssit opened this issue 1 year ago • 3 comments

If the workspace directory which we are trying to use is locked then we get the below dialog. image

This dialog is good. But we can improve this dialog with some other information like

  1. user.name: This greatly help the user in case of multi user environment where multiple developers uses common workspace which is located on the network.
  2. host-name: This gives little more hint that from host that lock has been initiated.
  3. DISPLAY on Linux - gives a hint which VNC session is locking workspace
  4. JVM process id, so one could see which from many Eclipse processes on same host/user is holding the lock.

This will make user life easy if they know who has held the workspace and they can talk to the respective developer.

Plan: We can write the above mentioned information onto .metadata/.lock file file. When any user successfully acquires the lock. If the next user failed to get the lock, Then we can read this file and show this data (if available on current OS) inside error dialog above shown.

raghucssit avatar Sep 30 '24 12:09 raghucssit

When you working on this anyway .. add the PID (ProcessID )that holds the lock

jukzi avatar Sep 30 '24 13:09 jukzi

... and DISPLAY value on Linux, as we have VNC sessions of same user running on same host but with different X11 DISPLAY's.

I've updated TODO's list.

iloveeclipse avatar Sep 30 '24 13:09 iloveeclipse

Note, some of the information (like hostname) might require API calls that might hang Eclipse, so we should avoid using them. Other data (like DISPLAY) might be only available on some platforms (Linux/Mac) but not on others (Win).

So both kind of data should be optional and shouldn't break new code if missing.

Also new code should make sure it can work with lock files created by different platform versions, as it is possible to use same workspace with different Eclipse versions too.

iloveeclipse avatar Sep 30 '24 13:09 iloveeclipse

Fixed via https://github.com/eclipse-platform/eclipse.platform.ui/pull/2347

iloveeclipse avatar Apr 09 '25 07:04 iloveeclipse