Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve workspace lock dialog. #2343

Open
raghucssit opened this issue Sep 30, 2024 · 3 comments
Open

Improve workspace lock dialog. #2343

raghucssit opened this issue Sep 30, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@raghucssit
Copy link
Contributor

raghucssit commented Sep 30, 2024

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 raghucssit added the enhancement New feature or request label Sep 30, 2024
@jukzi
Copy link
Contributor

jukzi commented Sep 30, 2024

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

@iloveeclipse
Copy link
Member

iloveeclipse commented Sep 30, 2024

... 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
Copy link
Member

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.

raghucssit added a commit to raghucssit/eclipse.platform.ui that referenced this issue Oct 1, 2024
Write workspace lock info like user, host, java process id, display
properties onto .lock file if the lock was successful.
Read the current lock data in case of lock was unsuccessful and shown it
in error dialog.
If the .lock file has no info then nothing is shown. For older eclipse
versions.

see eclipse-platform#2343
raghucssit added a commit to raghucssit/eclipse.platform.ui that referenced this issue Oct 1, 2024
Write workspace lock info like user, host, java process id, display
properties onto .lock file if the lock was successful.
Read the current lock data in case of lock was unsuccessful and shown it
in error dialog.
If the .lock file has no info then nothing is shown. For older eclipse
versions.

see eclipse-platform#2343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants