Bug 335733 org.eclipse.e4.ui.workbench.addons.swt has dependency on org.eclipse.ui
This means when one wants to use it one has to get in the compat layer: * minmax: Can be fixed quite easily because it only uses some ID stuff from IPageLayout and one WorkbenchImages-call => Proposal fix them and leave it in e4.ui.workbench.addons.swt * perspectiveswitcher: Looks like this is harder to fix because it usies all sorts of Workbench-Classes => Proposal move it to compat layer
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
UIEvents.buildTopic(UIEvents.UIElement.TOPIC, UIEvents.UIElement.WIDGET),
				widgetHandler);
	}
	@PreDestroy
	void removeListeners() {
		eventBroker.unsubscribe(toBeRenderedHandler);
		eventBroker.unsubscribe(childrenHandler);
		eventBroker.unsubscribe(selectionHandler);
		eventBroker.unsubscribe(widgetHandler);
	}
	@PostConstruct
	void createWidget(Composite parent, MToolControl me) {
		if (minimizedElement == null) {
			minimizedElement = findElement();
		}
		MUIElement meParent = me.getParent();
		int orientation = SWT.HORIZONTAL;
		if (meParent instanceof MTrimBar) {
			bar = (MTrimBar) meParent;
			if (bar.getSide() == SideValue.RIGHT || bar.getSide() == SideValue.LEFT)
				orientation = SWT.VERTICAL;
		}
		trimStackTB = new ToolBar(parent, orientation | SWT.FLAT | SWT.WRAP);
		trimStackTB.addListener(SWT.MenuDetect, new Listener() {
			public void handleEvent(Event event) {
				
				Point point = trimStackTB.getDisplay().map(null, trimStackTB,
						new Point(event.x, event.y));
				
				selectedToolItem = trimStackTB.getItem(point);