/*
 * generated by Xtext
 */
package edu.kit.iti.formal.pse.worthwhile.ui.labeling;

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

import com.google.inject.Inject;

import edu.kit.iti.formal.pse.worthwhile.model.ast.Annotation;
import edu.kit.iti.formal.pse.worthwhile.util.NodeHelper;

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

	/**
	 * Creates a new instance of the {@link WorthwhileLabelProvider} class.
	 * 
	 * @param delegate
	 *                This is not even documented in the Xtext documentation, so who knows what this does?
	 */
	@Inject
	public WorthwhileLabelProvider(final AdapterFactoryLabelProvider delegate) {
		super(delegate);
	}

	/**
	 * Returns the lael for an annotation.
	 * 
	 * @param node
	 *                The annotation to get the label for
	 * @return The label for the annotation.
	 */
	final String text(final Annotation node) {
		return NodeHelper.getText(node);
	}

	/*
	 * //Labels and icons can be computed like this:
	 * 
	 * String text(MyModel ele) { return "my "+ele.getName(); }
	 * 
	 * String image(MyModel ele) { return "MyModel.gif"; }
	 */
}

@@ -1,33 +1,4 @@
-/*%0A * generated by Xtext%0A */%0A
 pack
@@ -1118,194 +1118,7 @@
 ;%0A%09%7D
-%0A%0A%09/*%0A%09 * //Labels and icons can be computed like this:%0A%09 * %0A%09 * String text(MyModel ele) %7B return %22my %22+ele.getName(); %7D%0A%09 * %0A%09 * String image(MyModel ele) %7B return %22MyModel.gif%22; %7D%0A%09 */
 %0A%7D%0A

Remove example comment