Bug 220260 - [Commands] Incorrect active shell returned
Summary: [Commands] Incorrect active shell returned
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-25 14:32 EST by Paul Webster CLA
Modified: 2020-11-24 12:23 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2008-02-25 14:32:10 EST
HandlerUtil#getActiveShell(*) returns the active shell based on the ActiveShellSourceProvider code:

final Shell newActiveShell = display.getActiveShell();
currentState.put(ISources.ACTIVE_SHELL_NAME, newActiveShell);

It is susceptable to transient shells.

PW
Comment 1 Tod Creasey CLA 2008-02-25 14:43:05 EST
See ProgressManagerUtil#getDefaultParent
Comment 2 Paul Webster CLA 2008-03-19 23:37:42 EDT
Would it be enough to call #getDefaultParent()?  Will that return the active shell if it's a window or a dialog (and something useful if there's one of those transient tooltips up)?

PW
Comment 3 Paul Webster CLA 2009-03-02 11:41:35 EST
Updated as per http://wiki.eclipse.org/Platform_UI/Bug_Triage
PW
Comment 4 Eclipse Genie CLA 2018-09-28 17:18:41 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Lars Vogel CLA 2019-08-08 15:19:46 EDT
This bug has been marked with as "stalebug" for some time now. I mark this bug as "worksforme" to indicate that no work is planned here. 

If this bug is still relevant for the latest release, please reopen the bug and remote the "stalebug" whiteboard tag.
Comment 6 Jonah Graham CLA 2020-11-23 13:57:20 EST
Still an issue. See Bug 569067 for a usecase.

I have reopened for now, but I may patch up the usecase in Bug 569067 if this issue is too hard to solve.
Comment 7 Jonah Graham CLA 2020-11-24 12:23:53 EST
(In reply to Jonah Graham from comment #6)
> Still an issue. See Bug 569067 for a usecase.
> 
> I have reopened for now, but I may patch up the usecase in Bug 569067 if
> this issue is too hard to solve.

I am not going to be able to disentangle this. Among other things I don't think ActiveShellSourceProvider exists anymore (e4 change?) but the bug is still present.