Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316821 - GTK File Open Atom can be lost to second eclipse
Summary: GTK File Open Atom can be lost to second eclipse
Status: CLOSED DUPLICATE of bug 528414
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 326262 343664 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-14 16:07 EDT by Andrew Niefer CLA
Modified: 2018-01-16 02:23 EST (History)
7 users (show)

See Also:


Attachments
proposed patch (1.21 KB, patch)
2010-06-14 16:07 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2010-06-14 16:07:06 EDT
To support opening files from the command line on gtk, SWT attaches a "SWT_Window_ + APP_NAME" atom to a hidden window and listens for the
"org.eclipse.swt.filePath.message" property.

If a second eclipse instance is started, this second instance "steals" the atom from the previously running eclipse.  Then, if that second instance is closed, there is no loner any window with the "SWT_Window + APP_NAME" atom attached to it.

Launching a self-hosted eclipse session will cause this, and once that debug session is terminated, any future open file attempts will result in a new eclipse instance instead of reusing the original eclipse.

I would suggest that we should first check to see if there is any existing window with the atom, and if so, leave it and not set the atom on our own shell.  This means the first eclipse always keeps receive the open file messages regardless of other instances starting and stopping.
Comment 1 Andrew Niefer CLA 2010-06-14 16:07:52 EDT
Created attachment 171870 [details]
proposed patch
Comment 2 Oleg Besedin CLA 2010-09-27 13:32:19 EDT
*** Bug 326262 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Niefer CLA 2011-04-25 11:23:07 EDT
*** Bug 343664 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Kurtakov CLA 2018-01-16 02:23:05 EST
X atoms are no longer suitable. Migration to dbus is ongoing and dbus ownership is passed back to the previous window.

*** This bug has been marked as a duplicate of bug 528414 ***