Package at.bestsolution.efxclipse.tooling.fxgraph.fXGraph

Examples of at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.IncludeValueProperty


                Element _element_1 = define.getElement();
                CharSequence _elementContent = this.elementContent(_element_1, importManager, preview, skipController, skipIncludes);
                _builder.append(_elementContent, "    ");
                _builder.newLineIfNotEmpty();
              } else {
                IncludeValueProperty _includeElement = define.getIncludeElement();
                boolean _notEquals_3 = (!Objects.equal(_includeElement, null));
                if (_notEquals_3) {
                  {
                    boolean _not_2 = (!skipIncludes);
                    if (_not_2) {
                      _builder.append("\t");
                      _builder.append("\t");
                      IncludeValueProperty _includeElement_1 = define.getIncludeElement();
                      CharSequence _includeContent = this.includeContent(_includeElement_1, importManager, preview, skipController, skipIncludes);
                      _builder.append(_includeContent, "    ");
                      _builder.newLineIfNotEmpty();
                    }
                  }
View Full Code Here


      StringBuffer sb = new StringBuffer();
      sb.append("const " + p.getType().getSimpleName() + "#"
          + p.getField());
      formattedValue = sb.toString();
    } else if (value instanceof IncludeValueProperty) {
      IncludeValueProperty inc = (IncludeValueProperty) value;
      formattedValue = "include " + "source=" + inc.getSource()
          + " name=" + inc.getName(); // TODO
    } else if (value instanceof ReferenceValueProperty) {
      ReferenceValueProperty ref = (ReferenceValueProperty) value;
      StringBuffer sb = new StringBuffer();
      sb.append("idref ");
      if (ref.getReference() instanceof Element) {
View Full Code Here

        Attributes attributes) throws SAXException {
      structureStack.push(qName);
      if ("fx:define".equals(qName)) {
        // nothing here
      } else if ("fx:include".equals(qName)) {
        IncludeValueProperty p = FXGraphFactory.eINSTANCE
            .createIncludeValueProperty();
        for (int i = 0; i < attributes.getLength(); i++) {
          String propertyQName = attributes.getQName(i);
          String value = attributes.getValue(i);
          if ("fx:id".equals(propertyQName)) {
            p.setName(value);
          } else if ("source".equals(propertyQName)) {
            ComponentDefinition cd = FXGraphFactory.eINSTANCE
                .createComponentDefinition();
            cd.setName(value);
            p.setSource(cd);
          }
        }
      } else if ("fx:script".equals(qName)) {
        for (int i = 0; i < attributes.getLength(); i++) {
          String propertyQName = attributes.getQName(i);
          String value = attributes.getValue(i);
          if ("source".equals(propertyQName)) {
            Script s = createScript(value, null);
            model.getComponentDef().getScripts().add(s);
          }
        }
      } else if ("fx:reference".equals(qName)) {
        for (int i = 0; i < attributes.getLength(); i++) {
          String propertyQName = attributes.getQName(i);
          String value = attributes.getValue(i);
          if ("source".equals(propertyQName)) {
            Element e = createElementWithJVMType("idref " + value); // TODO
                                        // this
                                        // is
                                        // really
                                        // dirty
            elementStack.peek().getDefaultChildren().add(e);
          }
        }
      } else if (!"children".equals(localName)) {
        if (Character.isLowerCase(localName.charAt(0))) {
          if (isSpecial(localName)) {
            boolean alreadyCreated = false;
            for (Property p : elementStack.peek().getProperties()) {
              if (localName.equals(p.getName())) {
                alreadyCreated = true;
                break;
              }
            }
            if (!alreadyCreated) {
              Property p = createProperty(localName,
                  FXGraphFactory.eINSTANCE
                      .createMapValueProperty());
              elementStack.peek().getProperties().add(p);
            }
          } else {
            if (!isContainer(localName)) {
              thePropertyIDontWantToForget = localName;
            }
          }
        } else {
          if (!localName.contains(".")) {
            if (checkConstant(localName, attributes)) {
              ConstValueProperty c = createConstValueProperty(
                  localName, attributes);
              boolean found = false;
              for (Property p : elementStack.peek()
                  .getProperties()) {
                if (p.getName().equals(getStructuralParent())) {
                  found = true;
                  p.setValue(c);
                }
              }
              if (!found) {
                Property p = createProperty(
                    getStructuralParent(), c);
                elementStack.peek().getProperties().add(p);
                if (getStructuralParent().equals(
                    thePropertyIDontWantToForget)) {
                  thePropertyIDontWantToForget = null;
                }
              }
            } else {
              Element e = createElement(localName, attributes);
              // root element
              if (model.getComponentDef().getRootNode() == null) {
                model.getComponentDef().setRootNode(e);
              } else {
                // Factory values
                if (elementStack.peek().getFactory() != null) {
                  // is it a constant or an element
                  if (attributes.getLength() == 1
                      && "fx:value".equals(attributes
                          .getQName(0))) {
                    SimpleValueProperty sp = FXGraphFactory.eINSTANCE
                        .createSimpleValueProperty();
                    sp.setStringValue(attributes
                        .getValue(0));
                    elementStack.peek().getValues().add(sp);
                  } else {
                    elementStack.peek().getValues().add(e);
                  }
                }
                // child elements
                else if ("children"
                    .equals(getStructuralParent())) {
                  elementStack.peek().getDefaultChildren()
                      .add(e);
                } else if (isContainer(getStructuralParent())) {
                  Element parent = elementStack.peek();
                  Property p = null;
                  for (Property existingP : parent
                      .getProperties()) {
                    if (getStructuralParent().equals(
                        existingP.getName())) {
                      p = existingP;
                      break;
                    }
                  }
                  if (p == null) {
                    p = createProperty(
                        getStructuralParent(),
                        FXGraphFactory.eINSTANCE
                            .createListValueProperty());
                  }
                  if (p.getValue() instanceof ListValueProperty) {
                    ListValueProperty list = (ListValueProperty) p
                        .getValue();
                    list.getValue().add(e);
                  } else if ((p.getValue() instanceof ListValueProperty)) {
                    System.err.println("TODO");
                  }
                  parent.getProperties().add(p);
                } else if ("fx:define"
                    .equals(getStructuralParent())) {
View Full Code Here

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetIncludeElement(IncludeValueProperty newIncludeElement, NotificationChain msgs)
  {
    IncludeValueProperty oldIncludeElement = includeElement;
    includeElement = newIncludeElement;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FXGraphPackage.DEFINE__INCLUDE_ELEMENT, oldIncludeElement, newIncludeElement);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.tooling.fxgraph.fXGraph.IncludeValueProperty

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.