Examples of IFXClass


Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

            if( property.eContainer() instanceof Element ) {
              try {
                Element element = (Element) property.eContainer();
                IJavaProject javaProject = projectProvider.getJavaProject(element.eResource().getResourceSet());
                IType ownerType = javaProject.findType(element.getType().getQualifiedName());
                IFXClass fxOwnerClazz = FXPlugin.getClassmodel().findClass(javaProject, ownerType);
                IFXProperty ownerProperty = fxOwnerClazz.getProperty(property.getName());
               
                if( ownerProperty instanceof IFXEventHandlerProperty ) {
                  IFXEventHandlerProperty p = (IFXEventHandlerProperty) ownerProperty;
                  IType ctrlType = javaProject.findType(m.getComponentDef().getController().getQualifiedName());
                  IFXCtrlClass ctrlClass = FXPlugin.getClassmodel().findCtrlClass(javaProject, ctrlType);
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

              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 {
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

    try {
      IJavaProject javaProject = projectProvider.getJavaProject(staticProperty.eResource().getResourceSet());
      IType type = javaProject.findType(staticProperty.getType().getQualifiedName());
     
      if (type != null) {
        IFXClass fxClazz = FXPlugin.getClassmodel().findClass(javaProject, type);
        if (fxClazz != null) {
          Map<String, IFXProperty> map = fxClazz.getAllStaticProperties();
          for (IFXProperty p : map.values()) {
            completeElement_PropertiesProposals(p, model, context, FXGraphPackage.Literals.STATIC_CALL_VALUE_PROPERTY__NAME, acceptor, null, null);
          }
        }
      }
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

    try {
      IJavaProject javaProject = projectProvider.getJavaProject(staticProperty.eResource().getResourceSet());
      IType type = javaProject.findType(staticProperty.getType().getQualifiedName());
     
      if (type != null) {
        IFXClass fxClazz = FXPlugin.getClassmodel().findClass(javaProject, type);
        if (fxClazz != null) {
          IFXProperty fxProp = fxClazz.getStaticProperty(staticProperty.getName());
          if (fxProp != null) {
            completeProperty_ValueProposals(fxProp, model, context, FXGraphPackage.Literals.STATIC_CALL_VALUE_PROPERTY__VALUE, acceptor);
          }
        }
      }
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

    try {
      IJavaProject javaProject = projectProvider.getJavaProject(model.eResource().getResourceSet());
      IType type = javaProject.findType(target.getType().getQualifiedName());
     
      if (type != null) {
        IFXClass fxClazz = FXPlugin.getClassmodel().findClass(javaProject, type);
        if (fxClazz != null) {
          Map<String, IFXProperty> map = fxClazz.getAllStaticProperties();
          for (IFXProperty p : map.values()) {
            completeElement_PropertiesProposals(p, model, context, FXGraphPackage.Literals.STATIC_VALUE_PROPERTY__NAME, acceptor, propertyTarget, FXGraphPackage.Literals.ELEMENT__STATIC_PROPERTIES);
          }
        }
      }
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

    try {
      IJavaProject javaProject = projectProvider.getJavaProject(staticProperty.eResource().getResourceSet());
      IType type = javaProject.findType(target.getType().getQualifiedName());
     
      if (type != null) {
        IFXClass fxClazz = FXPlugin.getClassmodel().findClass(javaProject, type);
        if (fxClazz != null) {
          IFXProperty fxProp = fxClazz.getStaticProperty(staticProperty.getName());
          if (fxProp != null) {
            completeProperty_ValueProposals(fxProp, model, context, FXGraphPackage.Literals.STATIC_VALUE_PROPERTY__VALUE, acceptor);
          }
        }
      }
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

      if( parent == null || parent.getNodeName() == null ||  parent.getOwnerDocument() == null) {
        return null;
      }
      IType ownerType = Util.findType(parent.getNodeName(), parent.getOwnerDocument());
      if( ownerType != null ) {
        IFXClass fxClass = FXPlugin.getClassmodel().findClass(ownerType.getJavaProject(), ownerType);
        if( fxClass != null ) {
          IFXProperty p = fxClass.getProperty(xmlnode.getNodeName());
          if( p != null ) {
            return p.getJavaElement();
          }
        }
      }
    } else {
      if( xmlnode.getNodeName().contains(".") ) {
        String[] parts = xmlnode.getNodeName().split("\\.");
        IType ownerType = Util.findType(parts[0], xmlnode.getOwnerDocument());
        if( ownerType != null ) {
          IFXClass fxClass = FXPlugin.getClassmodel().findClass(ownerType.getJavaProject(), ownerType);
          if( fxClass != null ) {
            IFXProperty p = fxClass.getStaticProperty(parts[1]);
            if( p != null ) {
              return p.getJavaElement();
            }
          }
        }
      } else {
        IType ownerType = Util.findType(xmlnode.getNodeName(), xmlnode.getOwnerDocument());
        if( ownerType != null ) {
          IFXClass fxClass = FXPlugin.getClassmodel().findClass(ownerType.getJavaProject(), ownerType);
          if( fxClass != null ) {
            try {
              return Util.findProject(xmlnode.getOwnerDocument()).findType(fxClass.getFQN());
            } catch (JavaModelException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
            }
          }
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

     
      if( attribute.getNodeName().contains(".") ) {
        String[] parts = attribute.getNodeName().split("\\.");
        IType ownerType = Util.findType(parts[0], parent.getOwnerDocument());
        if( ownerType != null ) {
          IFXClass fxClass = FXPlugin.getClassmodel().findClass(ownerType.getJavaProject(), ownerType);
          if( fxClass != null ) {
            IFXProperty p = fxClass.getStaticProperty(parts[1]);
            if( p != null ) {
              return p.getJavaElement();
            }
          }
        }
      } else {
        IType ownerType = Util.findType(parent.getNodeName(), parent.getOwnerDocument());
        if( ownerType != null ) {
          IFXClass fxClass = FXPlugin.getClassmodel().findClass(ownerType.getJavaProject(), ownerType);
          if( fxClass != null ) {
            IFXProperty p = fxClass.getProperty(attribute.getNodeName());
            if( p != null ) {
              return p.getJavaElement();
            }
          }
        }
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

     
      if( attribute.getNodeName().contains(".") ) {
        String[] parts = attribute.getNodeName().split("\\.");
        IType ownerType = Util.findType(parts[0], parent.getOwnerDocument());
        if( ownerType != null ) {
          IFXClass fxClass = FXPlugin.getClassmodel().findClass(ownerType.getJavaProject(), ownerType);
          if( fxClass != null ) {
            p = fxClass.getStaticProperty(parts[1]);
           
          }
        }
      } else {
        IType ownerType = Util.findType(parent.getNodeName(), parent.getOwnerDocument());
        if( ownerType != null ) {
          IFXClass fxClass = FXPlugin.getClassmodel().findClass(ownerType.getJavaProject(), ownerType);
          if( fxClass != null ) {
            p = fxClass.getProperty(attribute.getNodeName());
           
          }
        }
      }
     
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.model.IFXClass

      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 != null ) {
                return createHover(fxp.getJavaElement(), object, viewer, region);
              }
            }
          }
        }
      }
    } else if( object instanceof StaticCallValueProperty ) {
      StaticCallValueProperty sp = (StaticCallValueProperty) object;
      if( sp.getType() != null ) {
        IType t = getJDTType(sp.getType().getType());
        if( t != null ) {
          IFXClass fxClass = FXPlugin.getClassmodel().findClass(t.getJavaProject(), t);
          if( fxClass != null ) {
            IFXProperty fxp = fxClass.getStaticProperty(sp.getName());
            if( fxp != null ) {
              return createHover(fxp.getJavaElement(), object, viewer, region);
            }
          }
        }
      }
    } else if( object instanceof StaticValueProperty ) {
      StaticValueProperty sp = (StaticValueProperty) object;
     
      EObject eo = sp.eContainer();
      Element target = null;
     
      while( eo.eContainer() != null ) {
        if( eo.eContainer() instanceof Element ) {
          target = (Element) eo.eContainer();
          break;
        }
        eo = eo.eContainer();
      }
         
      if( target != null ) {
        if( target.getType() != null ) {
          IType t = getJDTType(target.getType().getType());
          if( t != null ) {
            IFXClass fxClass = FXPlugin.getClassmodel().findClass(t.getJavaProject(), t);
            if( fxClass != null ) {
              IFXProperty fxp = fxClass.getStaticProperty(sp.getName());
              if( fxp != null ) {
                return createHover(fxp.getJavaElement(), object, viewer, region);
              }
            }
          }
        }
      }
    } else if( object instanceof ValueProperty ) {
      if( object instanceof ControllerHandledValueProperty ) {
        ControllerHandledValueProperty cp = (ControllerHandledValueProperty) object;
       
        Model m = (Model) object.eResource().getContents().get(0);
       
        if( m != null ) {
          ComponentDefinition def = m.getComponentDef();
          if( def != null ) {
            if( def.getController() != null && def.getController().getType() != null) {
              IType t = getJDTType(def.getController().getType());
              if( t != null ) {
                IFXCtrlClass fxClass = FXPlugin.getClassmodel().findCtrlClass(t.getJavaProject(), t);
                if( fxClass != null ) {
                  IFXCtrlEventMethod fxp = fxClass.getAllEventMethods().get(cp.getMethodname());
                  if( fxp != null ) {
                    return createHover(fxp.getJavaElement(), object, viewer, region);
                  }
                }
              }
            }
          }
        }
      } 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())) {
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.