/**
  * Return the synchronization page configuration associated with the view to which this content
  * provider applies. A <code>null</code> is returned if no configuration is available.
  *
  * @return the synchronization page configuration or <code>null</code>
  */
 protected ISynchronizePageConfiguration getConfiguration() {
   ICommonContentExtensionSite extensionSite = getExtensionSite();
   if (extensionSite != null)
     return (ISynchronizePageConfiguration)
         extensionSite
             .getExtensionStateModel()
             .getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
   return null;
 }
 /**
  * Return the resource mapping scope associated with the view to which this content provider
  * applies. A <code>null</code> is returned if no scope is available.
  *
  * @return the resource mapping scope or <code>null</code>
  */
 protected ISynchronizationScope getScope() {
   ICommonContentExtensionSite extensionSite = getExtensionSite();
   if (extensionSite != null)
     return (ISynchronizationScope)
         extensionSite
             .getExtensionStateModel()
             .getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE);
   return null;
 }
 /* (non-Javadoc)
  * @see org.eclipse.jface.viewers.IContentProvider#dispose()
  */
 public void dispose() {
   ICommonContentExtensionSite extensionSite = getExtensionSite();
   if (extensionSite != null) {
     extensionSite.getExtensionStateModel().removePropertyChangeListener(this);
   }
   ISynchronizationContext context = getContext();
   if (context != null) context.getDiffTree().removeDiffChangeListener(this);
   ISynchronizePageConfiguration configuration = getConfiguration();
   if (configuration != null) configuration.removePropertyChangeListener(this);
 }
 /* (non-Javadoc)
  * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
  */
 public void init(ICommonContentExtensionSite site) {
   // Set the site
   this.site = site;
   // Configure the content provider based on the site and state model
   site.getExtensionStateModel().addPropertyChangeListener(this);
   ISynchronizePageConfiguration configuration = getConfiguration();
   if (configuration != null) configuration.addPropertyChangeListener(this);
   ITreeContentProvider provider = getDelegateContentProvider();
   if (provider instanceof ICommonContentProvider) {
     ((ICommonContentProvider) provider).init(site);
   }
   ISynchronizationContext context = getContext();
   if (context != null) context.getDiffTree().addDiffChangeListener(this);
 }