private void reload(IFile file) {
        setPartName(basePartName);
        this.providerDefinition = null;
        this.selectedFile = null;
        if (file == null || !file.exists())
            return;
        if (viewer.getContentProvider() != null)
            // to avoid one provider trying to interpret an
            // incompatible input
            viewer.setInput(null);
        IContentDescription contentDescription = null;
        try {
            contentDescription = file.getContentDescription();
        } catch (CoreException e) {
            if (Platform.inDebugMode())
                Activator.logUnexpected(null, e);
        }
        if (contentDescription == null || contentDescription.getContentType() == null)
            return;
        IProviderDescription providerDefinition = ContentSupport.getContentProviderRegistry().findContentProvider(
                contentDescription.getContentType(), IGraphicalContentProvider.class);
        if (providerDefinition == null) {
            return;
        }
        IGraphicalContentProvider provider = (IGraphicalContentProvider) providerDefinition.getProvider();
        setContents(providerDefinition.read(file), provider);
        // enables support for file rendering
        this.selectedFile = file;
        this.providerDefinition = providerDefinition;
        setPartName(basePartName + " - " + file.getName());
    }