// Path: plugins/com.abstratt.content/src/com/abstratt/content/ContentSupport.java
// public class ContentSupport {
//     public static final String PLUGIN_ID = ContentSupport.class.getPackage().getName();
// 
//     private static IContentProviderRegistry registry = new ContentProviderRegistry();
// 
//     public static IContentProviderRegistry getContentProviderRegistry() {
//         return registry;
//     }
// }
// 
// Path: plugins/com.abstratt.content/src/com/abstratt/content/IContentProviderRegistry.java
// public interface IProviderDescription {
//     public IContentProvider getProvider();
// 
//     /**
//      * Converts the given source object (using one of the contributed
//      * readers) to the format expected by the content provider.
//      * 
//      * @param source
//      *            object to convert
//      * @return the converted contents that are consumable by the content
//      *         provider
//      */
//     public Object read(Object source);
// }


import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.part.ViewPart;
import com.abstratt.content.ContentSupport;
import com.abstratt.content.IContentProviderRegistry.IProviderDescription;
        // assumes the general case (instead of file rendering)
        selectedFile = null;
        providerDefinition = null;
        viewer.setContentProvider(provider);
        viewer.setInput(contents);
        setPartName(basePartName);
    }

    Object getInput() {
        return viewer.getInput();
    }

    IGraphicalContentProvider getContentProvider() {
        return (IGraphicalContentProvider) viewer.getContentProvider();
    }

    private void requestUpdate() {
        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                if (getSite() == null || !GraphicalView.this.getSite().getPage().isPartVisible(GraphicalView.this))
                    // don't do anything if we are not showing
                    return;
                reload(selectedFile);
            }
        });
    }

    public void resourceChanged(IResourceChangeEvent event) {
        if (selectedFile == null || !selectedFile.exists())
            return;
// Path: plugins/com.abstratt.content/src/com/abstratt/content/ContentSupport.java
// public class ContentSupport {
//     public static final String PLUGIN_ID = ContentSupport.class.getPackage().getName();
// 
//     private static IContentProviderRegistry registry = new ContentProviderRegistry();
// 
//     public static IContentProviderRegistry getContentProviderRegistry() {
//         return registry;
//     }
// }
// 
// Path: plugins/com.abstratt.content/src/com/abstratt/content/IContentProviderRegistry.java
// public interface IProviderDescription {
//     public IContentProvider getProvider();
// 
//     /**
//      * Converts the given source object (using one of the contributed
//      * readers) to the format expected by the content provider.
//      * 
//      * @param source
//      *            object to convert
//      * @return the converted contents that are consumable by the content
//      *         provider
//      */
//     public Object read(Object source);
// }


// Path: plugins/com.abstratt.imageviewer/src/com/abstratt/imageviewer/GraphicalView.java
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.part.ViewPart;
import com.abstratt.content.ContentSupport;
import com.abstratt.content.IContentProviderRegistry.IProviderDescription;

        // assumes the general case (instead of file rendering)
        selectedFile = null;
        providerDefinition = null;
        viewer.setContentProvider(provider);
        viewer.setInput(contents);
        setPartName(basePartName);
    }

    Object getInput() {
        return viewer.getInput();
    }

    IGraphicalContentProvider getContentProvider() {
        return (IGraphicalContentProvider) viewer.getContentProvider();
    }

    private void requestUpdate() {
        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                if (getSite() == null || !GraphicalView.this.getSite().getPage().isPartVisible(GraphicalView.this))
                    // don't do anything if we are not showing
                    return;
                reload(selectedFile);
            }
        });
    }

    public void resourceChanged(IResourceChangeEvent event) {
        if (selectedFile == null || !selectedFile.exists())
            return;
        if (event.getDelta() == null)