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
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.osgi.service.event.EventHandler;
/**
 *
 */
public class TrimStack {
	private static Image restoreImage;
	private ToolBar trimStackTB;
	/**
	 * The context menu for this trim stack's items.
	 */
	private Menu trimStackMenu;
	/**
	 * The tool item that the cursor is currently hovering over.
	 */
	private ToolItem selectedToolItem;
	private boolean isShowing = false;
	private MUIElement minimizedElement;
	private Composite hostPane;
	@Inject
	@Named("org.eclipse.e4.ui.workbench.IResourceUtilities")
	private IResourceUtilities<ImageDescriptor> resUtils;
	/**
	 * A map of created images from a part's icon URI path.