// Path: org.cfeclipse.cfmledit.dictionaries/src/org/cfeclipse/cfmledit/dictionary/Dictionary.java
// public class Dictionary {
// 
// 	//Myself
// 	public static Dictionary instance = null;
// 	//Lightweight listing of server versions
// 	public static ArrayList<Version> versions = new ArrayList<Version>();
// 
// 	protected Dictionary() throws Exception{
// 		parseDictionaryConfig(); //No need to lazy load, it's a small XML file and in theory there only will be one dictionary per plugin
// 	}
// 	
// 	public static Dictionary getInstance() throws Exception {
// 		
// 		if(instance == null){
// 			instance = new Dictionary();
// 		}
// 		return instance;
// 	}
// 
// 	private void parseDictionaryConfig() throws Exception {
// 		// Get the file and set the names in the dictionaryconfig.xml
// 		Bundle bundle = DictionaryActivator.getBundle();
// 		URL eclipsePath = FileLocator.find(bundle, new Path("dictionary/dictionaryconfig.xml"),null); 
// 		URL filePath = FileLocator.toFileURL(eclipsePath);
// 		
// 		SAXBuilder builder = new SAXBuilder();
// 		Document doc = builder.build(filePath);
// 		Element cfmlversions = (Element)doc.getRootElement().getChildren().get(0);
// 		
// 		if(!cfmlversions.getAttributeValue("id").equalsIgnoreCase("CF_DICTIONARY")){
// 			throw new Exception("CFML Dictionary information not found");
// 		}
// 		loadVersions(cfmlversions);
// 	}
// 
// 	private void loadVersions(Element cfmlversions) throws IOException,
// 			JDOMException {
// 		List<Element> versions = cfmlversions.getChildren();
// 		for (Element vers : versions) {
// 			Version version = new Version(vers.getAttributeValue("key"), vers.getAttributeValue("label"));
// 			List<Element> grammars = vers.getChildren();
// 				for (Element gramr : grammars) {
// 					Grammar gram = new Grammar(gramr.getAttributeValue("location"));
// 					version.addGrammar(gram);
// 				}
// 				this.versions.add(version);
// 		}
// 	}
// 
// 	public ArrayList<Version> getVersions() throws Exception {
// 		return versions;
// 	}
// 	
// 	
// 	
// 
// }
// 
// Path: org.cfeclipse.cfmledit.dictionaries/src/org/cfeclipse/cfmledit/dictionary/Version.java
// public class Version {
// 	private String label = "";
// 	private String key = "";
// 	private ArrayList<Grammar> grammars = new ArrayList<Grammar>();
// 	public Version(String key, String label) {
// 		this.key = key;
// 		this.label = label;
// 	}
// 	
// 	public void addGrammar(Grammar gram) {
// 		grammars.add(gram);
// 	}
// 	
// 	
// 
// }


import static org.junit.Assert.*;
import java.util.ArrayList;
import org.cfeclipse.cfmledit.dictionary.Dictionary;
import org.cfeclipse.cfmledit.dictionary.Version;
import org.junit.Test;
package org.cfeclipse.cfmledit.tests.dictionary;




public class DictionaryTest {

	public void startup(){
		
	}
	
	@Test
	public void TestIsSingleton() {
		try{
// Path: org.cfeclipse.cfmledit.dictionaries/src/org/cfeclipse/cfmledit/dictionary/Dictionary.java
// public class Dictionary {
// 
// 	//Myself
// 	public static Dictionary instance = null;
// 	//Lightweight listing of server versions
// 	public static ArrayList<Version> versions = new ArrayList<Version>();
// 
// 	protected Dictionary() throws Exception{
// 		parseDictionaryConfig(); //No need to lazy load, it's a small XML file and in theory there only will be one dictionary per plugin
// 	}
// 	
// 	public static Dictionary getInstance() throws Exception {
// 		
// 		if(instance == null){
// 			instance = new Dictionary();
// 		}
// 		return instance;
// 	}
// 
// 	private void parseDictionaryConfig() throws Exception {
// 		// Get the file and set the names in the dictionaryconfig.xml
// 		Bundle bundle = DictionaryActivator.getBundle();
// 		URL eclipsePath = FileLocator.find(bundle, new Path("dictionary/dictionaryconfig.xml"),null); 
// 		URL filePath = FileLocator.toFileURL(eclipsePath);
// 		
// 		SAXBuilder builder = new SAXBuilder();
// 		Document doc = builder.build(filePath);
// 		Element cfmlversions = (Element)doc.getRootElement().getChildren().get(0);
// 		
// 		if(!cfmlversions.getAttributeValue("id").equalsIgnoreCase("CF_DICTIONARY")){
// 			throw new Exception("CFML Dictionary information not found");
// 		}
// 		loadVersions(cfmlversions);
// 	}
// 
// 	private void loadVersions(Element cfmlversions) throws IOException,
// 			JDOMException {
// 		List<Element> versions = cfmlversions.getChildren();
// 		for (Element vers : versions) {
// 			Version version = new Version(vers.getAttributeValue("key"), vers.getAttributeValue("label"));
// 			List<Element> grammars = vers.getChildren();
// 				for (Element gramr : grammars) {
// 					Grammar gram = new Grammar(gramr.getAttributeValue("location"));
// 					version.addGrammar(gram);
// 				}
// 				this.versions.add(version);
// 		}
// 	}
// 
// 	public ArrayList<Version> getVersions() throws Exception {
// 		return versions;
// 	}
// 	
// 	
// 	
// 
// }
// 
// Path: org.cfeclipse.cfmledit.dictionaries/src/org/cfeclipse/cfmledit/dictionary/Version.java
// public class Version {
// 	private String label = "";
// 	private String key = "";
// 	private ArrayList<Grammar> grammars = new ArrayList<Grammar>();
// 	public Version(String key, String label) {
// 		this.key = key;
// 		this.label = label;
// 	}
// 	
// 	public void addGrammar(Grammar gram) {
// 		grammars.add(gram);
// 	}
// 	
// 	
// 
// }


// Path: org.cfeclipse.cfmledit.tests/src/org/cfeclipse/cfmledit/tests/dictionary/DictionaryTest.java
import static org.junit.Assert.*;
import java.util.ArrayList;
import org.cfeclipse.cfmledit.dictionary.Dictionary;
import org.cfeclipse.cfmledit.dictionary.Version;
import org.junit.Test;

package org.cfeclipse.cfmledit.tests.dictionary;




public class DictionaryTest {

	public void startup(){
		
	}
	
	@Test
	public void TestIsSingleton() {
		try{
			Dictionary dic1 = Dictionary.getInstance();