Bug 320790 NPE in ContributionsAnalyzer
This is the I20100723-2001 build and I somehow managed to get into a state where all context menus result in this NPE! java.lang.NullPointerException at org.eclipse.e4.ui.internal.workbench.ContributionsAnalyzer.gatherMenuContributions(ContributionsAnalyzer.java:97) at org.eclipse.e4.ui.workbench.swt.modeling.MenuServiceFilter.showMenu(MenuServiceFilter.java:134) at org.eclipse.e4.ui.workbench.swt.modeling.MenuServiceFilter.handleMenu(MenuServiceFilter.java:117) at org.eclipse.e4.ui.workbench.swt.modeling.MenuServiceFilter.handleEvent(MenuServiceFilter.java:103) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1031) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3775) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1371) at org.eclipse.swt.widgets.Menu.menuWillOpen(Menu.java:689) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5030) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4483) at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4739) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:85) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3271)
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java
boolean filtered = isFiltered(toolbarModel, toolBarContribution);
			if (filtered || !parentID.equals(id) || !toolBarContribution.isToBeRendered()) {
				continue;
			}
			toContribute.add(toolBarContribution);
		}
	}
	static boolean isFiltered(MToolBar toolbarModel, MToolBarContribution toolBarContribution) {
		return false;
	}
	public static void gatherMenuContributions(final MMenu menuModel,
			final List<MMenuContribution> menuContributionList, final String id,
			final ArrayList<MMenuContribution> toContribute, final ExpressionContext eContext,
			boolean includePopups) {
		boolean menuBar = (((MUIElement) ((EObject) menuModel).eContainer()) instanceof MWindow);
		for (MMenuContribution menuContribution : menuContributionList) {
			String parentID = menuContribution.getParentId();
			boolean popup = parentID.equals(POPUP_PARENT_ID) && (menuModel instanceof MPopupMenu)
					&& includePopups;
			boolean filtered = isFiltered(menuModel, menuContribution);
			if (filtered || (!popup && !parentID.equals(id)) || !menuContribution.isToBeRendered()) {
				continue;
			}
			if (menuBar || isVisible(menuContribution, eContext)) {
				toContribute.add(menuContribution);
			}
		}
	}
	static boolean isFiltered(MMenu menuModel, MMenuContribution menuContribution) {
		if (menuModel.getTags().contains(ContributionsAnalyzer.MC_POPUP)) {