// Path: de.urszeidler.eclipse.solidity.compiler.support/src/de/urszeidler/eclipse/solidity/compiler/support/Activator.java
// public class Activator extends AbstractUIPlugin {
// 
// 	// The plug-in ID
// 	public static final String PLUGIN_ID = "de.urszeidler.eclipse.solidity.compiler.support"; //$NON-NLS-1$
// 
// 	// The shared instance
// 	private static Activator plugin;
// 	
// 	/**
// 	 * The constructor
// 	 */
// 	public Activator() {
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
// 	 */
// 	public void start(BundleContext context) throws Exception {
// 		super.start(context);
// 		plugin = this;
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
// 	 */
// 	public void stop(BundleContext context) throws Exception {
// 		plugin = null;
// 		super.stop(context);
// 	}
// 
// 	/**
// 	 * Returns the shared instance
// 	 *
// 	 * @return the shared instance
// 	 */
// 	public static Activator getDefault() {
// 		return plugin;
// 	}
// 	public static void logError(String message, Exception e) {
// 		getDefault().getLog().log(createErrorStatus(message, e));
// 	}
// 
// 	public static Status createErrorStatus(String message, Exception e) {
// 		return new Status(IStatus.ERROR, PLUGIN_ID, message, e);
// 	}
// 
// 	public static void logError(String message) {
// 		getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
// 	}
// 
// 	public static void logInfo(String message) {
// 		getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
// 	}
// 
// 	public static void logWarning(String message) {
// 		getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
// 	}
// 
// }
// 
// Path: de.urszeidler.eclipse.solidity.compiler.support/src/de/urszeidler/eclipse/solidity/compiler/support/preferences/PreferenceConstants.java
// public static class SolC{
// 	String name;
// 	String path;
// 	String version;
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + ((name == null) ? 0 : name.hashCode());
// 		result = prime * result + ((path == null) ? 0 : path.hashCode());
// 		result = prime * result + ((version == null) ? 0 : version.hashCode());
// 		return result;
// 	}
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		SolC other = (SolC) obj;
// 		if (name == null) {
// 			if (other.name != null)
// 				return false;
// 		} else if (!name.equals(other.name))
// 			return false;
// 		if (path == null) {
// 			if (other.path != null)
// 				return false;
// 		} else if (!path.equals(other.path))
// 			return false;
// 		if (version == null) {
// 			if (other.version != null)
// 				return false;
// 		} else if (!version.equals(other.version))
// 			return false;
// 		return true;
// 	}
// }


import java.io.File;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.ComboFieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.StringButtonFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
import de.urszeidler.eclipse.solidity.compiler.support.Activator;
import de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.SolC;
					getFieldEditorParent()) {

				@Override
				protected String changePressed() {
					Path srcDir = new Path(getStringValue());
					IResource member = project.findMember(srcDir);
					if (member == null)
						member = ResourcesPlugin.getWorkspace().getRoot().findMember(srcDir);

					ContainerSelectionDialog containerSelectionDialog = new ContainerSelectionDialog(getShell(),
							(IContainer) member, false, "select dirctory of the source files");
					containerSelectionDialog.open();
					Object[] result = containerSelectionDialog.getResult();
					if (result != null && result.length == 1) {
						IPath container = (IPath) result[0];

						compilerTarget.setStringValue(container.toString() + "/combined.json");
						return container.toString();
					}
					return null;
				}
			};
			sourceDirectory.setEmptyStringAllowed(false);
			addField(sourceDirectory);
		}
		compilerTarget = new StringFieldEditor(PreferenceConstants.COMPILER_TARGET_COMBINE_ABI, "compile to file", -1,
				StringFieldEditor.VALIDATE_ON_KEY_STROKE, getFieldEditorParent());
		addField(compilerTarget);

		IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, preferencesId());
// Path: de.urszeidler.eclipse.solidity.compiler.support/src/de/urszeidler/eclipse/solidity/compiler/support/Activator.java
// public class Activator extends AbstractUIPlugin {
// 
// 	// The plug-in ID
// 	public static final String PLUGIN_ID = "de.urszeidler.eclipse.solidity.compiler.support"; //$NON-NLS-1$
// 
// 	// The shared instance
// 	private static Activator plugin;
// 	
// 	/**
// 	 * The constructor
// 	 */
// 	public Activator() {
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
// 	 */
// 	public void start(BundleContext context) throws Exception {
// 		super.start(context);
// 		plugin = this;
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
// 	 */
// 	public void stop(BundleContext context) throws Exception {
// 		plugin = null;
// 		super.stop(context);
// 	}
// 
// 	/**
// 	 * Returns the shared instance
// 	 *
// 	 * @return the shared instance
// 	 */
// 	public static Activator getDefault() {
// 		return plugin;
// 	}
// 	public static void logError(String message, Exception e) {
// 		getDefault().getLog().log(createErrorStatus(message, e));
// 	}
// 
// 	public static Status createErrorStatus(String message, Exception e) {
// 		return new Status(IStatus.ERROR, PLUGIN_ID, message, e);
// 	}
// 
// 	public static void logError(String message) {
// 		getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
// 	}
// 
// 	public static void logInfo(String message) {
// 		getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
// 	}
// 
// 	public static void logWarning(String message) {
// 		getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
// 	}
// 
// }
// 
// Path: de.urszeidler.eclipse.solidity.compiler.support/src/de/urszeidler/eclipse/solidity/compiler/support/preferences/PreferenceConstants.java
// public static class SolC{
// 	String name;
// 	String path;
// 	String version;
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + ((name == null) ? 0 : name.hashCode());
// 		result = prime * result + ((path == null) ? 0 : path.hashCode());
// 		result = prime * result + ((version == null) ? 0 : version.hashCode());
// 		return result;
// 	}
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		SolC other = (SolC) obj;
// 		if (name == null) {
// 			if (other.name != null)
// 				return false;
// 		} else if (!name.equals(other.name))
// 			return false;
// 		if (path == null) {
// 			if (other.path != null)
// 				return false;
// 		} else if (!path.equals(other.path))
// 			return false;
// 		if (version == null) {
// 			if (other.version != null)
// 				return false;
// 		} else if (!version.equals(other.version))
// 			return false;
// 		return true;
// 	}
// }


// Path: de.urszeidler.eclipse.solidity.compiler.support/src/de/urszeidler/eclipse/solidity/compiler/support/preferences/SolcBuilderPreferencePage.java
import java.io.File;
import java.util.List;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.ComboFieldEditor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.StringButtonFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
import de.urszeidler.eclipse.solidity.compiler.support.Activator;
import de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.SolC;

					getFieldEditorParent()) {

				@Override
				protected String changePressed() {
					Path srcDir = new Path(getStringValue());
					IResource member = project.findMember(srcDir);
					if (member == null)
						member = ResourcesPlugin.getWorkspace().getRoot().findMember(srcDir);

					ContainerSelectionDialog containerSelectionDialog = new ContainerSelectionDialog(getShell(),
							(IContainer) member, false, "select dirctory of the source files");
					containerSelectionDialog.open();
					Object[] result = containerSelectionDialog.getResult();
					if (result != null && result.length == 1) {
						IPath container = (IPath) result[0];

						compilerTarget.setStringValue(container.toString() + "/combined.json");
						return container.toString();
					}
					return null;
				}
			};
			sourceDirectory.setEmptyStringAllowed(false);
			addField(sourceDirectory);
		}
		compilerTarget = new StringFieldEditor(PreferenceConstants.COMPILER_TARGET_COMBINE_ABI, "compile to file", -1,
				StringFieldEditor.VALIDATE_ON_KEY_STROKE, getFieldEditorParent());
		addField(compilerTarget);

		IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, preferencesId());
		final List<SolC> parsePreferences = PreferenceConstants