Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320492 - [Compatibility] presentation toolitems only enabled for first open editor
Summary: [Compatibility] presentation toolitems only enabled for first open editor
Status: VERIFIED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 1.0 RC3   Edit
Assignee: Remy Suen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 08:23 EDT by Paul Webster CLA
Modified: 2010-07-27 12:37 EDT (History)
2 users (show)

See Also:
pwebster: review+
bokowski: review+


Attachments
Editor tool bar contribution patch v1 (2.53 KB, patch)
2010-07-21 11:59 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.