コード例 #1
0
 @Override
 public boolean preShutdown(IWorkbench workbench, boolean forced) {
   for (ITracker<?> tracker : trackers) {
     tracker.setEnabled(false);
   }
   return true;
 }
コード例 #2
0
 /**
  * Call this method to saves all current data collected by the trackers now. All data will be
  * saved and flushed from the trackers.
  */
 public void saveCurrentData() {
   for (ITracker<?> tracker : trackers) {
     tracker.setEnabled(false);
     tracker.flushData();
     tracker.setEnabled(true);
   }
 }
コード例 #3
0
 /**
  * Enables or disables the trackers.
  *
  * @param trackers The trackers to perform actions on.
  * @param enable True to enable, false to disable.
  */
 private void setEnableTrackers(ImmutableCollection<ITracker<?>> trackers, boolean enable) {
   for (ITracker<?> tracker : trackers) {
     tracker.setEnabled(enable);
   }
 }