Bug 307577 [UI] Allow the CSS engine access to the 'tag' info
We need to define multiple CSS 'class' names to allow clients to style against tag information (such as "View", "ViewStack"...). We will also add the model element's type ("MWindow", "MPart"...) This will allow for example style sheets that have all stacks use a particular tab style but also allow it to differentiate the style of a "PartStack" from that of an "EditorStack".
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/SWTPartRenderer.java
*/
	protected int calcVisibleIndex(MUIElement element) {
		MElementContainer<MUIElement> parent = element.getParent();
		int curIndex = 0;
		for (MUIElement child : parent.getChildren()) {
			if (child == element) {
				return curIndex;
			}
			if (child.getWidget() != null)
				curIndex++;
		}
		return -1;
	}
	/*
	 * HACK: Create a wrapper composite with appropriate layout for the purpose
	 * of styling margins. See bug #280632
	 */
	protected Composite createWrapperForStyling(Composite parentWidget,
			IEclipseContext context) {
		Composite layoutHolder = new Composite(parentWidget, SWT.NONE);
		addLayoutForStyling(layoutHolder);
		layoutHolder.setData("org.eclipse.e4.ui.css.swt.marginWrapper", true); 
		final IStylingEngine engine = (IStylingEngine) context
				.get(IStylingEngine.SERVICE_NAME);
		engine.setClassname(layoutHolder, "marginWrapper"); 
		return layoutHolder;
	}
	/*
	 * HACK: Add layout information to the composite for the purpose of styling
	 * margins. See bug #280632