Bug 74449 [Contributions] StatusLineManager creates BEGIN MIDDLE END groups at wrong time
The org.eclipse.jface.action.statuslinemanager currently creates the BEGIN_GROUP MIDDLE_GROUP and END_GROUP entries in its createControl() method. Code wishing to contribute controls to the statuslinemanager in the fillActionBars method of the workbench advisor executes before the control is created, and get exceptions thrown because the groups that the controls are being appended to do not yet exist. This code: add(new GroupMarker(BEGIN_GROUP)); add(new GroupMarker (MIDDLE_GROUP)); add(new GroupMarker(END_GROUP)); should be moved from createControl to the constructor of the statuslinemanager. Patch to follow
bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineManager.java
* @return the status line control
     * @since 3.0
     */
    public Control createControl(Composite parent, int style) {
        if (!statusLineExist() && parent != null) {
            statusLine = new StatusLine(parent, style);
            add(new GroupMarker(BEGIN_GROUP));
            add(new GroupMarker(MIDDLE_GROUP));
            add(new GroupMarker(END_GROUP));
            update(false);
        }
        return statusLine;
    }
    /**
     * Disposes of this status line manager and frees all allocated SWT resources.
     * Notifies all contribution items of the dispose. Note that this method does
     * not clean up references between this status line manager and its associated
     * contribution items. Use <code>removeAll</code> for that purpose.
     */
    public void dispose() {
        if (statusLineExist())
            statusLine.dispose();
        statusLine = null;
        IContributionItem items[] = getItems();
        for (int i = 0; i < items.length; i++) {
            items[i].dispose();
        }
    }
    /**
     * Returns the control used by this StatusLineManager.