Bug 189914 - [Trim] Toolbar not updated
Summary: [Trim] Toolbar not updated
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 09:24 EDT by Pavel Halas CLA
Modified: 2019-09-06 16:12 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Halas CLA 2007-05-30 09:24:05 EDT
Hi, there are some bugs that look similar but not exactly the same... (tested on 3.3M7)

I got the following use case:
1) ToolBar created in the code using AbstractContributionFactory child (see code 1).
2) I'd like to update it (time to time) with the new contribution items and force update (see code 2).

The update occurs only if the toolbar is dragged to a new location.

code 1)
        public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions)
        {
            toolBarContributionItem = new ToolBarContributionItem(new ToolBarManager());
            additions.addContributionItem(toolBarContributionItem, Expression.TRUE);
        }

code 2:
toolBarContributionItem.getToolBarManager().update(true);

PS: I'm not 100% sure whether this is a bug or I not understand the behaviour correctly. So -- sorry if it is my fault.
Comment 1 Pavel Halas CLA 2007-05-30 09:34:30 EDT
Now I got another test case somewhat similar (I tried to workaround the previous one)...

<menuContribution locationURI="toolbar:org.eclipse.ui.trim.status">
  <toolbar id="TestRCP.toolbarX">
     <control class="some.Class" id="some.Class" />
  </toolbar>
</menuContribution>

and the WorkbenchWindowControlContribution child implemented like this. I tried to have full control of the ToolBar and the ToolBarManager...

    protected Control createControl(Composite parent)
    {
        ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.BORDER);
        toolbarManager = new ToolBarManager(toolBar);
        ...
        return toolBar;
    }

The update on the ToolBarManager does not seem to be functional. The only update occurs (like in previous case) on drag.
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:12:20 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.