Examples of AttributeValueString


Examples of org.eclipse.rmf.reqif10.AttributeValueString

    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

Examples of org.eclipse.rmf.reqif10.AttributeValueString

    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

Examples of org.eclipse.rmf.reqif10.AttributeValueString

    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

Examples of org.eclipse.rmf.reqif10.AttributeValueString

  private SpecObject createProxy(CompoundCommand cmd, EObject element) {
    SpecObject proxy;
    proxy = ReqIF10Factory.eINSTANCE.createSpecObject();
    TracingConfiguration config = getTracingConfig();
    AttributeValueString value = ReqIF10Factory.eINSTANCE.createAttributeValueString();
    value.setDefinition(config.getProxyAttribute());
    value.setTheValue(itemProvider.buildProxyContent(element));
    proxy.getValues().add(value);
    cmd.append(ProrUtil.createAddTypedElementCommand(
        ReqIF10Util.getReqIF(config).getCoreContent(),
        ReqIF10Package.Literals.REQ_IF_CONTENT__SPEC_OBJECTS,
        proxy, ReqIF10Package.Literals.SPEC_OBJECT__TYPE,
View Full Code Here

Examples of org.eclipse.rmf.reqif10.AttributeValueString


  public static String getCellString(Object value, boolean html) {
    if (!(value instanceof AttributeValueString))
      return "ERROR: Not a String Attribute: " + value;
    AttributeValueString av = (AttributeValueString) value;
    StringTokenizer st = new StringTokenizer(av.getTheValue(), "\n\r");
    if (!st.hasMoreTokens()) return "ERROR: No Content: " + value;
    st.nextToken();
    StringBuilder result = new StringBuilder();
    while (st.hasMoreTokens()) {
      result.append(st.nextToken());
View Full Code Here

Examples of org.eclipse.rmf.reqif10.AttributeValueString

      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
        .getTheValue()));
    System.out.println("Registering with: " + target.eResource());
    target.eResource().eAdapters().add(new AdapterImpl() {
      @Override
      public void notifyChanged(Notification notification) {
        System.out.println("Changed.");
        String newContent = TracingUtil.createProxyContent(
            (EObject) target, names);
        if (!newContent.equals(value.getTheValue())) {
          Command cmd = SetCommand
              .create(domain,
                  object,
                  ReqIF10Package.Literals.SPEC_ELEMENT_WITH_ATTRIBUTES__VALUES,
                  newContent);
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.