// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/ClasspathLoader.java
// public interface ClasspathLoader {
// 
//     Iterable<IClasspathEntry> load(IJavaProject project) throws FileNotFoundException;
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/NonRuntimeDependenciesClasspathContainer.java
// public class NonRuntimeDependenciesClasspathContainer implements IClasspathContainer {
// 
//     private final ClasspathLoader loader;
//     private final IDEAndroidProject eclipseProject;
// 
//     public NonRuntimeDependenciesClasspathContainer(ClasspathLoader loader, IDEAndroidProject project) {
//         super();
//         this.loader = loader;
//         this.eclipseProject = project;
//     }
// 
//     public IClasspathEntry[] getClasspathEntries() {
//         try {
//             final IJavaProject project = JavaCore.create(eclipseProject.getProject());
//             final Iterable<IClasspathEntry> nonRuntimeDependencies = loader.load(project);
//             return toArray(nonRuntimeDependencies, IClasspathEntry.class);
//         } catch (FileNotFoundException e) {
//             return new IClasspathEntry[0];
//         }
//     }
// 
//     public String getDescription() {
//         return "Non-Runtime Maven Dependencies";
//     }
// 
//     public int getKind() {
//         return IClasspathContainer.K_APPLICATION;
//     }
// 
//     public IPath getPath() {
//         return new Path(AndroidMavenPlugin.CONTAINER_NONRUNTIME_DEPENDENCIES);
//     }
// 
// }
// 
// 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/IDEAndroidProjectFactory.java
// public interface IDEAndroidProjectFactory extends AndroidProjectFactory<IDEAndroidProject, IProject> {
// 
//     public IDEAndroidProject createAndroidProject(IProject target);
// 
//     public IDEAndroidProject createAndroidProject(IProject target, IClasspathDescriptor classpath);
// 
// }


import static org.eclipse.jdt.core.JavaCore.setClasspathContainer;
import me.gladwell.eclipse.m2e.android.configuration.Caching;
import me.gladwell.eclipse.m2e.android.configuration.ClasspathLoader;
import me.gladwell.eclipse.m2e.android.configuration.NonRuntimeDependenciesClasspathContainer;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProject;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProjectFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IJavaProject;
import com.google.inject.Inject;
/*******************************************************************************
 * Copyright (c) 2013, 2014, 2015 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;




public class NonRuntimeDependenciesContainerInitializer extends ClasspathContainerInitializer {

    @Inject @Caching private ClasspathLoader loader;
    @Inject IDEAndroidProjectFactory factory;

    @Override
    public void initialize(IPath path, IJavaProject project) throws CoreException {
        final IDEAndroidProject eclipseProject = factory.createAndroidProject(project.getProject());
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/ClasspathLoader.java
// public interface ClasspathLoader {
// 
//     Iterable<IClasspathEntry> load(IJavaProject project) throws FileNotFoundException;
// 
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/NonRuntimeDependenciesClasspathContainer.java
// public class NonRuntimeDependenciesClasspathContainer implements IClasspathContainer {
// 
//     private final ClasspathLoader loader;
//     private final IDEAndroidProject eclipseProject;
// 
//     public NonRuntimeDependenciesClasspathContainer(ClasspathLoader loader, IDEAndroidProject project) {
//         super();
//         this.loader = loader;
//         this.eclipseProject = project;
//     }
// 
//     public IClasspathEntry[] getClasspathEntries() {
//         try {
//             final IJavaProject project = JavaCore.create(eclipseProject.getProject());
//             final Iterable<IClasspathEntry> nonRuntimeDependencies = loader.load(project);
//             return toArray(nonRuntimeDependencies, IClasspathEntry.class);
//         } catch (FileNotFoundException e) {
//             return new IClasspathEntry[0];
//         }
//     }
// 
//     public String getDescription() {
//         return "Non-Runtime Maven Dependencies";
//     }
// 
//     public int getKind() {
//         return IClasspathContainer.K_APPLICATION;
//     }
// 
//     public IPath getPath() {
//         return new Path(AndroidMavenPlugin.CONTAINER_NONRUNTIME_DEPENDENCIES);
//     }
// 
// }
// 
// 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/IDEAndroidProjectFactory.java
// public interface IDEAndroidProjectFactory extends AndroidProjectFactory<IDEAndroidProject, IProject> {
// 
//     public IDEAndroidProject createAndroidProject(IProject target);
// 
//     public IDEAndroidProject createAndroidProject(IProject target, IClasspathDescriptor classpath);
// 
// }


// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/NonRuntimeDependenciesContainerInitializer.java
import static org.eclipse.jdt.core.JavaCore.setClasspathContainer;
import me.gladwell.eclipse.m2e.android.configuration.Caching;
import me.gladwell.eclipse.m2e.android.configuration.ClasspathLoader;
import me.gladwell.eclipse.m2e.android.configuration.NonRuntimeDependenciesClasspathContainer;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProject;
import me.gladwell.eclipse.m2e.android.project.IDEAndroidProjectFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IJavaProject;
import com.google.inject.Inject;

/*******************************************************************************
 * Copyright (c) 2013, 2014, 2015 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;




public class NonRuntimeDependenciesContainerInitializer extends ClasspathContainerInitializer {

    @Inject @Caching private ClasspathLoader loader;
    @Inject IDEAndroidProjectFactory factory;

    @Override
    public void initialize(IPath path, IJavaProject project) throws CoreException {
        final IDEAndroidProject eclipseProject = factory.createAndroidProject(project.getProject());
        final IClasspathContainer nonRuntimeContainer = new NonRuntimeDependenciesClasspathContainer(loader,