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/MinMaxAddon.java
@PreDestroy
	void unhookListeners() {
		eventBroker.unsubscribe(widgetListener);
		eventBroker.unsubscribe(perspectiveRemovedListener);
		eventBroker.unsubscribe(perspectiveChangeListener);
		eventBroker.unsubscribe(tagChangeListener);
	}
	private void adjustCTFButtons(MUIElement element) {
		CTabFolder ctf = getCTFFor(element);
		if (ctf == null)
			return;
		ctf.setMinimizeVisible(false);
		ctf.setMaximizeVisible(false);
		if (element.getTags().contains(MINIMIZED)) {
			ctf.setMaximizeVisible(true);
			ctf.setMaximized(true);
		} else if (element.getTags().contains(MAXIMIZED)) {
			ctf.setMinimizeVisible(true);
			ctf.setMaximizeVisible(true);
			ctf.setMaximized(true);
		} else {
			boolean showMinMax = true;
			int loc = modelService.getElementLocation(element);
			if ((loc & EModelService.IN_SHARED_AREA) != 0) {
				MUIElement parent = element.getParent();
				if (!(element instanceof MArea) && !(parent instanceof MArea))
					showMinMax = false;
			}
			if (showMinMax) {