Bug 294303 [Markers] 'Queuing Viewer Updates' in Problems view
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java
MarkerItem[] items = builder.getClonedMarkers().getElements();
			IContentProvider provider = viewer.getContentProvider();
			for (int i = 0; i < items.length; i++) {
				String name = ((MarkerCategory) items[i]).getName();
				if (getCategoriesToExpand().contains(name)) {
					if (provider instanceof ILazyTreeContentProvider) {
						((ILazyTreeContentProvider) provider).updateElement(
								builder.getMarkers(), i);
						viewer.setExpandedState(items[i], true);
					} else {
						if (!viewer.getExpandedState(items[i])) {
							viewer.expandToLevel(items[i], 2);
						}
					}
				}
			}
		}
	}
	/**
	 * Register the context menu for the receiver so that commands may be added
	 * to it.
	 */
	private void registerContextMenu() {
		MenuManager contextMenu = new MenuManager();
		contextMenu.setRemoveAllWhenShown(true);
		getSite().registerContextMenu(contextMenu, viewer);
		
		if (!getSite().getId().equals(MarkerSupportRegistry.MARKERS_ID)) {
			getSite().registerContextMenu(MarkerSupportRegistry.MARKERS_ID,
					contextMenu, viewer);