gt: 		EObject parserElement = getParserElement();
context: package com.opcoach.training.rental.diagram.edit.parts;
  
  import java.util.Collections;
  import java.util.List;
  
  import org.eclipse.draw2d.ConnectionLocator;
  import org.eclipse.draw2d.IFigure;
  import org.eclipse.draw2d.Label;
  import org.eclipse.draw2d.geometry.Point;
  import org.eclipse.emf.common.notify.Notification;
  import org.eclipse.emf.ecore.EObject;
  import org.eclipse.emf.transaction.RunnableWithResult;
  import org.eclipse.gef.AccessibleEditPart;
  import org.eclipse.gef.EditPolicy;
  import org.eclipse.gef.GraphicalEditPart;
  import org.eclipse.gef.Request;
  import org.eclipse.gef.handles.MoveHandle;
  import org.eclipse.gef.requests.DirectEditRequest;
  import org.eclipse.gef.tools.DirectEditManager;
  import org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint;
  import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
  import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
  import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
  import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
  import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
  import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
  import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
  import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
  import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
  import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
  import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
  import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
  import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
  import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
  import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
  import org.eclipse.gmf.runtime.notation.FontStyle;
  import org.eclipse.gmf.runtime.notation.NotationPackage;
  import org.eclipse.gmf.runtime.notation.View;
  import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
  import org.eclipse.jface.viewers.ICellEditorValidator;
  import org.eclipse.swt.SWT;
  import org.eclipse.swt.accessibility.AccessibleEvent;
  import org.eclipse.swt.graphics.Color;
  import org.eclipse.swt.graphics.FontData;
  import org.eclipse.swt.graphics.Image;
  
  import com.opcoach.training.rental.diagram.edit.policies.RentalTextSelectionEditPolicy;
  import com.opcoach.training.rental.diagram.part.RentalVisualIDRegistry;
  import com.opcoach.training.rental.diagram.providers.RentalElementTypes;
  import com.opcoach.training.rental.diagram.providers.RentalParserProvider;
  
  /**
   * @generated
   */
  public class WrappingLabelEditPart extends LabelEditPart implements ITextAwareEditPart
  {
  
  	/**
  	 * @generated
  	 */
  	public static final int VISUAL_ID = 6001;
  
  	/**
  	 * @generated
  	 */
  	private DirectEditManager manager;
  
  	/**
  	 * @generated
  	 */
  	private IParser parser;
  
  	/**
  	 * @generated
  	 */
  	private List<?> parserElements;
  
  	/**
  	 * @generated
  	 */
  	private String defaultText;
  
  	/**
  	 * @generated
  	 */
  	static
  	{
  		registerSnapBackPosition(
  				RentalVisualIDRegistry.getType(com.opcoach.training.rental.diagram.edit.parts.WrappingLabelEditPart.VISUAL_ID),
  				new Point(0, 40));
  	}
  
  	/**
  	 * @generated
  	 */
  	public WrappingLabelEditPart(View view)
  	{
  		super(view);
  	}
  
  	/**
  	 * @generated
  	 */
  	protected void createDefaultEditPolicies()
  	{
  		super.createDefaultEditPolicies();
  		installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
  		installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new RentalTextSelectionEditPolicy());
  		installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new RentalAgencyEditPart.LinkLabelDragPolicy());
  	}
  
  	/**
  	 * @generated
  	 */
  	public int getKeyPoint()
  	{
  		return ConnectionLocator.MIDDLE;
  	}
  
  	/**
  	 * @generated
  	 */
  	protected String getLabelTextHelper(IFigure figure)
  	{
  		if (figure instanceof WrappingLabel)
  		{
  			return ((WrappingLabel) figure).getText();
  		} else
  		{
  			return ((Label) figure).getText();
  		}
  	}
  
  	/**
  	 * @generated
  	 */
  	protected void setLabelTextHelper(IFigure figure, String text)
  	{
  		if (figure instanceof WrappingLabel)
  		{
  			((WrappingLabel) figure).setText(text);
  		} else
  		{
  			((Label) figure).setText(text);
  		}
  	}
  
  	/**
  	 * @generated
  	 */
  	protected Image getLabelIconHelper(IFigure figure)
  	{
  		if (figure instanceof WrappingLabel)
  		{
  			return ((WrappingLabel) figure).getIcon();
  		} else
  		{
  			return ((Label) figure).getIcon();
  		}
  	}
  
  	/**
  	 * @generated
  	 */
  	protected void setLabelIconHelper(IFigure figure, Image icon)
  	{
  		if (figure instanceof WrappingLabel)
  		{
  			((WrappingLabel) figure).setIcon(icon);
  		} else
  		{
  			((Label) figure).setIcon(icon);
  		}
  	}
  
  	/**
  	 * @generated
  	 */
  	public void setLabel(IFigure figure)
  	{
  		unregisterVisuals();
  		setFigure(figure);
  		defaultText = getLabelTextHelper(figure);
  		registerVisuals();
  		refreshVisuals();
  	}
  
  	/**
  	 * @generated
  	 */
  	@SuppressWarnings("rawtypes")
  	protected List getModelChildren()
  	{
  		return Collections.EMPTY_LIST;
  	}
  
  	/**
  	 * @generated
  	 */
  	public IGraphicalEditPart getChildBySemanticHint(String semanticHint)
  	{
  		return null;
  	}
  
  	/**
  	 * @generated
  	 */
  	protected EObject getParserElement()
  	{
  		return (View) getModel();
  	}
  
  	/**
  	 * @generated
  	 */
  	protected Image getLabelIcon()
  	{
  		return null;
  	}
  
  	/**
  	 * @generated
  	 */
  	protected String getLabelText()
  	{
  		String text = null;
  