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
/*******************************************************************************
 * Copyright (c) 2000, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.action;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IProgressMonitorWithBlocking;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
/**
 * A status line manager is a contribution manager which realizes itself and its items
 * in a status line control.
 * <p>
 * This class may be instantiated; it may also be subclassed if a more
 * sophisticated layout is required.
 * </p>
 */
public class StatusLineManager extends ContributionManager implements