Community
Participate
Working Groups
Since 3.5 M4. 0. start with new workspace 1. enable the 'Editor Presentation' action set via Window > Customize Perspective... 2. create Java project 'P' 3. create file 'f' ==> Text editor editor opens 4. create class 'C' ==> Java editor opens ==> the icons that are contributed by the Java editor's 'Java Editor Presentation' action set to the same toolbarPath as the ones from 'Editor Presentation' action set are not visible i.e. 'Toggle Mark Occurrences' and 'Toogle Breadcrumb' is missing. Most likely caused by configurable toolbar work. This affects all components that contribute to the same tool bar and results on missing toolbar icons, hence critical.
NOTE: the 'Java Editor Presentation' action set itself is not visible per default but enabled via org.eclipse.ui.actionSetPartAssociations extension.
Eric, assigning to you because you are familiar with the Customize Perspective code changes.
I'm not that familiar but I'll take a look... Yikes! Changing the EditorPresentation action set state resulted in the following: A call to setHiddenMenuItems containing 57 'ids' !! A call to setHiddenToolbarItems containing 15 ids Something's definitely wrong here...mt current suspicion is that we're scraping all 'unchecked' items in the two trees and claiming they're explicitly 'hidden' as opposed to adding/removing elements from the two lists as the -user- checks/un-checks the elements.
This is first thing on my plate...
OK, I looked at this last night and it appears that on close the dialog scrapes its model of check-states and simply declares anything that's 'unchecked' as hidden. If I interpret this correctly it means that any menu item that is not visible (i.e. through its 'visibleWhen' expression) will be declared hidden on exit. I'm going to see if I can arrange that the dialog remembers every item that has been -explicitly- changed (by a user gesture) and only allow those items to affect the dialog's result...
Created attachment 125522 [details] Only modify the list of 'hidden' items based on actual user changes Only items whose state has been explicitly set by the user (or implicitly through (un)checking a parent element) are used to update the menu/tb 'hidden' lists.
Committed in >20090212. Applied the patch. Dani, can you check to ensure that your scenario now works. This should take care of the missing items but I'm not sure about the icon issues...
Eric, from your last comment I assume all your changes are in HEAD. I tested with N20090212-2000 and the scenario from comment 0 is not fixed.
Created attachment 125629 [details] Picture showing tool bar with missing buttons
Created attachment 125630 [details] Picture showing the expected buttons
Dani, my current testing is showing that org.eclipse.ui.workbench.texteditor has a perspectiveExtension that explicitly declares "org.eclipse.ui.edit.text.toggleShowSelectedElementOnly" as a hidden toolbar item...is this possible? I'm seeing this on the initial load of the perspective on a clean WS using I20090211-0900.
Yes, it hides one of the three items but none of the missing ones. In addition I added this just recently i.e. it cannot affect this bug which already exists in M4.
>Dani, my current testing is showing that org.eclipse.ui.workbench.texteditor >has a perspectiveExtension that explicitly declares >"org.eclipse.ui.edit.text.toggleShowSelectedElementOnly" as a hidden toolbar >item...is this possible? This might be yet another problem: I expected that this extension would hide it out of the box - which works - but then the user can enable it on the 'Tool Bar Visibility' tab of the 'Customize Perspective' dialog. This works in the dialog i.e. I can select the icon but it does not appear in the toolbar after clicking 'OK'.
Dani, yep I've got another issue. Apparently the ActionSets are also getting 'locked' on close (meaning that since the 'Java Editor Presentation' was off when the dialog was first opened it doesn't get activated when the java editor opens. Top of my plate again...sorry dude (thanks for picking this up!)
Created attachment 126024 [details] Patch to only modify action sets that are changed by the user Just to capture the change...
Committed in >20090218. Applied the patch. This is a start and fixes the ActionSet locking issue...there will be another patch with (hopefully final) fixes for menu/toolbar updating...
Created attachment 126062 [details] Patch to fix remaining issues This patch fixes: - Unchecking a menu correctly marks all children as 'changedByUser' - updates the action bars on exit if necessary - causes the 'reset perspective to update the main menu as well as the CoolBar I'll apply this patch once I've reviewed everything with Paul.
Paul, there's a remaining issue that I believe has existed forever...if you 'customize' an ActionSet to be either always 'on' or 'off' there seems to be no ways (except reset) to get it back to 'neither' (i.e. not in either list). Paul, we should go over this whenever you can spare the time...
Created attachment 126167 [details] Updated patch to fix remaining issues this is just a re-spin of the previous patch with a few clean up tweaks...
Committed in >20090219. I've tried all the scenarios I can think of...
Marking as FIXED...please re-open if you encounter any issues.
Verified that my scenarios from comment 0 and comment 13 are fixed. Thanks Eric!
No problemo, I'm glad you found it before it got too far into the wild...;-).