Bug 572804 - DefaultHelpUI.displayContext(IContext, int, int, boolean) overwrites IContext method parameter
Summary: DefaultHelpUI.displayContext(IContext, int, int, boolean) overwrites IContext...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 4.15   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-04-13 08:27 EDT by Julian Schneider CLA
Modified: 2021-04-13 08:47 EDT (History)
3 users (show)

See Also:


Attachments
Codesnipped of DefaultHelpUI (47.58 KB, image/png)
2021-04-13 08:27 EDT, Julian Schneider CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Schneider CLA 2021-04-13 08:27:12 EDT
Created attachment 286090 [details]
Codesnipped of DefaultHelpUI

The DefaultUI class simply overwrites the passed IContext in org.eclipse.help.ui.internal.DefaultHelpUI.displayContext(IContext, int, int, boolean) line 333.

This behaviour is a major change of the simple function of "simply displaying" the passed context. 

This change was introduced by Bug ID 533828 and it does not seem to be right. Even though the way to get the desired context using the IContextProvider.getContext(Object target) may be correct it is not the task of this method to retrieve it and overwrite the original passed IContext.
This change made it impossible to display custom build help contexts when there is a context provider present for the active part. 

Further, the help context is only overwritten when displayed within the workbench. When the user sets the IHelpBaseConstants.P_KEY_WINDOW_INFOPOP in the preference store the original passed context is displayed in an extra window (Line 325). This seems to be inconsitent to overwrite the context in one case an d display the original context in another.
Comment 1 Andrey Loskutov CLA 2021-04-13 08:47:46 EDT
Also note bug 533828 comment 15, bug 533828 comment 22.
Later one is probably exactly this issue, example code attached.

@Johan: could you please check this?