/*
* generated by Xtext
*/
package ca.queensu.cs.mase.ui.labeling;

import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider; 

import ca.queensu.cs.mase.urml.ActionCode;
import ca.queensu.cs.mase.urml.StateMachine;
import ca.queensu.cs.mase.urml.Transition;

import com.google.inject.Inject;

/**
 * Provides labels for a EObjects.
 * 
 * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
 */
public class UrmlLabelProvider extends DefaultEObjectLabelProvider {

	@Inject
	public UrmlLabelProvider(AdapterFactoryLabelProvider delegate) {
		super(delegate);
	}

	String text(StateMachine sm) {
		return "State Machine";
	}
	
	String text(ActionCode ac) {
		return "Action Code";
	}
	
	String text(Transition t) {
		if (t.isInit()) {
			return "initial transition";
		} else {
			return t.getName();
		}
	}
/*
	//Labels and icons can be computed like this:
	
	String text(MyModel ele) {
	  return "my "+ele.getName();
	}
	 
    String image(MyModel ele) {
      return "MyModel.gif";
    }
*/
}
