Bug 223976 [Decorators] Content type decorator: Updating missing
20080325 - Create a file 'a.xml' - in the editor paste <project name="Eclipse Views" default="export" basedir=".."> </project> as content - observe that the file image is still the original image - close the editor and reopen the file - now the editor shows the 'ANT' image
bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java
* at the same time.
     * </p>
     * <p>
     * No disabled action should be on the context menu.
     * </p>
     * 
     * @param menu context menu to add actions to
     */
    public void fillContextMenu(IMenuManager menu) {
        IStructuredSelection selection = (IStructuredSelection) getContext()
                .getSelection();
        boolean isProjectSelection = true;
        boolean hasOpenProjects = false;
        boolean hasClosedProjects = false;
        boolean hasBuilder = true;  
        Iterator resources = selection.iterator();               
        while (resources.hasNext()
                && (!hasOpenProjects || !hasClosedProjects || hasBuilder || isProjectSelection)) {
            Object next = resources.next();
            IProject project = null;
            if (next instanceof IProject) {
				project = (IProject) next;
			} else if (next instanceof IAdaptable) {
				project = (IProject) ((IAdaptable) next)
                        .getAdapter(IProject.class);
			}
            if (project == null) {
                isProjectSelection = false;
                continue;
            }