Bug 330467 [Compatibility] Workbench window menu bar submenus keeps growing
Submenus like 'Search > Text' keeps growing in size.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java
public static void trace(String msg, Throwable error) {
		Activator.trace("/trace/menus", msg, error); 
	}
	private static boolean DEBUG = true;
	private static void trace(String msg, Object menu, Object menuModel) {
		trace(msg + ": " + menu + ": " + menuModel, null); 
	}
	public static void gatherTrimContributions(MTrimBar trimModel,
			List<MTrimContribution> trimContributions, String elementId,
			ArrayList<MTrimContribution> toContribute, ExpressionContext eContext) {
		for (MTrimContribution contribution : trimContributions) {
			String parentId = contribution.getParentId();
			boolean filtered = isFiltered(trimModel, contribution);
			if (filtered || !parentId.equals(elementId) || !contribution.isToBeRendered()) {
				continue;
			}
			toContribute.add(contribution);
		}
	}