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

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


            includeType = true;
          }
            IJavaProject javaProject = projectProvider.getJavaProject(element.eResource().getResourceSet());
            try {
              IType defType = javaProject.findType(element.getType().getQualifiedName());
              ReferenceValueProperty rp = (ReferenceValueProperty) model;
             
              IType targetType = null;
              if( rp.eContainer() instanceof Property ) {
                Property p = (Property) rp.eContainer();
                if( p.eContainer() instanceof Element ) {
                  Element e = (Element) p.eContainer();
                  IType ownerType = javaProject.findType(e.getType().getQualifiedName());
                  IFXClass ownerClass = FXPlugin.getClassmodel().findClass(javaProject, ownerType);
                  IFXProperty ownerProp = ownerClass.getProperty(p.getName());
                  if( ownerProp instanceof IFXObjectProperty ) {
                    targetType = ((IFXObjectProperty) ownerProp).getElementType();
                  }
                }
              } else if( rp.eContainer() instanceof StaticCallValueProperty ) {
                LOGGER.warn("Unable to extract type for " + rp.eContainer());
              } else if( rp.eContainer() instanceof ListValueProperty ) {
                ListValueProperty lvp = (ListValueProperty) rp.eContainer();
                if( lvp.eContainer() instanceof Property ) {
                  Property p = (Property) lvp.eContainer();
                  if( p.eContainer() instanceof Element ) {
                    Element e = (Element) p.eContainer();
                    IType ownerType = javaProject.findType(e.getType().getQualifiedName());
                    IFXClass ownerClass = FXPlugin.getClassmodel().findClass(javaProject, ownerType);
                    IFXProperty ownerProp = ownerClass.getProperty(p.getName());
                    if( ownerProp instanceof IFXCollectionProperty ) {
                      targetType = ((IFXCollectionProperty) ownerProp).getElementType();
                    }
                  }
                } else {
                  LOGGER.warn("Unable to extract type for " + rp.eContainer());
                }
              }
             
              if( targetType != null ) {
                if( Util.assignable(defType, targetType) ) {
View Full Code Here


      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

  public boolean elementAttributeFilter(final ValueProperty value) {
    if ((value instanceof SimpleValueProperty)) {
      return true;
    } else {
      if ((value instanceof ReferenceValueProperty)) {
        final ReferenceValueProperty r = ((ReferenceValueProperty) value);
        boolean _and = false;
        EList<StaticCallValueProperty> _staticCallProperties = r.getStaticCallProperties();
        boolean _isEmpty = _staticCallProperties.isEmpty();
        if (!_isEmpty) {
          _and = false;
        } else {
          EList<StaticValueProperty> _staticProperties = r.getStaticProperties();
          boolean _isEmpty_1 = _staticProperties.isEmpty();
          _and = (_isEmpty && _isEmpty_1);
        }
        return _and;
      } else {
View Full Code Here

     * @param refName
     * @return
     */
    private ReferenceValueProperty createReferenceValueProperty(
        String refName) {
      ReferenceValueProperty r = FXGraphFactory.eINSTANCE
          .createReferenceValueProperty();
      Element refElement = createElementWithJVMType(refName);
      r.setReference(refElement);
      return r;
    }
View Full Code Here

    } 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) {
        sb.append(((Element) ref.getReference()).getType()
            .getSimpleName());
      }
      if (!ref.getStaticCallProperties().isEmpty()
          || !ref.getStaticProperties().isEmpty()) {
        sb.append("{");
        boolean comma = false;
        for (StaticCallValueProperty p : ref.getStaticCallProperties()) {
          if (comma) {
            sb.append(",");
          }
          sb.append(new ValuePropertyFormatter(p).getFormattedValue());
          comma = true;
        }
        for (StaticValueProperty p : ref.getStaticProperties()) {
          if (comma) {
            sb.append(",");
          }
          sb.append(new ValuePropertyFormatter(p).getFormattedValue());
          comma = true;
View Full Code Here

TOP

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

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.