Bug 560762 - Too late context activation in a preference page
Summary: Too late context activation in a preference page
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.12   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-04 05:06 EST by Christian Dietrich CLA
Modified: 2020-03-04 13:45 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dietrich CLA 2020-03-04 05:06:35 EST
Hi,

we embedded an Editor in a Preference page. During the creation of the preference page we create the Source Viewer and call org.eclipse.ui.contexts.IContextService.activateContext(String, Expression)
to activate our context.

this works fine if our preference page is not the one that is shown at opening (first opening in session)

if we then switch to our preference page and close and reopen the preference dialog then on the activation keybinding problems are reported cause the contexts of the main window are still active and the context switch in org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.activate(Shell)
did not happen yet.

how can this be solved. what is the intended way to activate our own context in the usecase?

see also https://github.com/eclipse/xtext-eclipse/issues/1361 for more details

Thanks
Christian
Comment 1 Thomas Wolf CLA 2020-03-04 07:08:32 EST
Activate/deactivate your context when the SourceViewer gets/loses the focus?
Comment 2 Christian Dietrich CLA 2020-03-04 09:25:34 EST
have to think about possible side effects
Comment 3 Rolf Theunissen CLA 2020-03-04 11:11:20 EST
I wonder if this is related to Bug 490780, Bug 489335 and/or Bug 414544, if so there is a time window in which the active part/window and context are out of sync.