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

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


  }
 
  public Object _text(Property property) {
    if( property.getValue() instanceof SimpleValueProperty ) {
      StyledString s = new StyledString(property.getName());
      SimpleValueProperty p = (SimpleValueProperty) property.getValue();
      s.append(" : " + getSimplePropertValue(p), StyledString.QUALIFIER_STYLER);
      return s;
    } else if( property.getValue() instanceof ControllerHandledValueProperty ) {
      StyledString s = new StyledString(property.getName());
      ControllerHandledValueProperty p = (ControllerHandledValueProperty) property.getValue();
      s.append( " : " + p.getMethodname(),StyledString.QUALIFIER_STYLER);
      return s;
    } else if( property.getValue() instanceof ReferenceValueProperty ) {
      StyledString s = new StyledString(property.getName());
      ReferenceValueProperty p = (ReferenceValueProperty) property.getValue();
     
      if( p.getReference() != null ) {
        s.append(" : " + (p.getReference() instanceof Element ? ((Element)p.getReference()).getName() : ((IncludeValueProperty)p.getReference()).getName()),StyledString.QUALIFIER_STYLER)
      }
     
      return s;
    } else if( property.getValue() instanceof ResourceValueProperty ) {
      StyledString s = new StyledString(property.getName());
View Full Code Here


              }
            }
          }
        }
      } else if( object instanceof SimpleValueProperty ) {
        SimpleValueProperty sp = (SimpleValueProperty) object;
        if( sp.eContainer() instanceof Property && sp.getStringValue() != null ) {
          Property p = (Property) sp.eContainer();
         
          if( p.eContainer() instanceof Element ) {
            Element e = (Element) p.eContainer();
            if( e.getType() != null ) {
              IType t = getJDTType(e.getType().getType());
              if( t != null ) {
                IFXClass fxClass = FXPlugin.getClassmodel().findClass(t.getJavaProject(), t);
                if( fxClass != null ) {
                  IFXProperty fxp = fxClass.getProperty(p.getName());
                  if( fxp instanceof IFXEnumProperty ) {
                    IType enumType = ((IFXEnumProperty) fxp).getEnumType();
                    try {
                      for (IField f : enumType.getFields()) {
                        if (Flags.isEnum(f.getFlags())) {
                          if( f.getElementName().equals(sp.getStringValue()) ) {
                            return createHover(f, object, viewer, region);
                          }
                        }
                      }
                    } catch (JavaModelException ex) {
View Full Code Here

      String _name_1 = element.getName();
      String _plus = (" fx:id=\"" + _name_1);
      String _plus_1 = (_plus + "\"");
      builder.append(_plus_1);
    }
    SimpleValueProperty _value = element.getValue();
    boolean _notEquals_1 = (!Objects.equal(_value, null));
    if (_notEquals_1) {
      SimpleValueProperty _value_1 = element.getValue();
      Object _simpleAttributeValue = this.simpleAttributeValue(_value_1);
      String _plus_2 = (" fx:value=\"" + ((Comparable<Object>)_simpleAttributeValue));
      String _plus_3 = (_plus_2 + "\"");
      builder.append(_plus_3);
    } else {
View Full Code Here

                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);
                  }
View Full Code Here

            boolean attached = false;
            for (Property p : elementStack.peek().getProperties()) {
              if (getStructuralParent().equals(p.getName())) {
                MapValueProperty prop = (MapValueProperty) p
                    .getValue();
                SimpleValueProperty e = FXGraphFactory.eINSTANCE
                    .createSimpleValueProperty();
                e.setStringValue(value);
                Property mapval = createProperty(localName, e);
                prop.getProperties().add(mapval);
                attached = true;
                break;
              }
View Full Code Here

              doPop = true;
            }
          } else {
            if (richtTextContent != null
                && richtTextContent.toString().trim().length() > 0) {
              SimpleValueProperty sp = FXGraphFactory.eINSTANCE
                  .createSimpleValueProperty();
              sp.setStringValue(richtTextContent.toString());
              elementStack.peek().getProperties()
                  .add(createProperty(localName, sp));
              if (localName.equals(thePropertyIDontWantToForget)) {
                thePropertyIDontWantToForget = null;
              }
View Full Code Here

        sv.setValue(value.replaceFirst("%", ""));
        l.setValue(sv);
        return l;
      } else {
        // static call
        SimpleValueProperty vp = createStaticCallProperty(p, qName,
            value);
        return vp;
      }
    }
View Full Code Here

        String qName, String value) {
      if (qName.contains(".")) {
        p.setName("call " + qName.replace(".", "#"));
      }
      // ordinary property
      SimpleValueProperty vp = FXGraphFactory.eINSTANCE
          .createSimpleValueProperty();
      if ("true".equals(value) || "false".equals(value)) {
        vp.setBooleanValue(value);
      } else {
        try {
          Integer i = Integer.parseInt(value);
          vp.setIntValue(i);
          vp.setNegative(i < 0);
        } catch (NumberFormatException e) {
          try {
            Double i = Double.parseDouble(value);
            vp.setRealValue(i);
            vp.setNegative(i < 0);
          } catch (NumberFormatException ex) {
            vp.setStringValue(value);
          }
        }
      }
      return vp;
    }
View Full Code Here

        }
        sb.append("}");
      }
      formattedValue = sb.toString();
    } else if (value instanceof SimpleValueProperty) {
      SimpleValueProperty v = (SimpleValueProperty) value;
      if (v.getBooleanValue() != null) {
        formattedValue = v.getBooleanValue();
      } else if (v.getStringValue() != null) {
        formattedValue = "\"" + v.getStringValue() + "\"";
      } else if (v.getRealValue() != 0.0) {
        formattedValue = "" + v.getRealValue();
      } else {
        formattedValue = "" + v.getIntValue();
      }
    } else if (value instanceof ListValueProperty) {
      final StringBuffer sb = new StringBuffer();
      for (int i = 0; i < ((ListValueProperty) value).getValue().size(); i++) {
        ListValueElement o = ((ListValueProperty) value).getValue()
View Full Code Here

        _builder.newLineIfNotEmpty();
        JvmTypeReference _type_1 = element.getType();
        String _simpleName_1 = _type_1.getSimpleName();
        _builder.append(_simpleName_1, "");
        {
          SimpleValueProperty _value = element.getValue();
          boolean _notEquals_1 = (!Objects.equal(_value, null));
          if (_notEquals_1) {
            _builder.append(" ( ");
            SimpleValueProperty _value_1 = element.getValue();
            String _stringValue = _value_1.getStringValue();
            _builder.append(_stringValue, "");
            _builder.append(" )");
          }
        }
        {
View Full Code Here

TOP

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

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.