// Path: de.urszeidler.eclipse.solidity.ui/src/de/urszeidler/eclipse/solidity/ui/preferences/PreferenceConstants.java
// 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 java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.Type;
import de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants;
				}
			} catch (IllegalArgumentException e) {
			}

		}
		return new ArrayList<Object>();
	}

	/**
	 * Get the index of the given {@link NamedElement} of its container.
	 * 
	 * @param clazz
	 * @return
	 */
	public static int getIndexInContainer(Element clazz) {
		EObject eContainer = clazz.eContainer();
		EStructuralFeature eContainingFeature = clazz.eContainingFeature();
		List<?> eGet = (List<?>) eContainer.eGet(eContainingFeature);
		return eGet.indexOf(clazz);
	}

	/**
	 * Returns the header for a solidity file.
	 * 
	 * @param an
	 *            element
	 * @return
	 */
	public static String getSolidityFileHeader(NamedElement clazz) {
		IPreferenceStore store = getStore(clazz);
// Path: de.urszeidler.eclipse.solidity.ui/src/de/urszeidler/eclipse/solidity/ui/preferences/PreferenceConstants.java
// 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);
// 	}
// 
// }


// Path: de.urszeidler.eclipse.solidity.ui/src/de/urszeidler/eclipse/solidity/util/Uml2Service.java
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.Type;
import de.urszeidler.eclipse.solidity.ui.preferences.PreferenceConstants;

				}
			} catch (IllegalArgumentException e) {
			}

		}
		return new ArrayList<Object>();
	}

	/**
	 * Get the index of the given {@link NamedElement} of its container.
	 * 
	 * @param clazz
	 * @return
	 */
	public static int getIndexInContainer(Element clazz) {
		EObject eContainer = clazz.eContainer();
		EStructuralFeature eContainingFeature = clazz.eContainingFeature();
		List<?> eGet = (List<?>) eContainer.eGet(eContainingFeature);
		return eGet.indexOf(clazz);
	}

	/**
	 * Returns the header for a solidity file.
	 * 
	 * @param an
	 *            element
	 * @return
	 */
	public static String getSolidityFileHeader(NamedElement clazz) {
		IPreferenceStore store = getStore(clazz);
		return store.getString(PreferenceConstants.CONTRACT_FILE_HEADER);