Examples of EditPart


Examples of org.eclipse.gef.EditPart

                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_2008) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.RelatorAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
                      : compartmentEditPart
                          .getCommand(request);
                }
              }
              return super.getCommand(request);
            }
View Full Code Here

Examples of org.eclipse.gef.EditPart

                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_2004) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.MixinAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
                      : compartmentEditPart
                          .getCommand(request);
                }
              }
              return super.getCommand(request);
            }
View Full Code Here

Examples of org.eclipse.gef.EditPart

    List adapters = new LinkedList();
    for (Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator
        .hasNext();) {
      final OntoUML.diagram.part.OntoUMLLinkDescriptor nextLinkDescriptor = (OntoUML.diagram.part.OntoUMLLinkDescriptor) linkDescriptorsIterator
          .next();
      EditPart sourceEditPart = getEditPart(nextLinkDescriptor
          .getSource(), domain2NotationMap);
      EditPart targetEditPart = getEditPart(nextLinkDescriptor
          .getDestination(), domain2NotationMap);
      if (sourceEditPart == null || targetEditPart == null) {
        continue;
      }
      CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
          nextLinkDescriptor.getSemanticAdapter(), null,
          ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost())
              .getDiagramPreferencesHint());
      CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
          descriptor);
      ccr.setType(RequestConstants.REQ_CONNECTION_START);
      ccr.setSourceEditPart(sourceEditPart);
      sourceEditPart.getCommand(ccr);
      ccr.setTargetEditPart(targetEditPart);
      ccr.setType(RequestConstants.REQ_CONNECTION_END);
      Command cmd = targetEditPart.getCommand(ccr);
      if (cmd != null && cmd.canExecute()) {
        executeCommand(cmd);
        IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
        if (viewAdapter != null) {
          adapters.add(viewAdapter);
View Full Code Here

Examples of org.eclipse.gef.EditPart

   * Creates command to destroy the link.
   *
   * @generated
   */
  protected Command getDestroyElementCommand(View view) {
    EditPart editPart = (EditPart) getHost().getViewer()
        .getEditPartRegistry().get(view);
    DestroyElementRequest request = new DestroyElementRequest(
        getEditingDomain(), false);
    return editPart.getCommand(new EditCommandRequestWrapper(request,
        Collections.EMPTY_MAP));
  }
View Full Code Here

Examples of org.eclipse.gef.EditPart

                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_2006) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.PhaseAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
                      : compartmentEditPart
                          .getCommand(request);
                }
              }
              return super.getCommand(request);
            }
View Full Code Here

Examples of org.eclipse.gef.EditPart

                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_2013) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.SubKindAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
                      : compartmentEditPart
                          .getCommand(request);
                }
              }
              return super.getCommand(request);
            }
View Full Code Here

Examples of org.eclipse.gef.EditPart

                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_3014) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.GeneralizationSetAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
                      : compartmentEditPart
                          .getCommand(request);
                }
              }
              return super.getCommand(request);
            }
View Full Code Here

Examples of org.eclipse.gef.EditPart

                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_3034) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.QuantityAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
                      : compartmentEditPart
                          .getCommand(request);
                }
              }
              return super.getCommand(request);
            }
View Full Code Here

Examples of org.eclipse.gef.EditPart

     * @generated NOT
     */
    private void updateContents() {
      QuantityEditPart editpart = QuantityEditPart.this;
      Classifier element = (Classifier) editpart.resolveSemanticElement();
      EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
          .getType(OntoUML.diagram.edit.parts.QuantityAttributeCompartmentEditPart.VISUAL_ID));
      if (compartmentEditPart != null) {
        if (element.getAttribute().size() == 0)
          ((View) compartmentEditPart.getModel()).setVisible(false);
        else {
          if (((View) compartmentEditPart.getModel()).isVisible() == false)
            ((View) compartmentEditPart.getModel())
                .setVisible(true);
          else {
            View view = (((View) (compartmentEditPart).getModel()));
            DrawerStyle drawerStyle = (DrawerStyle) view
                .getStyle(NotationPackage.eINSTANCE
View Full Code Here

Examples of org.eclipse.gef.EditPart

     * @generated NOT
     */
    private void updateContents() {
      PhaseEditPart editpart = PhaseEditPart.this;
      Classifier element = (Classifier) editpart.resolveSemanticElement();
      EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
          .getType(OntoUML.diagram.edit.parts.PhaseAttributeCompartmentEditPart.VISUAL_ID));
      if (compartmentEditPart != null) {
        if (element.getAttribute().size() == 0)
          ((View) compartmentEditPart.getModel()).setVisible(false);
        else {
          if (((View) compartmentEditPart.getModel()).isVisible() == false)
            ((View) compartmentEditPart.getModel())
                .setVisible(true);
          else {
            View view = (((View) (compartmentEditPart).getModel()));
            DrawerStyle drawerStyle = (DrawerStyle) view
                .getStyle(NotationPackage.eINSTANCE
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.