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
public void addControl(Control ctrl) {
			Point ctrlSize = computeSize(ctrl);
			int ctrlMajor = horizontal ? ctrlSize.x : ctrlSize.y;
			int ctrlMinor = horizontal ? ctrlSize.y : ctrlSize.x;
			major += ctrlMajor;
			if (ctrlMinor > minor)
				minor = ctrlMinor;
			sizeMap.put(ctrl, ctrlSize);
			ctrls.add(ctrl);
			if (isSpacer(ctrl))
				spacerCount++;
		}
		public void mergeSegment(TrimLine segment) {
			sizeMap.putAll(segment.sizeMap);
			ctrls.addAll(segment.ctrls);
			major += segment.major;
			if (segment.minor > minor)
				minor = segment.minor;
			spacerCount += segment.spacerCount;
		}
	}
	private List<TrimLine> lines = new ArrayList<TrimLine>();
	public static String SPACER = "stretch"; 
	public static String GLUE = "glue"; 
	private boolean horizontal;
	public int marginLeft = 0;
	public int marginRight = 0;
	public int marginTop = 0;
	public int marginBottom = 0;
	public int wrapSpacing = 0;