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
refreshAction = new RefreshAction(shell);
        refreshAction
                .setDisabledImageDescriptor(getImageDescriptor("dlcl16/refresh_nav.gif"));
        refreshAction
                .setImageDescriptor(getImageDescriptor("elcl16/refresh_nav.gif"));       
        refreshAction.setActionDefinitionId("org.eclipse.ui.file.refresh"); 
        
        buildAction = new BuildAction(shell,
                IncrementalProjectBuilder.INCREMENTAL_BUILD);
        buildAction.setActionDefinitionId("org.eclipse.ui.project.buildProject"); 
    }
    /**
     * Returns the image descriptor with the given relative path.
     */
    protected ImageDescriptor getImageDescriptor(String relativePath) {
       return IDEWorkbenchPlugin.getIDEImageDescriptor(relativePath);
     
    }
    public void updateActionBars() {
        IStructuredSelection selection = (IStructuredSelection) getContext()
                .getSelection();
        refreshAction.selectionChanged(selection);
        buildAction.selectionChanged(selection);
        openProjectAction.selectionChanged(selection);
        closeUnrelatedProjectsAction.selectionChanged(selection);
        closeProjectAction.selectionChanged(selection);
    }
}