Community
Participate
Working Groups
Steps: 1. Press Focus button in Task List On Gtk only the New Task and Presentation button remain whereas on 3.x the Focus and Refresh button also remain in the toolbar. This is the code that gets executed in TaskListView.setFocusedMode(): IToolBarManager manager = getViewSite().getActionBars().getToolBarManager(); ToolBarManager toolBarManager = getToolBarManager(manager); try { if (toolBarManager != null) { toolBarManager.getControl().setRedraw(false); } if (focusedMode && isAutoExpandMode()) { manager.remove(FilterCompletedTasksAction.ID); manager.remove(CollapseAllAction.ID); } else if (manager.find(CollapseAllAction.ID) == null) { manager.prependToGroup(ID_SEPARATOR_CONTEXT, collapseAll); manager.prependToGroup(ID_SEPARATOR_CONTEXT, filterCompleteTask); } updateFilterEnablement(); manager.update(false); } finally { if (toolBarManager != null) { toolBarManager.getControl().setRedraw(true); } }
Not entirely sure if this problem is worth pursuing at the moment since I believe the tool bar code needs to be revamped, is this correct, Paul?
(In reply to comment #0) > manager.update(false); Could you see if calling getViewSite().getActionBars().updateActionBars() will fix the problem? Also see bug 336613. Calling update(boolean) on the IContributionManager is not the way to go about updating a view's action bars.
Created attachment 205560 [details] mylyn/context/zip
Thanks for the hint! That fixes it. Committed 8d5132e57c898e8826764fe3ad29c4ea8f912d1f. The only differences to 3.x besides ordering of the buttons is that some buttons get disabled when the Task List view looses focus. The get re-enabled once the view is clicked. This seems to apply to all actions registered through the "org.eclipse.ui.viewActions" extension point. Do you have any thoughts why that would be happening?
(In reply to comment #4) > The only differences to 3.x besides ordering of the buttons is that some > buttons get disabled when the Task List view looses focus. The get re-enabled > once the view is clicked. I haven't installed Mylyn to check yet but I think I see what you mean. This is like how 'Remove Selected Breakpoints' and 'Remove All Breakpoints' is enabled when the 'Breakpoints' view is active but they get disabled when you activate another view, correct?
(In reply to comment #5) > This is like how 'Remove Selected Breakpoints' and 'Remove All Breakpoints' is > enabled when the 'Breakpoints' view is active but they get disabled when you > activate another view, correct? Yes, that's exactly the same in the for the 'Synchronize All' and 'Focus on Workweek' buttons. Is that intentional or is there a bug that tracks that?
(In reply to comment #6) > (In reply to comment #5) > > This is like how 'Remove Selected Breakpoints' and 'Remove All Breakpoints' is > > enabled when the 'Breakpoints' view is active but they get disabled when you > > activate another view, correct? > > Yes, that's exactly the same in the for the 'Synchronize All' and 'Focus on > Workweek' buttons. Is that intentional or is there a bug that tracks that? I've opened bug 361472 for this problem. I will close this bug as the original problem is gone. Thank for your help, Steffen.