// Path: core/ts.core/src/ts/ScriptElementKind.java
// public enum ScriptElementKind {
// 
// 	ALIAS, PRIMITIVE_TYPE, KEYWORD, CLASS, INTERFACE, MODULE, SCRIPT, DIRECTORY, PROPERTY, METHOD, CONSTRUCTOR, FUNCTION, VAR, LET, ENUM, TYPE, ELEMENT, ATTRIBUTE, COMPONENT, CONST, GETTER, SETTER, WARNING;
// 
// 	public static ScriptElementKind getKind(String kind) {
// 		try {
// 			return ScriptElementKind.valueOf(kind.toUpperCase());
// 		} catch (Exception e) {
// 			return ScriptElementKind.WARNING;
// 		}
// 	}
// }


import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.graphics.Image;
import ts.ScriptElementKind;
import ts.ScriptElementKindModifier;
import ts.client.IKindProvider;
import ts.utils.StringUtils;

		return imageRegistry.getDescriptor(key);
	}

	private static void registerImageDescriptor(String key, ImageDescriptor descriptor) {
		ImageRegistry imageRegistry = JFaceResources.getImageRegistry();
		imageRegistry.put(key, descriptor);
	}

	public static Image getImage(IKindProvider entry) {
		return getTypeScriptImage(entry.getKind(), entry.getKindModifiers(), null);
	}

	public static Image getTypeScriptImage(String kind, String kindModifiers, String containerKind) {
		String imageKey = getImageKey(kind, kindModifiers, containerKind);
		if (imageKey != null) {
			return getImage(imageKey);
		}
		return null;
	}

	public static ImageDescriptor getTypeScriptImageDescriptor(String kind, String kindModifiers,
			String containerKind) {
		String imageKey = getImageKey(kind, kindModifiers, containerKind);
		if (imageKey != null) {
			return getImageDescriptor(imageKey);
		}
		return null;
	}

	private static String getImageKey(String kind, String kindModifiers, String containerKind) {

// Path: core/ts.core/src/ts/ScriptElementKind.java
// public enum ScriptElementKind {
// 
// 	ALIAS, PRIMITIVE_TYPE, KEYWORD, CLASS, INTERFACE, MODULE, SCRIPT, DIRECTORY, PROPERTY, METHOD, CONSTRUCTOR, FUNCTION, VAR, LET, ENUM, TYPE, ELEMENT, ATTRIBUTE, COMPONENT, CONST, GETTER, SETTER, WARNING;
// 
// 	public static ScriptElementKind getKind(String kind) {
// 		try {
// 			return ScriptElementKind.valueOf(kind.toUpperCase());
// 		} catch (Exception e) {
// 			return ScriptElementKind.WARNING;
// 		}
// 	}
// }


// Path: eclipse/ts.eclipse/src/ts/eclipse/jface/images/TypeScriptImagesRegistry.java
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.graphics.Image;
import ts.ScriptElementKind;
import ts.ScriptElementKindModifier;
import ts.client.IKindProvider;
import ts.utils.StringUtils;

		return imageRegistry.getDescriptor(key);
	}

	private static void registerImageDescriptor(String key, ImageDescriptor descriptor) {
		ImageRegistry imageRegistry = JFaceResources.getImageRegistry();
		imageRegistry.put(key, descriptor);
	}

	public static Image getImage(IKindProvider entry) {
		return getTypeScriptImage(entry.getKind(), entry.getKindModifiers(), null);
	}

	public static Image getTypeScriptImage(String kind, String kindModifiers, String containerKind) {
		String imageKey = getImageKey(kind, kindModifiers, containerKind);
		if (imageKey != null) {
			return getImage(imageKey);
		}
		return null;
	}

	public static ImageDescriptor getTypeScriptImageDescriptor(String kind, String kindModifiers,
			String containerKind) {
		String imageKey = getImageKey(kind, kindModifiers, containerKind);
		if (imageKey != null) {
			return getImageDescriptor(imageKey);
		}
		return null;
	}

	private static String getImageKey(String kind, String kindModifiers, String containerKind) {

		ScriptElementKind tsKind = ScriptElementKind.getKind(kind);
