Bug 70278 [Navigator] Adding a nature with associated natureImage does not refresh folder overlay.
I have a nature with my own natureImage associated with it. I wrote a Wizard to "convert" exisiting projects to contain my nature. Everything works fine, but the overlay icon does not show on the project folder until I do one of the following: 1) restart the workbench 2) "Go into" and back out of the project folder 3) Close and re-open the project Refreshing the project folder does not help, nor does refreshing the workspace. I can see of no way to cause this hard repaint of the folder icon to happen within the API but I could be missing something. If there is a way to do it I would be happy to hear it. ;o)
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/model/WorkbenchContentProvider.java
package org.eclipse.ui.model;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.widgets.Control;
/**
 * Tree content provider for resource objects that can be adapted to the interface
 * {@link org.eclipse.ui.model.IWorkbenchAdapter IWorkbenchAdapter}. This provider
 * will listen for resource changes within the workspace and update the viewer
 * as necessary.
 * <p>
 * This class may be instantiated, or subclassed by clients.
 * </p>
 */
public class WorkbenchContentProvider extends BaseWorkbenchContentProvider
        implements IResourceChangeListener {
    private Viewer viewer;
    /**
     * Creates the resource content provider.
     */
    public WorkbenchContentProvider() {
        super();
    }
    /* (non-Javadoc)