Package org.eclipse.rmf.reqif10

Examples of org.eclipse.rmf.reqif10.DatatypeDefinitionString


    DatatypeDefinitionString t_string = rf.createDatatypeDefinitionString();
    content.getDatatypes().add(t_string);
   
    // Build SpecObject Type for requirements.
    SpecObjectType requirementType = rf.createSpecObjectType();
    AttributeDefinitionString ad_requirement = rf.createAttributeDefinitionString();
    ad_requirement.setType(t_string);
    requirementType.getSpecAttributes().add(ad_requirement);
    content.getSpecTypes().add(requirementType);
   
    // Build SpecObject Type for proxy.
    SpecObjectType proxyType = rf.createSpecObjectType();
    AttributeDefinitionString ad_proxy = rf.createAttributeDefinitionString();
    ad_proxy.setType(t_string);
    proxyType.getSpecAttributes().add(ad_proxy);
    content.getSpecTypes().add(proxyType);
   
    // Build SpecRelationType for linking
    SpecRelationType linkType = rf.createSpecRelationType();
View Full Code Here


   */
  SpecObject findProxyFor(EObject element) {
    TracingConfiguration config = getTracingConfig();
    String uri = EcoreUtil.getURI(element).toString();
    ReqIF reqif = ReqIF10Util.getReqIF(config);
    AttributeDefinitionString ad = config.getProxyAttribute();

    // Iterate SpecObjects and search for existing proxy element
    for (SpecObject specObject : reqif.getCoreContent().getSpecObjects()) {
      AttributeValue value = ReqIF10Util
          .getAttributeValue(specObject, ad);
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setProxyAttribute(AttributeDefinitionString newProxyAttribute) {
    AttributeDefinitionString oldProxyAttribute = proxyAttribute;
    proxyAttribute = newProxyAttribute;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, TracingPackage.TRACING_CONFIGURATION__PROXY_ATTRIBUTE, oldProxyAttribute, proxyAttribute));
  }
View Full Code Here

    ReqIF reqif = ReqIF10Util.getReqIF(config);
    AttributeDefinitionString ad = config.getProxyAttribute();

    // Iterate SpecObjects and search for existing proxy element
    for (SpecObject specObject : reqif.getCoreContent().getSpecObjects()) {
      AttributeValue value = ReqIF10Util
          .getAttributeValue(specObject, ad);
      if (value instanceof AttributeValueString) {
        String tmpUrl = TracingConfigurationItemProvider
            .getProxyUrlFromValue(((AttributeValueString) value)
                .getTheValue());
View Full Code Here

   * @param object
   */
  public static void registerProxyListener(final EditingDomain domain,
      final SpecObject object, AttributeDefinition ad,
      final EList<String> names) {
    AttributeValue av = ReqIF10Util.getAttributeValue(object, ad);
    if (!(av instanceof AttributeValueString))
      return;
    final AttributeValueString value = (AttributeValueString) av;

    final EObject target = getElementFromProxy(getProxyUrlFromValue(value
View Full Code Here

      return;
    }

    for (SpecObject obj : ReqIF10Util.getReqIF(config).getCoreContent().getSpecObjects()) {
      if (obj.getType() == config.getProxyType()) {
        AttributeValue av = ReqIF10Util.getAttributeValue(obj,
            config.getProxyAttribute());
        if (! (av instanceof AttributeValueString)) continue;
       
        EObject element = getElementFromUri(getUrlFromProxy(obj), domain);
        updateProxyIfNecessary((AttributeValueString)av, element, domain);
View Full Code Here

    }
  }

  String getUrlFromProxy(SpecObject proxy) {
    TracingConfiguration config = (TracingConfiguration) getTarget();
    AttributeValue av = ReqIF10Util.getAttributeValue(proxy, config.getProxyAttribute());
    if (av instanceof AttributeValueString) {
      return getProxyUrlFromValue(((AttributeValueString)av).getTheValue());
    }
    return null;
  }
View Full Code Here

    SpecObject proxy = cmd.findProxyFor(external);
    TracingConfigurationItemProvider ip = (TracingConfigurationItemProvider) ProrUtil
        .getItemProvider(adapterFactory, config);

   
    AttributeValueString value = ((AttributeValueString)proxy.getValues().get(0));
    ip.updateProxyIfNecessary(value, external, editingDomain);
    // No Cmd should be triggered from this
    assertEquals(cmd, editingDomain.getCommandStack().getMostRecentCommand());
  }
View Full Code Here

    editingDomain.getCommandStack().execute(cmd);
    SpecObject proxy = cmd.findProxyFor(external);
   
    TracingConfigurationItemProvider ip = (TracingConfigurationItemProvider) ProrUtil
        .getItemProvider(adapterFactory, config);
    AttributeValueString value = ((AttributeValueString)proxy.getValues().get(0));
    value.setTheValue(value.getTheValue() + "x");
    ip.updateProxyIfNecessary(value, external, editingDomain);
   
    // Ensure the values match
    assertEquals(value.getTheValue(), ip.buildProxyContent(external));
  }
View Full Code Here

    SpecObject proxy = cmd.findProxyFor(external);
   
    TracingConfigurationItemProvider ip = (TracingConfigurationItemProvider) ProrUtil
        .getItemProvider(adapterFactory, config);
    ((ReqIFHeader)external).setComment("A comment");
    AttributeValueString value = (AttributeValueString) proxy.getValues().get(0);
    ip.updateProxyIfNecessary(value, external, editingDomain);
   
    // Ensure the values match
    assertEquals(value.getTheValue(), ip.buildProxyContent(external));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.rmf.reqif10.DatatypeDefinitionString

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.