// Path: de.urszeidler.eclipse.solidity.ui/src/de/urszeidler/eclipse/solidity/ui/Activator.java
// public class Activator extends AbstractUIPlugin {
// 
// 	/**
// 	 * The plug-in ID.
// 	 */
// 	public static final String PLUGIN_ID = "de.urszeidler.eclipse.solidity.ui";
// 
// 	/**
// 	 * The shared instance.
// 	 */
// 	private static Activator plugin;
// 
// 	/**
// 	 * The constructor.
// 	 */
// 	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;
// 	}
// 
// 	/**
// 	 * {@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));
// 	}
// 
// }


import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
import de.urszeidler.eclipse.solidity.ui.Activator;
	

	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;
		}
// Path: de.urszeidler.eclipse.solidity.ui/src/de/urszeidler/eclipse/solidity/ui/Activator.java
// public class Activator extends AbstractUIPlugin {
// 
// 	/**
// 	 * The plug-in ID.
// 	 */
// 	public static final String PLUGIN_ID = "de.urszeidler.eclipse.solidity.ui";
// 
// 	/**
// 	 * The shared instance.
// 	 */
// 	private static Activator plugin;
// 
// 	/**
// 	 * The constructor.
// 	 */
// 	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;
// 	}
// 
// 	/**
// 	 * {@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));
// 	}
// 
// }


// Path: de.urszeidler.eclipse.solidity.ui/src/de/urszeidler/eclipse/solidity/ui/preferences/PreferenceConstants.java
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
import de.urszeidler.eclipse.solidity.ui.Activator;

	

	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);