// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/ProjectConfigurationException.java
// public class ProjectConfigurationException extends AndroidMavenException {
// 
//     private static final long serialVersionUID = -4510508504367403748L;
// 
//     public ProjectConfigurationException(String message) {
//         super(message);
//     }
// 
//     public ProjectConfigurationException(Throwable cause) {
//         super(cause);
//     }
// 
//     public ProjectConfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/IDEAndroidProject.java
// public interface IDEAndroidProject {
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public IProject getProject();
// 
//     public void setAndroidProject(boolean androidProject);
// 
//     public void setLibrary(boolean isLibrary);
// 
//     public void setLibraryDependencies(List<IDEAndroidProject> dependencies);
// 
//     public void fixProject();
// 
//     public boolean isMavenised();
// 
//     public IFile getPom();
// 
//     public void setAssetsDirectory(File file);
//  
//     public void setResourceFolder(File resourceDirectory);
//     
//     public void setAndroidManifest(File androidManifestFile);
// 
//     public Classpath getClasspath();
//     
//     public boolean shouldResolveWorkspaceProjects();
// 
//     public String getPath();
// 
//     public void orderBuilders();
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/MavenAndroidProject.java
// public interface MavenAndroidProject {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public List<Dependency> getNonRuntimeDependencies();
// 
//     public List<Dependency> getLibraryDependencies();
// 
//     public File getAssetsDirectory();
// 
//     public File getResourceFolder();
// 
//     public File getAndroidManifestFile();
//     
//     public File getDestinationManifestFile();
// 
//     public List<String> getPlatformProvidedDependencies();
// 
//     public List<String> getSourcePaths();
//     
//     public String getOutputDirectory();
// 
//     public boolean isIgnoreOptionalWarningsInGenFolder();
// 
//     public List<String> getTestSourcePaths();
// 
//     public List<String> getResourcePaths();
// 
//     public List<String> getTestResourcePaths();
// 
// }


import static me.gladwell.eclipse.m2e.android.AndroidMavenPlugin.ANDROID_GEN_FOLDER;
import java.io.File;
import me.gladwell.eclipse.m2e.android.AndroidMavenPlugin;
import me.gladwell.eclipse.m2e.android.configuration.ProjectConfigurationException;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProject;
import me.gladwell.eclipse.m2e.android.project.MavenAndroidProject;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
/*******************************************************************************
 * Copyright (c) 2013, 2014 Ricardo Gladwell
 * 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 me.gladwell.eclipse.m2e.android.configuration.classpath;





public class AddGenFolderClasspathConfigurer implements ClasspathConfigurer {

    public boolean shouldApplyTo(MavenAndroidProject project) {
        return true;
    }

    public void configure(MavenAndroidProject mavenProject, IDEAndroidProject eclipseProject) {
        IFolder gen = eclipseProject.getProject().getFolder(ANDROID_GEN_FOLDER + File.separator);
        if (!gen.exists()) {
            try {
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/ProjectConfigurationException.java
// public class ProjectConfigurationException extends AndroidMavenException {
// 
//     private static final long serialVersionUID = -4510508504367403748L;
// 
//     public ProjectConfigurationException(String message) {
//         super(message);
//     }
// 
//     public ProjectConfigurationException(Throwable cause) {
//         super(cause);
//     }
// 
//     public ProjectConfigurationException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/IDEAndroidProject.java
// public interface IDEAndroidProject {
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public IProject getProject();
// 
//     public void setAndroidProject(boolean androidProject);
// 
//     public void setLibrary(boolean isLibrary);
// 
//     public void setLibraryDependencies(List<IDEAndroidProject> dependencies);
// 
//     public void fixProject();
// 
//     public boolean isMavenised();
// 
//     public IFile getPom();
// 
//     public void setAssetsDirectory(File file);
//  
//     public void setResourceFolder(File resourceDirectory);
//     
//     public void setAndroidManifest(File androidManifestFile);
// 
//     public Classpath getClasspath();
//     
//     public boolean shouldResolveWorkspaceProjects();
// 
//     public String getPath();
// 
//     public void orderBuilders();
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/MavenAndroidProject.java
// public interface MavenAndroidProject {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public List<Dependency> getNonRuntimeDependencies();
// 
//     public List<Dependency> getLibraryDependencies();
// 
//     public File getAssetsDirectory();
// 
//     public File getResourceFolder();
// 
//     public File getAndroidManifestFile();
//     
//     public File getDestinationManifestFile();
// 
//     public List<String> getPlatformProvidedDependencies();
// 
//     public List<String> getSourcePaths();
//     
//     public String getOutputDirectory();
// 
//     public boolean isIgnoreOptionalWarningsInGenFolder();
// 
//     public List<String> getTestSourcePaths();
// 
//     public List<String> getResourcePaths();
// 
//     public List<String> getTestResourcePaths();
// 
// }


// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/classpath/AddGenFolderClasspathConfigurer.java
import static me.gladwell.eclipse.m2e.android.AndroidMavenPlugin.ANDROID_GEN_FOLDER;
import java.io.File;
import me.gladwell.eclipse.m2e.android.AndroidMavenPlugin;
import me.gladwell.eclipse.m2e.android.configuration.ProjectConfigurationException;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProject;
import me.gladwell.eclipse.m2e.android.project.MavenAndroidProject;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;

/*******************************************************************************
 * Copyright (c) 2013, 2014 Ricardo Gladwell
 * 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 me.gladwell.eclipse.m2e.android.configuration.classpath;





public class AddGenFolderClasspathConfigurer implements ClasspathConfigurer {

    public boolean shouldApplyTo(MavenAndroidProject project) {
        return true;
    }

    public void configure(MavenAndroidProject mavenProject, IDEAndroidProject eclipseProject) {
        IFolder gen = eclipseProject.getProject().getFolder(ANDROID_GEN_FOLDER + File.separator);
        if (!gen.exists()) {
            try {
                gen.create(true, true, new NullProgressMonitor());