// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/AndroidMavenProjectConfigurator.java
// @Singleton
// public class AndroidMavenProjectConfigurator extends AbstractProjectConfigurator implements IJavaProjectConfigurator {
// 
//     private static final Version M2E_VERSION_NEW_CONFIGURATOR_ORDER = new Version(1, 6, 0);
//     
//     @Inject private AbstractProjectConfigurator javaProjectConfigurator;
// 
//     @Inject private List<WorkspaceConfigurer> workspaceConfigurers;
// 
//     @Inject private List<RawClasspathConfigurer> rawClasspathConfigurers;
// 
//     @Inject private List<ClasspathConfigurer> classpathConfigurers;
// 
//     @Inject private AndroidProjectFactory<MavenAndroidProject, MavenProject> mavenProjectFactory;
// 
//     @Inject private IDEAndroidProjectFactory eclipseProjectFactory;
//     
//     @Inject private IMavenProjectRegistry registry;
// 
//     public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException {
//         markerManager.deleteMarkers(request.getPom(), AndroidMavenPlugin.APKLIB_ERROR_TYPE);
// 
//         try {
//             final MavenAndroidProject mavenProject = mavenProjectFactory
//                     .createAndroidProject(request.getMavenProject());
//             final IDEAndroidProject eclipseProject = eclipseProjectFactory.createAndroidProject(request
//                     .getProject());
// 
//             if (mavenProject.isAndroidProject()) {
//                 if (!usesM2E1_6OrNewer()) {
//                     javaProjectConfigurator.configure(request, monitor);
//                 }
// 
//                 for (WorkspaceConfigurer configurer : workspaceConfigurers) {
//                     try {
//                         if (configurer.isValid(mavenProject) && !configurer.isConfigured(eclipseProject)) {
//                             configurer.configure(eclipseProject, mavenProject);
//                         }
//                     } catch (DependencyNotFoundInWorkspace e) {
//                         markerManager.addErrorMarkers(request.getPom(), e.getType(), e);
//                     }
//                 }
//             }
//         } catch (AndroidMavenException e) {
//             throw new CoreException(new Status(IStatus.ERROR, AndroidMavenPlugin.PLUGIN_ID,
//                     "error configuring project", e));
//         }
//     }
// 
//     public AbstractBuildParticipant getBuildParticipant(IMavenProjectFacade f, MojoExecution e,
//             IPluginExecutionMetadata m) {
// 
//         MavenAndroidProject project = mavenProjectFactory.createAndroidProject(f.getMavenProject());
// 
//         if (e.getGoal().equals("manifest-merger")) {
//             return new ManifestMergerBuildParticipant(e, project.getDestinationManifestFile());
//         }
// 
//         return null;
//     }
// 
//     public void configureClasspath(IMavenProjectFacade facade, IClasspathDescriptor classpath, IProgressMonitor monitor)
//             throws CoreException {
//         final MavenAndroidProject mavenProject = mavenProjectFactory.createAndroidProject(facade.getMavenProject());
//         final IDEAndroidProject eclipseProject = eclipseProjectFactory.createAndroidProject(facade.getProject(), classpath);
//         try {
//             for (RawClasspathConfigurer configurer : rawClasspathConfigurers) {
//                 configurer.configure(mavenProject, eclipseProject, classpath);
//             }
//         } catch (Exception e) {
//             throw new CoreException(new Status(IStatus.ERROR, AndroidMavenPlugin.PLUGIN_ID,
//                     "error configuring project classpath", e));
//         }
//     }
// 
//     public void configureRawClasspath(ProjectConfigurationRequest request, IClasspathDescriptor classpath,
//             IProgressMonitor monitor) throws CoreException {
//         final MavenAndroidProject mavenProject = mavenProjectFactory.createAndroidProject(request.getMavenProject());
//         final IDEAndroidProject eclipseProject = eclipseProjectFactory.createAndroidProject(request.getProject(), classpath);
//         try {
//             for (ClasspathConfigurer classpathConfigurer : classpathConfigurers) {
//                 if (classpathConfigurer.shouldApplyTo(mavenProject)) {
//                     classpathConfigurer.configure(mavenProject, eclipseProject);
//                 }
//             }
//         } catch (Exception e) {
//             throw new CoreException(new Status(IStatus.ERROR, AndroidMavenPlugin.PLUGIN_ID,
//                     "error configuring project classpath", e));
//         }
//     }
//     
//     public static boolean usesM2E1_6OrNewer() {
//         Bundle bundle = Platform.getBundle("org.eclipse.m2e.core");
//         
//         return bundle.getVersion().compareTo(M2E_VERSION_NEW_CONFIGURATOR_ORDER) >= 0;
//     }
// 
// }


import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import me.gladwell.eclipse.m2e.android.AndroidMavenProjectConfigurator;
package me.gladwell.eclipse.m2e.android.configuration.workspace;




public class WorkspaceModule extends AbstractModule {

    @Override
    protected void configure() {
        bind(LibraryDependenciesWorkspaceConfigurer.class);
        bind(MarkAndroidClasspathContainerNotExportedConfigurer.class);
    }

    @Provides
    List<WorkspaceConfigurer> provideWorkspaceConfigurers(LibraryDependenciesWorkspaceConfigurer libraryDependenciesConfigurer, 
            MarkAndroidClasspathContainerNotExportedConfigurer markAndroidClasspathContainerNotExportedConfigurer) {
        final List<WorkspaceConfigurer> workspaceConfigurers = new ArrayList<WorkspaceConfigurer>();

        workspaceConfigurers.add(new FixerWorkspaceConfigurer());
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/AndroidMavenProjectConfigurator.java
// @Singleton
// public class AndroidMavenProjectConfigurator extends AbstractProjectConfigurator implements IJavaProjectConfigurator {
// 
//     private static final Version M2E_VERSION_NEW_CONFIGURATOR_ORDER = new Version(1, 6, 0);
//     
//     @Inject private AbstractProjectConfigurator javaProjectConfigurator;
// 
//     @Inject private List<WorkspaceConfigurer> workspaceConfigurers;
// 
//     @Inject private List<RawClasspathConfigurer> rawClasspathConfigurers;
// 
//     @Inject private List<ClasspathConfigurer> classpathConfigurers;
// 
//     @Inject private AndroidProjectFactory<MavenAndroidProject, MavenProject> mavenProjectFactory;
// 
//     @Inject private IDEAndroidProjectFactory eclipseProjectFactory;
//     
//     @Inject private IMavenProjectRegistry registry;
// 
//     public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException {
//         markerManager.deleteMarkers(request.getPom(), AndroidMavenPlugin.APKLIB_ERROR_TYPE);
// 
//         try {
//             final MavenAndroidProject mavenProject = mavenProjectFactory
//                     .createAndroidProject(request.getMavenProject());
//             final IDEAndroidProject eclipseProject = eclipseProjectFactory.createAndroidProject(request
//                     .getProject());
// 
//             if (mavenProject.isAndroidProject()) {
//                 if (!usesM2E1_6OrNewer()) {
//                     javaProjectConfigurator.configure(request, monitor);
//                 }
// 
//                 for (WorkspaceConfigurer configurer : workspaceConfigurers) {
//                     try {
//                         if (configurer.isValid(mavenProject) && !configurer.isConfigured(eclipseProject)) {
//                             configurer.configure(eclipseProject, mavenProject);
//                         }
//                     } catch (DependencyNotFoundInWorkspace e) {
//                         markerManager.addErrorMarkers(request.getPom(), e.getType(), e);
//                     }
//                 }
//             }
//         } catch (AndroidMavenException e) {
//             throw new CoreException(new Status(IStatus.ERROR, AndroidMavenPlugin.PLUGIN_ID,
//                     "error configuring project", e));
//         }
//     }
// 
//     public AbstractBuildParticipant getBuildParticipant(IMavenProjectFacade f, MojoExecution e,
//             IPluginExecutionMetadata m) {
// 
//         MavenAndroidProject project = mavenProjectFactory.createAndroidProject(f.getMavenProject());
// 
//         if (e.getGoal().equals("manifest-merger")) {
//             return new ManifestMergerBuildParticipant(e, project.getDestinationManifestFile());
//         }
// 
//         return null;
//     }
// 
//     public void configureClasspath(IMavenProjectFacade facade, IClasspathDescriptor classpath, IProgressMonitor monitor)
//             throws CoreException {
//         final MavenAndroidProject mavenProject = mavenProjectFactory.createAndroidProject(facade.getMavenProject());
//         final IDEAndroidProject eclipseProject = eclipseProjectFactory.createAndroidProject(facade.getProject(), classpath);
//         try {
//             for (RawClasspathConfigurer configurer : rawClasspathConfigurers) {
//                 configurer.configure(mavenProject, eclipseProject, classpath);
//             }
//         } catch (Exception e) {
//             throw new CoreException(new Status(IStatus.ERROR, AndroidMavenPlugin.PLUGIN_ID,
//                     "error configuring project classpath", e));
//         }
//     }
// 
//     public void configureRawClasspath(ProjectConfigurationRequest request, IClasspathDescriptor classpath,
//             IProgressMonitor monitor) throws CoreException {
//         final MavenAndroidProject mavenProject = mavenProjectFactory.createAndroidProject(request.getMavenProject());
//         final IDEAndroidProject eclipseProject = eclipseProjectFactory.createAndroidProject(request.getProject(), classpath);
//         try {
//             for (ClasspathConfigurer classpathConfigurer : classpathConfigurers) {
//                 if (classpathConfigurer.shouldApplyTo(mavenProject)) {
//                     classpathConfigurer.configure(mavenProject, eclipseProject);
//                 }
//             }
//         } catch (Exception e) {
//             throw new CoreException(new Status(IStatus.ERROR, AndroidMavenPlugin.PLUGIN_ID,
//                     "error configuring project classpath", e));
//         }
//     }
//     
//     public static boolean usesM2E1_6OrNewer() {
//         Bundle bundle = Platform.getBundle("org.eclipse.m2e.core");
//         
//         return bundle.getVersion().compareTo(M2E_VERSION_NEW_CONFIGURATOR_ORDER) >= 0;
//     }
// 
// }


// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/workspace/WorkspaceModule.java
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import me.gladwell.eclipse.m2e.android.AndroidMavenProjectConfigurator;

package me.gladwell.eclipse.m2e.android.configuration.workspace;




public class WorkspaceModule extends AbstractModule {

    @Override
    protected void configure() {
        bind(LibraryDependenciesWorkspaceConfigurer.class);
        bind(MarkAndroidClasspathContainerNotExportedConfigurer.class);
    }

    @Provides
    List<WorkspaceConfigurer> provideWorkspaceConfigurers(LibraryDependenciesWorkspaceConfigurer libraryDependenciesConfigurer, 
            MarkAndroidClasspathContainerNotExportedConfigurer markAndroidClasspathContainerNotExportedConfigurer) {
        final List<WorkspaceConfigurer> workspaceConfigurers = new ArrayList<WorkspaceConfigurer>();

        workspaceConfigurers.add(new FixerWorkspaceConfigurer());
        if (AndroidMavenProjectConfigurator.usesM2E1_6OrNewer()) {