Bug 283194 [UI] StackModelFactory does not need 'engine' local
We can remove this from createWidget() final IStylingEngine engine = (IStylingEngine) folderContext .get(IStylingEngine.SERVICE_NAME); because the engine is now passed in via DI. Replace the refs to "engine" with the local "stylingEngine".
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/StackRenderer.java
CTabItem oldItem = findItemForPart(parentElement, child);
		if (oldItem != null) {
			oldItem.setControl(null); 
			oldItem.dispose();
		}
		
		CTabFolder ctf = (CTabFolder) parentElement.getWidget();
		String policy = parentElement.getPolicy();
		boolean isEditorStack = policy != null
				&& policy.indexOf("EditorStack") >= 0; 
		if (ctf.getItemCount() == 0 && !isEditorStack) {
			parentElement.setVisible(false);
		}
		
		if (isEditorStack) {
			parentElement.getChildren().remove(child);
		}
	}
	@Override
	public void hookControllerLogic(final MPart<?> me) {
		super.hookControllerLogic(me);
		final MStack sm = (MStack) me;
		
		CTabFolder ctf = (CTabFolder) me.getWidget();
		ctf.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent e) {
			}
			public void widgetSelected(SelectionEvent e) {
				MItemPart<?> newPart = (MItemPart<?>) e.item.getData(OWNING_ME);
				if (sm.getActiveChild() != newPart) {