public class PreferenceConstants {

	public static final String COMPILE_CONTRACTS = "COMPILE_CONTRACTS";
	public static final String COMPILER_PROGRAMM = "COMPILER_PROGRAMM";
	public static final String COMPILER_TARGET = "COMPILER_TARGET";
	public static final String COMPILER_ABI = "COMPILER_ABI";
	public static final String COMPILER_INTERFACT = "COMPILER_INTERFACT";
	public static final String COMPILER_ASM = "COMPILER_ASM";
	public static final String COMPILER_ASM_JSON = "COMPILER_ASM_JSON";
	public static final String COMPILER_BIN = "COMPILER_BIN";
	public static final String COMPILER_BIN_RUNTIME = "COMPILER_BIN_RUNTIME";
	public static final String COMPILER_AST = "COMPILER_AST";
	public static final String COMPILER_AST_JSON = "COMPILER_AST_JSON";
	public static final String COMPILER_USERDOC = "COMPILER_USERDOC";
	public static final String COMPILER_DEVDOC = "COMPILER_DEVDOC";
	public static final String COMPILER_OPTIMIZE = "COMPILER_OPTIMIZE";
	public static final String COMPILER_OPCODE = "COMPILER_OPCODE";
	public static final String COMPILER_FORMAL = "COMPILER_FORMAL";
	public static final String COMPILER_HASHES = "COMPILER_HASHES";
	public static final String COMBINED_JSON = "COMBINED_JSON";
	public static final String COMBINED_JSON_OPTIONS = "COMBINED_JSON_OPTIONS";
	public static final String SOL_SRC_DIRECTORY = "SOL_SRC_DIRECTORY";
	public static final String COMPILER_TARGET_COMBINE_ABI = "COMPILER_TARGET_COMBINE_ABI";
	public static final String COMPILER_TARGET_COMBINE_ABI_PATH = "COMPILER_TARGET_COMBINE_ABI_PATH";
	public static final String ENABLE_GAS_OPTIMIZE = "ENABLE_GAS_OPTIMIZE";
	public static final String ESTIMATE_GAS_COSTS = "ESTIMATE_GAS_COSTS";
	
	public static final String INSTALLED_SOL_COMPILERS = "INSTALLED_SOL_COMPILERS";
	

	public static final String COMPILER_PROJECT_SETTINGS = "COMPILE_CONTRACTS_PROJECT_SETTINGS";
	public static final String BUILDER_PROJECT_SETTINGS = "BUILDER_PROJECT_SETTINGS";
	public static final String SELECTED_COMPILER = "SELECTED_COMPILER";

	public static final String[] COMPILE_SWITCHES = {COMPILER_INTERFACT,
			COMPILER_ASM,COMPILER_ASM_JSON,COMPILER_BIN,COMPILER_BIN_RUNTIME,
			COMPILER_AST,COMPILER_AST_JSON, COMPILER_USERDOC,COMPILER_DEVDOC,
			COMPILER_OPTIMIZE,COMPILER_OPCODE,COMPILER_FORMAL,COMPILER_HASHES};
	
	
	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;
		}
	}
	
	public static IPreferenceStore getPreferenceStore(IProject project) {
		if (project != null) {
			IPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(project), Activator.PLUGIN_ID);
			if(store.getBoolean(PreferenceConstants.COMPILER_PROJECT_SETTINGS)|| store.getBoolean(PreferenceConstants.BUILDER_PROJECT_SETTINGS))
			return store;
		}
		return new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);//Activator.PLUGIN_ID);
	}
	
	public static List<SolC> parsePreferences(String pref) {
		ArrayList<SolC> list = new ArrayList<SolC>();
		String[] split = pref.split("::");
		for (String line : split) {
			String[] split2 = line.split(",");
			if(split2.length!=3)
				continue;
			SolC solc=new SolC();
			solc.name = split2[0];
			solc.path = split2[1];
			solc.version = split2[2];
			list.add(solc);
		}
		return list;
	}

	public static SolC solCof(String name,String path, String version) {
		SolC solc=new SolC();
		solc.name = name;
		solc.path = path;
		solc.version = version;
		return solc;
	}
	
} public static final String COMPILER_PROGRAMM = "COMPILER_PROGRAMM"; public static final String COMPILER_TARGET = "COMPILER_TARGET"; public static final String COMPILE_CONTRACTS = "COMPILE_CONTRACTS"; public static final String CONTRACT_FILE_HEADER = "CONTRACT_FILE_HEADER"; public static final String ENABLE_VERSION = "enable_version"; public static final String GENERATE_CONTRACT_FILES = "GENERATE_CONTRACT_FILES"; public static final String GENERATE_HTML = "GENERATE_HTML";	 public static final String GENERATE_MIX = "GENERATE_MIX"; public static final String GENERATE_WEB3 = "GENERATE_WEB3"; public static final String GENERATION_TARGET = "GENERATION_TARGET"; public static final String VERSION_PRAGMA = "version_pragma"; public class Activator extends AbstractUIPlugin {

	private static Activator plugin;
	/**
	 * The plug-in ID.
	 */
	public static final String PLUGIN_ID = "de.urszeidler.eclipse.solidity.laucher.ui";

	/**
	 * 
	 */
	public Activator() {
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
	 * @generated
	 */
	public void start(BundleContext context) throws Exception {
		super.start(context);
		plugin = this;
	}

	@Override
	protected void initializeImageRegistry(ImageRegistry reg) {
		ImageDescriptor image = imageDescriptorFromPlugin(PLUGIN_ID, "images/solidity16.png");
		reg.put("UML2Solidity", image);
		image = imageDescriptorFromPlugin(PLUGIN_ID, "images/script_wiz.gif");
		reg.put("JsCode", image);
		image = imageDescriptorFromPlugin(PLUGIN_ID, "images/help_topic.gif");
		reg.put("OtherFiles", image);
		image = imageDescriptorFromPlugin(PLUGIN_ID, "images/javabean_obj.gif");
		reg.put("JavaCode", image);
		
		super.initializeImageRegistry(reg);
	}
	
	/**
	 * {@inheritDoc}
	 *
	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
	 * @generated
	 */
	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));
	}

} public class GenerateUml2Solidity extends LaunchConfigurationDelegate {

	private final class PreferenceStoreExtension extends PreferenceStore {
		private final ILaunchConfiguration launchConfig;

		private PreferenceStoreExtension(ILaunchConfiguration con) {
			this.launchConfig = con;
		}

		@Override
		public String getString(String name) {
			try {
				String attribute = launchConfig.getAttribute(name, "");
				return attribute;
			} catch (CoreException e) {
			}
			return "";
		}

		@Override
		public boolean getBoolean(String name) {
			try {
				boolean attribute = launchConfig.getAttribute(name, false);
				return attribute;
			} catch (CoreException e) {
			}
			return false;
		}
		
		@Override
		public int getInt(String name) {
			try {
				return launchConfig.getAttribute(name, 0);
			} catch (CoreException e) {
			}
			return 0;
		}
		
		@Override
		public float getFloat(String name) {
			try {
				return  Float.parseFloat(launchConfig.getAttribute(name, "0.0f"));
			} catch (NumberFormatException e) {
			} catch (CoreException e) {
			}
			return 0.0f;
		}
		
		@Override
		public double getDouble(String name) {
			try {
				return  Double.parseDouble(launchConfig.getAttribute(name, "0.0d"));
			} catch (NumberFormatException e) {
			} catch (CoreException e) {
			}
			return 0.0d;
		}
	}

	private final class IProcessImplementation implements IProcess {
		private ILaunch launch;
		private boolean terminated = false;
		int exitValue = 0;
		String label;

		public IProcessImplementation(ILaunch launch) {
			this.launch = launch;
		}
		
		/**
		 * Fires the given debug event.
		 *
		 * @param event debug event to fire
		 */
		protected void fireEvent(DebugEvent event) {
			DebugPlugin manager= DebugPlugin.getDefault();
			if (manager != null) {
				manager.fireDebugEventSet(new DebugEvent[]{event});
			}
		}

		@Override
		public void terminate() throws DebugException {
			setTerminated(true);
		}

		@Override
		public boolean isTerminated() {
			return terminated;
		}

		@Override
		public boolean canTerminate() {
			return false;
		}

		@Override
		public <T> T getAdapter(Class<T> adapter) {
			return null;
		}

		@Override
		public void setAttribute(String key, String value) {
			
		}

		@Override
		public IStreamsProxy getStreamsProxy() {
			return null;
		}

		@Override
		public ILaunch getLaunch() {
			return launch;
		}

		@Override
		public String getLabel() {
			return label;
		}

		@Override
		public int getExitValue() throws DebugException {
			return exitValue;
		}

		@Override
		public String getAttribute(String key) {
			return launch.getAttribute(key);
		}

		public void setTerminated(boolean terminated) {
			this.terminated = terminated;
			fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));
		}
	}

	public static final String MODEL_URI = "modelUri";

	
	/* (non-Javadoc)
	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
	 */
	@Override
	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
			throws CoreException {
		String modelUri = configuration.getAttribute(MODEL_URI, "");
		final URI modelURI =  URI.createPlatformResourceURI(modelUri,
														 true);
		Path path = new Path(modelUri);
		final IResource findMember = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
		if (!(findMember instanceof IFile)) 
			throw new CoreException(Status.CANCEL_STATUS);
		
		final IFile file = (IFile) findMember;
		final ILaunchConfiguration launchConf = configuration;
		Uml2Service.setStore(new PreferenceStoreExtension(launchConf));
		IProcessImplementation process = new IProcessImplementation(launch);
		try {
			launch.addProcess(process);
			process.label = "generation working";
			IContainer target = file.getProject();
			GenerateAll generator = new GenerateAll(modelURI, target, new ArrayList<Object>());
			generator.doGenerateByExtension(monitor);
			process.label = "generation finished.";
		} finally {
			file.getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor);
			if(monitor!=null)
				monitor.done();
			process.setTerminated(true);
		}
	}

} public class PreferenceConstants {

	public static final String GENERATE_CONTRACT_FILES = "GENERATE_CONTRACT_FILES";
	public static final String GENERATION_TARGET = "GENERATION_TARGET";
	public static final String GENERATION_TARGET_DOC = "GENERATION_TARGET_DOC";
	public static final String GENERATION_ALL_IN_ONE_FILE = "GENERATION_ALL_IN_ONE_FILE";
	
	public static final String GENERATE_JAVA_INTERFACE = "GENERATE_JAVA_INTERFACE";
	public static final String GENERATION_JAVA_INTERFACE_TARGET = "GENERATION_JAVA_INTERFACE_TARGET";
	public static final String GENERATION_JAVA_INTERFACE_PACKAGE_PREFIX = "GENERATION_JAVA_INTERFACE_PACKAGE_PREFIX";
	public static final String GENERATION_JAVA_2_SOLIDITY_TYPES = "GENERATION_JAVA_2_SOLIDITY_TYPES";
	public static final String GENERATION_JAVA_2_SOLIDITY_TYPE_PREFIX = "GENERATION_JAVA_2_SOLIDITY_TYPE_";
	public static final String GENERATE_JAVA_TESTS = "GENERATE_JAVA_TESTS";
	public static final String GENERATION_JAVA_TEST_TARGET = "GENERATION_JAVA_TEST_TARGET";
	

	public static final String GENERATE_WEB3 = "GENERATE_WEB3";
	public static final String GENERATE_HTML = "GENERATE_HTML";	
	public static final String GENERATE_MIX = "GENERATE_MIX";
	public static final String GENERATE_MARKDOWN = "GENERATE_MARKDOWN";
	
	public static final String JS_FILE_HEADER = "JS_FILE_HEADER";
	public static final String GENERATE_JS_CONTROLLER = "GENERATE_JS_CONTROLLER";
	public static final String GENERATE_JS_CONTROLLER_TARGET = "GENERATE_JS_CONTROLLER_TARGET";
	public static final String GENERATE_JS_TEST = "GENERATE_JS_TEST";
	public static final String GENERATE_JS_TEST_TARGET = "GENERATE_JS_TEST_TARGET";
	public static final String GENERATE_ABI_TARGET = "GENERATE_ABI_TARGET";
	public static final String GENERATE_ABI = "GENERATE_ABI";
	
	public static final String GENERATOR_PROJECT_SETTINGS = "COMPILE_CONTRACTS_PROJECT_SETTINGS";
	public static final String CONTRACT_FILE_HEADER = "CONTRACT_FILE_HEADER";

	public static final String VERSION_PRAGMA = "version_pragma";
	public static final String ENABLE_VERSION = "enable_version";
	public static final String GENERATE_JAVA_NONBLOCKING = "GENERATE_JAVA_NONBLOCKING";

	
	
	public static IPreferenceStore getPreferenceStore(IProject project) {
		if (project != null) {
			IPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(project), Activator.PLUGIN_ID);
			if(store.getBoolean(PreferenceConstants.GENERATOR_PROJECT_SETTINGS))
			return store;
		}
		return new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);//Activator.PLUGIN_ID);
	}

}
import static de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.*;
import static de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.COMPILER_PROGRAMM;
import static de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.COMPILER_TARGET;
import static de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.COMPILE_CONTRACTS;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.CONTRACT_FILE_HEADER;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.ENABLE_VERSION;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.GENERATE_CONTRACT_FILES;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.GENERATE_HTML;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.GENERATE_MIX;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.GENERATE_WEB3;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.GENERATION_TARGET;
import static de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants.VERSION_PRAGMA;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.ExpandBar;
import org.eclipse.swt.widgets.ExpandItem;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ResourceListSelectionDialog;
import de.urszeidler.eclipse.solidity.laucher.Activator;
import de.urszeidler.eclipse.solidity.laucher.core.GenerateUml2Solidity;
import de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants;

			}
		});
		compiler_text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
		
		Label lblNewLabel_2 = new Label(grpCompile, SWT.NONE);
		lblNewLabel_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
		lblNewLabel_2.setText("compiler output");
		
		compiler_out_text = new Text(grpCompile, SWT.BORDER);
		compiler_out_text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		
		Button btnNewButton_1 = new Button(grpCompile, SWT.NONE);
		btnNewButton_1.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				handleChooseContainer(compiler_out_text, "select compiler output");
			}
		});
		btnNewButton_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
		btnNewButton_1.setText("select");
		
		ExpandBar expandBar = new ExpandBar(grpCompile, SWT.NONE);
		expandBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 3, 1));
		
		ExpandItem xpndtmNewExpanditem = new ExpandItem(expandBar, SWT.NONE);
		xpndtmNewExpanditem.setExpanded(true);
		xpndtmNewExpanditem.setText("compiler options");
		
		Composite composite = new Composite(expandBar, SWT.NONE);
		xpndtmNewExpanditem.setControl(composite);
		composite.setLayout(new GridLayout(1, false));
		
		String[] compileSwitches = de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.COMPILE_SWITCHES;
		for (String sw : compileSwitches) {
			Button btnCheckButton = new Button(composite, SWT.CHECK);
			btnCheckButton.addSelectionListener(new SelectionAdapter() {
				@Override
				public void widgetSelected(SelectionEvent e) {
					validatePage();
				}
				
			});
			btnCheckButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
			btnCheckButton.setText(sw);
			compileOptions.put(sw,btnCheckButton);
		}
		xpndtmNewExpanditem.setHeight(xpndtmNewExpanditem.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
		

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.
	 * debug.core.ILaunchConfigurationWorkingCopy)
	 */
	@Override
	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
		IPreferenceStore store = PreferenceConstants.getPreferenceStore(null);
		IPreferenceStore store1 = de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.getPreferenceStore(null);
		configuration.setAttribute(GenerateUml2Solidity.MODEL_URI, "");

		configuration.setAttribute(GENERATE_CONTRACT_FILES, store.getBoolean(GENERATE_CONTRACT_FILES));
		configuration.setAttribute(GENERATION_TARGET, store.getString(GENERATION_TARGET));
		configuration.setAttribute(CONTRACT_FILE_HEADER, store.getString(CONTRACT_FILE_HEADER));
		configuration.setAttribute(GENERATE_MIX, store.getBoolean(GENERATE_MIX));
		configuration.setAttribute(GENERATE_WEB3, store.getBoolean(GENERATE_WEB3));
		configuration.setAttribute(ENABLE_VERSION, store.getBoolean(ENABLE_VERSION));
		configuration.setAttribute(VERSION_PRAGMA, store.getString(VERSION_PRAGMA));
		
		configuration.setAttribute(COMPILE_CONTRACTS, store1.getBoolean(COMPILE_CONTRACTS));
		configuration.setAttribute(COMPILER_PROGRAMM, store1.getString(COMPILER_PROGRAMM));
		configuration.setAttribute(COMPILER_TARGET, store1.getString(COMPILER_TARGET));
		String[] compileSwitches = de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.COMPILE_SWITCHES;
		for (String sw : compileSwitches) {
			configuration.setAttribute(sw, store1.getString(sw));
		}
		configuration.setAttribute(COMBINED_JSON_OPTIONS, store1.getString(COMBINED_JSON_OPTIONS));
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.
	 * debug.core.ILaunchConfiguration)
	 */
	@Override
	public void initializeFrom(ILaunchConfiguration configuration) {
		IPreferenceStore store = PreferenceConstants.getPreferenceStore(null);
		IPreferenceStore store1 = de.urszeidler.eclipse.solidity.compiler.support.preferences.PreferenceConstants.getPreferenceStore(null);
		try {
			btnGenerateSolidityCode.setSelection(
					configuration.getAttribute(GENERATE_CONTRACT_FILES, store.getBoolean(GENERATE_CONTRACT_FILES)));
			btnGenerateMixConfig.setSelection(configuration.getAttribute(GENERATE_MIX, store.getBoolean(GENERATE_MIX)));
			btnGenerateMixHtml.setSelection(configuration.getAttribute(GENERATE_HTML, store.getBoolean(GENERATE_HTML)));
			modelText.setText(configuration.getAttribute(GenerateUml2Solidity.MODEL_URI, ""));
			fileHeaderText
					.setText(configuration.getAttribute(CONTRACT_FILE_HEADER, store.getString(CONTRACT_FILE_HEADER)));
			generationDirectoryText
					.setText(configuration.getAttribute(GENERATION_TARGET, store.getString(GENERATION_TARGET)));
			btnVersionAbove.setSelection(configuration.getAttribute(ENABLE_VERSION, store.getBoolean(ENABLE_VERSION)));
			versionText.setText(configuration.getAttribute(VERSION_PRAGMA, store.getString(VERSION_PRAGMA)));
			versionText.setEnabled(configuration.getAttribute(ENABLE_VERSION, store.getBoolean(ENABLE_VERSION)));

			btnCompile.setSelection(configuration.getAttribute(COMPILE_CONTRACTS, store1.getBoolean(COMPILE_CONTRACTS)));
			compiler_out_text.setText(configuration.getAttribute(COMPILER_TARGET, store1.getString(COMPILER_TARGET)));
			compiler_text.setText(configuration.getAttribute(COMPILER_PROGRAMM, store1.getString(COMPILER_PROGRAMM)));
			
			for (Entry<String, Button> e : compileOptions.entrySet()) {
				e.getValue().setSelection(configuration.getAttribute(e.getKey(), store1.getBoolean(e.getKey())));
			}
			
			IResource resource = findResource(configuration, generationDirectoryText.getText());
			if (resource != null)
				generationDirectoryText.setText(resource.getFullPath().toString());

		} catch (CoreException e) {

			Activator.logError("Error initalizing from LauncheConfig", e);
