Package org.eclipse.gmf.runtime.diagram.ui.editparts

Examples of org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart


  /**
   * @generated
   */
  public synchronized IGraphicalEditPart createGraphicEditPart(View view) {
    if (isAllowCaching()) {
      IGraphicalEditPart part = getCachedPart(view);
      cachedPart = null;
      cachedView = null;
      if (part != null) {
        return part;
      }
View Full Code Here


        return false;
      }
      if (isAllowCaching() && getCachedPart(view) != null) {
        return true;
      }
      IGraphicalEditPart part = createEditPart(view);
      if (part != null) {
        if (isAllowCaching()) {
          cachedPart = new WeakReference(part);
          cachedView = new WeakReference(view);
        }
View Full Code Here

  /**
   * @generated
   */
  public List getTypesForPopupBar(IAdaptable host) {
    IGraphicalEditPart editPart = (IGraphicalEditPart) host
        .getAdapter(IGraphicalEditPart.class);
    if (editPart instanceof PackageEditPart) {
      ArrayList<IElementType> types = new ArrayList<IElementType>(6);
      types.add(DispelElementTypes.LocalVariableStatement_2001);
      types.add(DispelElementTypes.ConnectionInitialization_2002);
View Full Code Here

  /**
   * @generated
   */
  public List getRelTypesOnSource(IAdaptable source) {
    IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
        .getAdapter(IGraphicalEditPart.class);
    if (sourceEditPart instanceof ConnectionInitializationEditPart) {
      return ((ConnectionInitializationEditPart) sourceEditPart)
          .getMARelTypesOnSource();
    }
View Full Code Here

  /**
   * @generated
   */
  public List getRelTypesOnTarget(IAdaptable target) {
    IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
        .getAdapter(IGraphicalEditPart.class);
    if (targetEditPart instanceof ConnectionInitializationEditPart) {
      return ((ConnectionInitializationEditPart) targetEditPart)
          .getMARelTypesOnTarget();
    }
View Full Code Here

  /**
   * @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 ConnectionInitializationEditPart) {
      return ((ConnectionInitializationEditPart) sourceEditPart)
          .getMARelTypesOnSourceAndTarget(targetEditPart);
    }
View Full Code Here

  /**
   * @generated
   */
  public List getTypesForSource(IAdaptable target,
      IElementType relationshipType) {
    IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target
        .getAdapter(IGraphicalEditPart.class);
    if (targetEditPart instanceof ConnectionInitializationEditPart) {
      return ((ConnectionInitializationEditPart) targetEditPart)
          .getMATypesForSource(relationshipType);
    }
View Full Code Here

  /**
   * @generated
   */
  public List getTypesForTarget(IAdaptable source,
      IElementType relationshipType) {
    IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
        .getAdapter(IGraphicalEditPart.class);
    if (sourceEditPart instanceof ConnectionInitializationEditPart) {
      return ((ConnectionInitializationEditPart) sourceEditPart)
          .getMATypesForTarget(relationshipType);
    }
View Full Code Here

   */
  protected EObject selectExistingElement(IAdaptable host, Collection types) {
    if (types.isEmpty()) {
      return null;
    }
    IGraphicalEditPart editPart = (IGraphicalEditPart) host
        .getAdapter(IGraphicalEditPart.class);
    if (editPart == null) {
      return null;
    }
    Diagram diagram = (Diagram) editPart.getRoot().getContents().getModel();
    HashSet<EObject> elements = new HashSet<EObject>();
    for (Iterator<EObject> it = diagram.getElement().eAllContents(); it
        .hasNext();) {
      EObject element = it.next();
      if (isApplicableElement(element, types)) {
View Full Code Here

  /**
   * @generated
   */
  public List getTypesForPopupBar(IAdaptable host) {
    IGraphicalEditPart editPart = (IGraphicalEditPart) host
        .getAdapter(IGraphicalEditPart.class);
    if (editPart instanceof CompilationUnitEditPart) {
      ArrayList<IElementType> types = new ArrayList<IElementType>(1);
      types.add(DispelElementTypes.Package_2001);
      return types;
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.