| Summary: | [Compatibility] 'Link with Selection' doesn't toggle properly in the 'Git Repositories' view | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> |
| Component: | UI | Assignee: | Paul Webster <pwebster> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, pwebster |
| Version: | 4.2 | ||
| Target Milestone: | 4.2 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 331240 | ||
|
Description
Remy Suen
'Hierarchical Branch Layout' and 'Display Latest Branch Commit' also has this problem. 'Link with Editor' does _not_. I think they use command states for the toggling, Paul. What is our strategy for that in the compatibility layer? It's probably that we don't have one yet. We're supposed to be compatible, and with Prakash's 3.x changes we have a good pattern for toggle commands based on org.eclipse.ui.handlers.RadioState PW As these toggle commands are predefined in XML, their state values are stored by using RegistryToggleState.STATE_ID. The RegistryToggleState class is defined in org.eclipse.ui.workbench so the renderer cannot be the one handling this link. Perhaps the link should be established when the registry is first read so that the menu contribution itself is mapped to the command at a 1-1 link. When the cloning is done in ContributionRecord, we then map a listener from the clone onto the menu contribution. Now if the state changes, the menu contribution is notified by the first 1-1 link. When the menu contribution is modified, its N listeners from the clone are notified then all the cloned copies' selection states will be updated accordingly. *** Bug 351350 has been marked as a duplicate of this bug. *** *** Bug 374503 has been marked as a duplicate of this bug. *** I've pushed a fix for this up to pwebster/bug374503 Remy, could you have a quick look? PW (In reply to comment #7) > I've pushed a fix for this up to pwebster/bug374503 > > Remy, could you have a quick look? Paul implemented some changes I asked for and it looks okay to me for M7. Released for M7 PW Verified in 4.2-I20120321-0610. |