Package fd2.diagram.edit.policies

Examples of fd2.diagram.edit.policies.FeatureNodeContainerItemSemanticEditPolicy


   * @generated
   */
  protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
        new MandatoryRelationItemSemanticEditPolicy());
  }
View Full Code Here


   * @generated
   */
  protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
        new OneManyRelationTargetFeatureNodesItemSemanticEditPolicy());
  }
View Full Code Here

   * @generated
   */
  protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
        new OptionalRelationItemSemanticEditPolicy());
  }
View Full Code Here

   * @generated
   */
  protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
        new RequireRelationItemSemanticEditPolicy());
  }
View Full Code Here

      return StructuredSelection.EMPTY;
    }
    Diagram diagram = document.getDiagram();
    IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
    if (file != null) {
      Fd2NavigatorItem item = new Fd2NavigatorItem(diagram, file, false);
      return new StructuredSelection(item);
    }
    return StructuredSelection.EMPTY;
  }
View Full Code Here

    if (featureNodeName_5001Parser == null) {
      EAttribute[] features = new EAttribute[] { Fd2Package.eINSTANCE
          .getNamedObject_Name() };
      EAttribute[] editableFeatures = new EAttribute[] { Fd2Package.eINSTANCE
          .getNamedObject_Name() };
      MessageFormatParser parser = new MessageFormatParser(features,
          editableFeatures);
      featureNodeName_5001Parser = parser;
    }
    return featureNodeName_5001Parser;
  }
View Full Code Here

    if (featureNodeVersion_5003Parser == null) {
      EAttribute[] features = new EAttribute[] { Fd2Package.eINSTANCE
          .getVersionedObject_Version() };
      EAttribute[] editableFeatures = new EAttribute[] { Fd2Package.eINSTANCE
          .getVersionedObject_Version() };
      MessageFormatParser parser = new MessageFormatParser(features,
          editableFeatures);
      featureNodeVersion_5003Parser = parser;
    }
    return featureNodeVersion_5003Parser;
  }
View Full Code Here

      EObject diagramLinkObject = nextDiagramLink.getElement();
      EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
      EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
      for (Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator
          .hasNext();) {
        Fd2LinkDescriptor nextLinkDescriptor = (Fd2LinkDescriptor) linkDescriptorsIterator
            .next();
        if (diagramLinkObject == nextLinkDescriptor.getModelElement()
            && diagramLinkSrc == nextLinkDescriptor.getSource()
            && diagramLinkDst == nextLinkDescriptor
                .getDestination()
            && diagramLinkVisualID == nextLinkDescriptor
                .getVisualID()) {
          linksIterator.remove();
          linkDescriptorsIterator.remove();
          break;
        }
View Full Code Here

  private Collection createConnections(Collection linkDescriptors,
      Map domain2NotationMap) {
    List adapters = new LinkedList();
    for (Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator
        .hasNext();) {
      final Fd2LinkDescriptor nextLinkDescriptor = (Fd2LinkDescriptor) 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(), String
              .valueOf(nextLinkDescriptor.getVisualID()),
          ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost())
              .getDiagramPreferencesHint());
      CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
          descriptor);
      ccr.setType(RequestConstants.REQ_CONNECTION_START);
View Full Code Here

    // Create an adapter factory that yields item providers.
    //
    adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);

    adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new Fd2ItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are executed.
    //
    BasicCommandStack commandStack = new BasicCommandStack();
View Full Code Here

TOP

Related Classes of fd2.diagram.edit.policies.FeatureNodeContainerItemSemanticEditPolicy

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.