Bug 263090 [legacy] Load the model with commands and handlers
The legacy fragment should be able to load the commands model with commands and the handlers model with handlers. PW
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/WBPartFactory.java
import org.eclipse.e4.workbench.ui.internal.Workbench;
import org.eclipse.e4.workbench.ui.renderers.PartHandlerService;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.databinding.EMFObservables;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
import org.eclipse.jface.databinding.swt.SWTObservables;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Widget;
/**
 * Render a Window or Workbench Window.
 */
public class WBPartFactory extends SWTPartFactory {
	public Object createWidget(MPart<?> part) {
		final Widget newWidget;
		if (part instanceof MWindow<?>) {
			IEclipseContext parentContext = getContextForParent(part);
			Shell wbwShell = new Shell(Display.getCurrent(), SWT.SHELL_TRIM);
			wbwShell.setLayout(new FillLayout());
			newWidget = wbwShell;