code: function populateThemes(){
  		this.preferences.getTheme(function(themeStyles) {
  			var selectElement = document.getElementById('editorTheme');//$NON-NLS-0$
  			while (selectElement.hasChildNodes() ){
  				selectElement.removeChild(selectElement.lastChild);
  			}
  			for (var i =0; i < themeStyles.styles.length; i++) {
  				var option = document.createElement('option');
  				option.setAttribute('value', themeStyles.styles[i].name);
  				//checks if a theme is the current theme 
  				if (themeStyles.styles[i].name === themeStyles.style.name){
  					option.setAttribute('selected', 'true');
  				}
  				option.appendChild(document.createTextNode(themeStyles.styles[i].name));
  				selectElement.appendChild(option);
  			}
  			this.selectTheme(themeStyles.style.name);
  		}.bind(this));
  	}
docs: populates theme selections