code: /*
  * generated by Xtext
  */
  package org.applause.lang.ui.labeling;
  
  import org.applause.lang.applauseDsl.Application;
  import org.applause.lang.applauseDsl.Constant;
  import org.applause.lang.applauseDsl.ContentProvider;
  import org.applause.lang.applauseDsl.Property;
  import org.applause.lang.applauseDsl.SectionCell;
  import org.applause.lang.applauseDsl.Type;
  import org.applause.lang.applauseDsl.View;
  import org.applause.lang.applauseDsl.ViewSection;
  import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
  import org.eclipse.ui.part.ViewPart;
  import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
  
  import com.google.inject.Inject;
  
  /**
   * Provides labels for a EObjects.
   * 
   * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
   */
  public class ApplauseDslLabelProvider extends DefaultEObjectLabelProvider {
  	
  	@Inject
  	public ApplauseDslLabelProvider(AdapterFactoryLabelProvider delegate) {
  		super(delegate);
  	}
  
  	String image(Application obj) {
  		return "iphone.png";
  	}
  	
  	String image(Constant obj) {
  		return "constant.gif";
  	}
  	
  	String image(ContentProvider obj) {
  		return "contentprovider.gif";
  	}
  	
  	String image(Type obj) {
  		return "class_obj.gif";
  	}
  
  	String image(View obj) {
  		return "view.gif";
  	}
  	
  	String imageForProperty(Type type, boolean many) {
  		return "property.gif";
  	}
  	
  	String image(Property obj) {
  		return imageForProperty(obj.getDescription().getType(), obj.getDescription().isMany());
  	}
  	
  	String image(ViewPart obj) {
  		return "viewpart.gif";
  	}
  	
  	String image(ViewSection obj) {
  		return "section.gif";
  	}
  	
  	String image(SectionCell obj) {
  		return "cell.gif";
  	}
  	
  	String text(SectionCell obj){
  		return "cell " + obj.getType().getName();
  	}
  
  	String text(ViewSection obj){
  		return "section";
  	}
  
  }
  