예제 #1
0
 /*
  * Starts or stops auto-refresh depending on the auto-refresh preference.
  */
 protected void manageAutoRefresh(boolean enabled) {
   // do nothing if we have already shutdown
   if (refreshJob == null) return;
   if (enabled) {
     refreshJob.start();
     monitors.start();
   } else {
     refreshJob.stop();
     monitors.stop();
   }
 }
예제 #2
0
 /** Shuts down the refresh manager. This only happens when the resources plugin is going away. */
 public void shutdown(IProgressMonitor monitor) {
   ResourcesPlugin.getPlugin().getPluginPreferences().removePropertyChangeListener(this);
   if (monitors != null) {
     monitors.stop();
     monitors = null;
   }
   if (refreshJob != null) {
     refreshJob.stop();
     refreshJob = null;
   }
 }
예제 #3
0
 /* (non-Javadoc)
  * @see org.eclipse.core.resources.refresh.IRefreshResult#monitorFailed(org.eclipse.core.resources.refresh.IRefreshMonitor, org.eclipse.core.resources.IResource)
  */
 public void monitorFailed(IRefreshMonitor monitor, IResource resource) {
   monitors.monitorFailed(monitor, resource);
 }