// Path: src/java/krasa/formatter/exception/FormattingFailedException.java
// public class FormattingFailedException extends RuntimeException {
// 	private boolean userError;
// 
// 	public FormattingFailedException(String s) {
// 		super(s);
// 	}
// 
// 	public FormattingFailedException(String s, boolean userError) {
// 		super(s);
// 		this.userError = userError;
// 	}
// 
// 	public FormattingFailedException(InvalidPropertyFile e) {
// 		super(e);
// 	}
// 
// 	public boolean isUserError() {
// 
// 		return userError;
// 	}
// 
// 	public FormattingFailedException() {
// 	}
// }
// 
// Path: src/java/krasa/formatter/exception/InvalidSettingsException.java
// public class InvalidSettingsException extends FormattingFailedException {
// 	public InvalidSettingsException(String s) {
// 		super(s,true);
// 	}
// 
// 	public InvalidSettingsException(String s, boolean userError) {
// 		super(s, userError);
// 	}
// 
// 	public InvalidSettingsException(InvalidPropertyFile e) {
// 		super(e);
// 	}
// 
// 	public InvalidSettingsException() {
// 	}
// }


import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.*;
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.diagnostic.Logger;
import krasa.formatter.exception.FormattingFailedException;
import krasa.formatter.exception.InvalidSettingsException;
			"org.eclipse.osgi",
			"org.eclipse.text"
	};
	//@formatter:on

	public Set<String> jarNames;

	public ConfigurableEclipseLocation() {
		jarNames = new HashSet<String>();
		jarNames.addAll(Arrays.asList(JAR_NAMES));

	}

	public static void main(String[] args) throws IOException {
		List<URL> urlList;
		urlList = new ConfigurableEclipseLocation().run("C:\\Users\\vojtisek\\eclipse");
//		urlList= new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-standard-kepler-R-macosx-cocoa");
//		urlList= new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-standard-kepler-R-linux-gtk");
//		urlList= new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-standard-kepler-R-win32");
//		List<URL> urlList = new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-jee-2020-06-R-win32-x86_64");
		for (URL jar : urlList) {
			System.out.println(jar);
		}
	}

	public List<URL> run(String from) {
		long start = System.currentTimeMillis();
		List<URL> jars = null;
		try {
			File root = new File(from);
// Path: src/java/krasa/formatter/exception/FormattingFailedException.java
// public class FormattingFailedException extends RuntimeException {
// 	private boolean userError;
// 
// 	public FormattingFailedException(String s) {
// 		super(s);
// 	}
// 
// 	public FormattingFailedException(String s, boolean userError) {
// 		super(s);
// 		this.userError = userError;
// 	}
// 
// 	public FormattingFailedException(InvalidPropertyFile e) {
// 		super(e);
// 	}
// 
// 	public boolean isUserError() {
// 
// 		return userError;
// 	}
// 
// 	public FormattingFailedException() {
// 	}
// }
// 
// Path: src/java/krasa/formatter/exception/InvalidSettingsException.java
// public class InvalidSettingsException extends FormattingFailedException {
// 	public InvalidSettingsException(String s) {
// 		super(s,true);
// 	}
// 
// 	public InvalidSettingsException(String s, boolean userError) {
// 		super(s, userError);
// 	}
// 
// 	public InvalidSettingsException(InvalidPropertyFile e) {
// 		super(e);
// 	}
// 
// 	public InvalidSettingsException() {
// 	}
// }


// Path: src/java/krasa/formatter/eclipse/ConfigurableEclipseLocation.java
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.*;
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.diagnostic.Logger;
import krasa.formatter.exception.FormattingFailedException;
import krasa.formatter.exception.InvalidSettingsException;

			"org.eclipse.osgi",
			"org.eclipse.text"
	};
	//@formatter:on

	public Set<String> jarNames;

	public ConfigurableEclipseLocation() {
		jarNames = new HashSet<String>();
		jarNames.addAll(Arrays.asList(JAR_NAMES));

	}

	public static void main(String[] args) throws IOException {
		List<URL> urlList;
		urlList = new ConfigurableEclipseLocation().run("C:\\Users\\vojtisek\\eclipse");
//		urlList= new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-standard-kepler-R-macosx-cocoa");
//		urlList= new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-standard-kepler-R-linux-gtk");
//		urlList= new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-standard-kepler-R-win32");
//		List<URL> urlList = new ConfigurableEclipseLocation().run("C:\\workspace\\eclipse-jee-2020-06-R-win32-x86_64");
		for (URL jar : urlList) {
			System.out.println(jar);
		}
	}

	public List<URL> run(String from) {
		long start = System.currentTimeMillis();
		List<URL> jars = null;
		try {
			File root = new File(from);
			root = findEclipseRoot(root, start);