gt: 			return ((InterfaceElementEditPart) targetEditPart)
context: package ejb.container.diagram.providers;
  
  import java.util.ArrayList;
  import java.util.Collection;
  import java.util.Collections;
  import java.util.HashSet;
  import java.util.Iterator;
  import java.util.List;
  
  import org.eclipse.core.runtime.IAdaptable;
  import org.eclipse.emf.ecore.EObject;
  import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
  import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
  import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
  import org.eclipse.gmf.runtime.emf.type.core.IElementType;
  import org.eclipse.gmf.runtime.emf.ui.services.modelingassistant.ModelingAssistantProvider;
  import org.eclipse.gmf.runtime.notation.Diagram;
  import org.eclipse.jface.viewers.ILabelProvider;
  import org.eclipse.jface.window.Window;
  import org.eclipse.swt.widgets.Display;
  import org.eclipse.swt.widgets.Shell;
  import org.eclipse.ui.dialogs.ElementListSelectionDialog;
  
  import ejb.container.diagram.edit.parts.ClassElement2EditPart;
  import ejb.container.diagram.edit.parts.ClassElementEditPart;
  import ejb.container.diagram.edit.parts.EJBContainerEditPart;
  import ejb.container.diagram.edit.parts.EntityBeanEditPart;
  import ejb.container.diagram.edit.parts.EnumElementEditPart;
  import ejb.container.diagram.edit.parts.InterfaceElementEditPart;
  import ejb.container.diagram.edit.parts.MessageDrivenBeanEditPart;
  import ejb.container.diagram.edit.parts.PackageElementEditPart;
  import ejb.container.diagram.edit.parts.StatefulSessionBeanEditPart;
  import ejb.container.diagram.edit.parts.StatelessSessionBeanEditPart;
  import ejb.container.diagram.part.Messages;
  import ejb.container.diagram.part.ModelDiagramEditorPlugin;
  
  /**
   * @generated
   */
  public class ModelModelingAssistantProvider extends ModelingAssistantProvider {
  
  	/**
  	 * @generated
  	 */
  	public List getTypesForPopupBar(IAdaptable host) {
  		IGraphicalEditPart editPart = (IGraphicalEditPart) host
  				.getAdapter(IGraphicalEditPart.class);
  		if (editPart instanceof EJBContainerEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(8);
  			types.add(ModelElementTypes.InterfaceElement_2012);
  			types.add(ModelElementTypes.EntityBean_2002);
  			types.add(ModelElementTypes.MessageDrivenBean_2003);
  			types.add(ModelElementTypes.StatefulSessionBean_2006);
  			types.add(ModelElementTypes.StatelessSessionBean_2007);
  			types.add(ModelElementTypes.PackageElement_2009);
  			types.add(ModelElementTypes.ClassElement_2011);
  			types.add(ModelElementTypes.EnumElement_2013);
  			return types;
  		}
  		if (editPart instanceof InterfaceElementEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(2);
  			types.add(ModelElementTypes.Property_3003);
  			types.add(ModelElementTypes.Operation_3004);
  			return types;
  		}
  		if (editPart instanceof EntityBeanEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(2);
  			types.add(ModelElementTypes.Property_3005);
  			types.add(ModelElementTypes.Operation_3006);
  			return types;
  		}
  		if (editPart instanceof MessageDrivenBeanEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(2);
  			types.add(ModelElementTypes.Property_3007);
  			types.add(ModelElementTypes.Operation_3008);
  			return types;
  		}
  		if (editPart instanceof StatefulSessionBeanEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(2);
  			types.add(ModelElementTypes.Property_3009);
  			types.add(ModelElementTypes.Operation_3010);
  			return types;
  		}
  		if (editPart instanceof StatelessSessionBeanEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(2);
  			types.add(ModelElementTypes.Property_3011);
  			types.add(ModelElementTypes.Operation_3012);
  			return types;
  		}
  		if (editPart instanceof PackageElementEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(1);
  			types.add(ModelElementTypes.ClassElement_3016);
  			return types;
  		}
  		if (editPart instanceof ClassElementEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(2);
  			types.add(ModelElementTypes.Property_3017);
  			types.add(ModelElementTypes.Operation_3018);
  			return types;
  		}
  		if (editPart instanceof EnumElementEditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(1);
  			types.add(ModelElementTypes.EnumLiteral_3019);
  			return types;
  		}
  		if (editPart instanceof ClassElement2EditPart) {
  			ArrayList<IElementType> types = new ArrayList<IElementType>(2);
  			types.add(ModelElementTypes.Property_3014);
  			types.add(ModelElementTypes.Operation_3015);
  			return types;
  		}
  		return Collections.EMPTY_LIST;
  	}
  
  	/**
  	 * @generated
  	 */
  	public List getRelTypesOnSource(IAdaptable source) {
  		IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
  				.getAdapter(IGraphicalEditPart.class);
  		if (sourceEditPart instanceof InterfaceElementEditPart) {
  			return ((InterfaceElementEditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		if (sourceEditPart instanceof EntityBeanEditPart) {
  			return ((EntityBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		if (sourceEditPart instanceof MessageDrivenBeanEditPart) {
  			return ((MessageDrivenBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		if (sourceEditPart instanceof StatefulSessionBeanEditPart) {
  			return ((StatefulSessionBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		if (sourceEditPart instanceof StatelessSessionBeanEditPart) {
  			return ((StatelessSessionBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		if (sourceEditPart instanceof PackageElementEditPart) {
  			return ((PackageElementEditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		if (sourceEditPart instanceof ClassElementEditPart) {
  			return ((ClassElementEditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		if (sourceEditPart instanceof ClassElement2EditPart) {
  			return ((ClassElement2EditPart) sourceEditPart)
  					.getMARelTypesOnSource();
  		}
  		return Collections.EMPTY_LIST;
  	}
  
  	/**
  	 * @generated
  	 */
  	public List getRelTypesOnTarget(IAdaptable target) {
  		IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
  				.getAdapter(IGraphicalEditPart.class);
  		if (targetEditPart instanceof InterfaceElementEditPart) {
  			return ((InterfaceElementEditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		if (targetEditPart instanceof EntityBeanEditPart) {
  			return ((EntityBeanEditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		if (targetEditPart instanceof MessageDrivenBeanEditPart) {
  			return ((MessageDrivenBeanEditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		if (targetEditPart instanceof StatefulSessionBeanEditPart) {
  			return ((StatefulSessionBeanEditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		if (targetEditPart instanceof StatelessSessionBeanEditPart) {
  			return ((StatelessSessionBeanEditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		if (targetEditPart instanceof PackageElementEditPart) {
  			return ((PackageElementEditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		if (targetEditPart instanceof ClassElementEditPart) {
  			return ((ClassElementEditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		if (targetEditPart instanceof ClassElement2EditPart) {
  			return ((ClassElement2EditPart) targetEditPart)
  					.getMARelTypesOnTarget();
  		}
  		return Collections.EMPTY_LIST;
  	}
  
  	/**
  	 * @generated
  	 */
  	public List getRelTypesOnSourceAndTarget(IAdaptable source,
  			IAdaptable target) {
  		IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
  				.getAdapter(IGraphicalEditPart.class);
  		IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
  				.getAdapter(IGraphicalEditPart.class);
  		if (sourceEditPart instanceof InterfaceElementEditPart) {
  			return ((InterfaceElementEditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		if (sourceEditPart instanceof EntityBeanEditPart) {
  			return ((EntityBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		if (sourceEditPart instanceof MessageDrivenBeanEditPart) {
  			return ((MessageDrivenBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		if (sourceEditPart instanceof StatefulSessionBeanEditPart) {
  			return ((StatefulSessionBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		if (sourceEditPart instanceof StatelessSessionBeanEditPart) {
  			return ((StatelessSessionBeanEditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		if (sourceEditPart instanceof PackageElementEditPart) {
  			return ((PackageElementEditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		if (sourceEditPart instanceof ClassElementEditPart) {
  			return ((ClassElementEditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		if (sourceEditPart instanceof ClassElement2EditPart) {
  			return ((ClassElement2EditPart) sourceEditPart)
  					.getMARelTypesOnSourceAndTarget(targetEditPart);
  		}
  		return Collections.EMPTY_LIST;
  	}
  
  	/**
  	 * @generated
  	 */
  	public List getTypesForSource(IAdaptable target,
  			IElementType relationshipType) {
  		IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
  				.getAdapter(IGraphicalEditPart.class);
  		if (targetEditPart instanceof InterfaceElementEditPart) {
  