// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/TaskCollector.java
// public interface TaskCollector extends ICollector<Task> {
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/TaskScanner.java
// public interface TaskScanner {
// 
//   /**
//    * Adds Tasks to the supplied collector.
//    *
//    * @param collector the collector of {@link Task}s.
//    */
//   void scan(TaskCollector collector);
// 
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/plugin/core/MechanicLog.java
// public class MechanicLog {
//   private static MechanicLog DEFAULT;
// 
//   private final ILog log;
// 
//   /**
//    * Get the default instance.
//    */
//   public synchronized static MechanicLog getDefault() {
//     if (DEFAULT == null) {
//       DEFAULT = new MechanicLog(MechanicPlugin.getDefault());
//     }
//     return DEFAULT;
//   }
// 
//   MechanicLog(Plugin plugin) {
//     this(plugin.getLog());
//   }
// 
//   public MechanicLog(ILog log) {
//     this.log = Preconditions.checkNotNull(log);
//   }
// 
//   /**
//    * Log a status.
//    */
//   public void log(IStatus status) {
//     log.log(status);
//   }
// 
//   /**
//    * Log an error to the Eclipse log.
//    *
//    * @param t the throwable.
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void logError(Throwable t, String fmt, Object... args) {
//     String text = (args.length > 0) ? String.format(fmt, args) : fmt;
//     log(new Status(IStatus.ERROR, MechanicPlugin.PLUGIN_ID, text, t));
//   }
// 
//   /**
//    * Log an error to the Eclipse log, using the exception's message as the log message text.
//    *
//    * @param t the throwable.
//    */
//   public void logError(Throwable t) {
//     logError(t, t.getMessage());
//   }
// 
//   /**
//    * Log info to the Eclipse log.
//    *
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void logInfo(String fmt, Object... args) {
//     log(IStatus.INFO, fmt, args);
//   }
// 
//   /**
//    * Log warning to the Eclipse log.
//    *
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void logWarning(String fmt, Object... args) {
//     log(IStatus.WARNING, fmt, args);
//   }
// 
// 
//   /**
//    * Log a message to the Eclipse log.
//    *
//    * @param severity message severity. Reference {@link IStatus#getSeverity()}.
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void log(int severity, String fmt, Object... args) {
//     String text = (args.length > 0) ? String.format(fmt, args) : fmt;
//     log(new Status(severity, MechanicPlugin.PLUGIN_ID, text));
//   }
// }


import java.util.List;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Supplier;
import com.google.eclipse.mechanic.TaskCollector;
import com.google.eclipse.mechanic.TaskScanner;
import com.google.eclipse.mechanic.plugin.core.MechanicLog;
/*******************************************************************************
 * Copyright (C) 2007, Google Inc.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/

package com.google.eclipse.mechanic.internal;



/**
 * A {@link TaskScanner} that loads and runs all other {@link TaskScanner}s.
 */
public class RootTaskScanner implements TaskScanner {

  private static RootTaskScanner instance;

// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/TaskCollector.java
// public interface TaskCollector extends ICollector<Task> {
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/TaskScanner.java
// public interface TaskScanner {
// 
//   /**
//    * Adds Tasks to the supplied collector.
//    *
//    * @param collector the collector of {@link Task}s.
//    */
//   void scan(TaskCollector collector);
// 
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/plugin/core/MechanicLog.java
// public class MechanicLog {
//   private static MechanicLog DEFAULT;
// 
//   private final ILog log;
// 
//   /**
//    * Get the default instance.
//    */
//   public synchronized static MechanicLog getDefault() {
//     if (DEFAULT == null) {
//       DEFAULT = new MechanicLog(MechanicPlugin.getDefault());
//     }
//     return DEFAULT;
//   }
// 
//   MechanicLog(Plugin plugin) {
//     this(plugin.getLog());
//   }
// 
//   public MechanicLog(ILog log) {
//     this.log = Preconditions.checkNotNull(log);
//   }
// 
//   /**
//    * Log a status.
//    */
//   public void log(IStatus status) {
//     log.log(status);
//   }
// 
//   /**
//    * Log an error to the Eclipse log.
//    *
//    * @param t the throwable.
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void logError(Throwable t, String fmt, Object... args) {
//     String text = (args.length > 0) ? String.format(fmt, args) : fmt;
//     log(new Status(IStatus.ERROR, MechanicPlugin.PLUGIN_ID, text, t));
//   }
// 
//   /**
//    * Log an error to the Eclipse log, using the exception's message as the log message text.
//    *
//    * @param t the throwable.
//    */
//   public void logError(Throwable t) {
//     logError(t, t.getMessage());
//   }
// 
//   /**
//    * Log info to the Eclipse log.
//    *
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void logInfo(String fmt, Object... args) {
//     log(IStatus.INFO, fmt, args);
//   }
// 
//   /**
//    * Log warning to the Eclipse log.
//    *
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void logWarning(String fmt, Object... args) {
//     log(IStatus.WARNING, fmt, args);
//   }
// 
// 
//   /**
//    * Log a message to the Eclipse log.
//    *
//    * @param severity message severity. Reference {@link IStatus#getSeverity()}.
//    * @param fmt string format
//    * @param args args that accompany the string format. If this is empty, fmt is assumed to be
//    * an unformatted string.
//    */
//   public void log(int severity, String fmt, Object... args) {
//     String text = (args.length > 0) ? String.format(fmt, args) : fmt;
//     log(new Status(severity, MechanicPlugin.PLUGIN_ID, text));
//   }
// }


// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/internal/RootTaskScanner.java
import java.util.List;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Supplier;
import com.google.eclipse.mechanic.TaskCollector;
import com.google.eclipse.mechanic.TaskScanner;
import com.google.eclipse.mechanic.plugin.core.MechanicLog;

/*******************************************************************************
 * Copyright (C) 2007, Google Inc.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/

package com.google.eclipse.mechanic.internal;



/**
 * A {@link TaskScanner} that loads and runs all other {@link TaskScanner}s.
 */
public class RootTaskScanner implements TaskScanner {

  private static RootTaskScanner instance;

  private final MechanicLog log;