Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320492

Summary: [Compatibility] presentation toolitems only enabled for first open editor
Product: [Eclipse Project] e4 Reporter: Paul Webster <pwebster>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: bokowski, remy.suen
Version: 1.0Flags: pwebster: review+
bokowski: review+
Target Milestone: 1.0 RC3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Editor tool bar contribution patch v1 none

Description Paul Webster CLA 2010-07-21 08:23:52 EDT
presentation tool items like Toggle Mark Occurrences and Show Selected Element Only are enabled for the first Java editor opened.  If you open more and close the first, they stay disabled.

Closing all java editors will allow them to be enabled on the first editor opened.

PW
Comment 1 Remy Suen CLA 2010-07-21 11:59:19 EDT
Created attachment 174876 [details]
Editor tool bar contribution patch v1

We were using the editor's context for its contributions. This is incorrect because there is only one editor action bar per workbench window. We should be scoping contributions at the editor's level.

Tool items were not getting rendered properly because it had no parent widget due to a flaw in the getUIContainer(MUIElement) implementation in ToolBarRenderer.
Comment 2 Paul Webster CLA 2010-07-21 12:57:14 EDT
Looks good.

PW
Comment 3 Paul Webster CLA 2010-07-21 12:59:22 EDT
Boris, I think we need to fix this in RC3 (the editor actions in the toolbar only work for the first editor of that type).

PW
Comment 4 Remy Suen CLA 2010-07-21 13:10:26 EDT
(In reply to comment #1)
> Created an attachment (id=174876) [details]
> Editor tool bar contribution patch v1

Patch released to HEAD.
Comment 5 Remy Suen CLA 2010-07-27 12:37:34 EDT
Verified with I20100726-2152 on Windows XP.