Bug 336139 NPE thrown when trying to render a trim with unidentified elements
java.lang.NullPointerException at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.isStatusLine(TrimBarLayout.java:245) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.computeSize(TrimBarLayout.java:146) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.access$0(TrimBarLayout.java:142) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout$TrimLine.addControl(TrimBarLayout.java:36) at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarLayout.computeSize(TrimBarLayout.java:104) at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:233) at org.eclipse.e4.ui.workbench.renderers.swt.TrimmedPartLayout.layout(TrimmedPartLayout.java:120) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1263) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1249) at org.eclipse.swt.widgets.Composite.layout(Composite.java:664) at org.eclipse.swt.widgets.Composite.layout(Composite.java:622) at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:585)
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/TrimBarLayout.java
if (isStatusLine(ctrl))
			ctrlSize.x = 375;
		
		if (ctrl instanceof Composite
				&& ((Composite) ctrl).getChildren().length == 0)
			ctrlSize = new Point(0, 0);
		return ctrlSize;
	}
	protected void layout(Composite composite, boolean flushCache) {
		Rectangle bounds = composite.getBounds();
		
		bounds.x = marginLeft;
		bounds.y = marginTop;
		bounds.width -= (marginLeft + marginRight);
		bounds.height -= (marginTop + marginBottom);
		
		if (lines.size() == 0) {
			if (horizontal)
				computeSize(composite, bounds.width, SWT.DEFAULT, true);
			else
				computeSize(composite, SWT.DEFAULT, bounds.height, true);
		}
		if (lines.size() == 0)
			return;
		for (TrimLine curLine : lines) {
			tileLine(curLine, bounds);
			if (horizontal)
				bounds.y += curLine.minor + wrapSpacing;
			else
				bounds.x += curLine.minor = wrapSpacing;