Examples of IGraphicalEditPart


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

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

        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

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

  /**
   * @generated
   */
  public List getTypesForPopupBar(IAdaptable host) {
    IGraphicalEditPart editPart = (IGraphicalEditPart) host
        .getAdapter(IGraphicalEditPart.class);
    if (editPart instanceof OntoUML.diagram.edit.parts.CategoryEditPart) {
      List types = new ArrayList();
      types
          .add(OntoUML.diagram.providers.OntoUMLElementTypes.Property_3028);
View Full Code Here

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

  /**
   * @generated
   */
  public List getRelTypesOnSource(IAdaptable source) {
    IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
        .getAdapter(IGraphicalEditPart.class);
    if (sourceEditPart instanceof OntoUML.diagram.edit.parts.DerivationRuleEditPart) {
      List types = new ArrayList();
      types
          .add(OntoUML.diagram.providers.OntoUMLElementTypes.BinaryAssociationAtom_4015);
View Full Code Here

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

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

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

  /**
   * @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 OntoUML.diagram.edit.parts.DerivationRuleEditPart) {
      List types = new ArrayList();
      return types;
    }
View Full Code Here

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

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

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

  /**
   * @generated
   */
  public List getTypesForTarget(IAdaptable source,
      IElementType relationshipType) {
    IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source
        .getAdapter(IGraphicalEditPart.class);
    if (sourceEditPart instanceof OntoUML.diagram.edit.parts.DerivationRuleEditPart) {
      List types = new ArrayList();
      return types;
    }
View Full Code Here

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

   */
  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();
    Collection elements = new HashSet();
    for (Iterator it = diagram.getElement().eAllContents(); it.hasNext();) {
      EObject element = (EObject) it.next();
      if (isApplicableElement(element, types)) {
        elements.add(element);
View Full Code Here

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

    List<GeneratedElement> elementsToCheck = new ArrayList<GeneratedElement>();
   
    // iterate over the selected elements, and
    for (Object o : selected) {
      if (o instanceof IGraphicalEditPart) {
        IGraphicalEditPart part = (IGraphicalEditPart) o;
       
        // it must be a GeneratedElement...
        if (part.resolveSemanticElement() instanceof GeneratedElement) {
          GeneratedElement g = (GeneratedElement) part.resolveSemanticElement();
         
          elementsToCheck.add(g);
        }
       
        if (part.getEditingDomain() != null) {
          editingDomain = part.getEditingDomain();
        }
      }
    }
   
    checkElements(elementsToCheck);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.