Skip to content

Instantly share code, notes, and snippets.

@manuelpayet
manuelpayet / EclipseJavaProjects.java
Created November 15, 2017 15:21 — forked from rylan/EclipseJavaProjects.java
Get a list of all java projects open in an Eclipse workspace
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
public class EclipseJavaProjects {
public static List<IJavaProject> getJavaProjects() {
List<IJavaProject> projectList = new LinkedList<IJavaProject>();