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

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


    typeProposalProviders.createSubTypeProposals(superType, this, context, FXGraphPackage.Literals.STATIC_CALL_VALUE_PROPERTY__TYPE, f, acceptor);
  }
 
  @Override
  public void completeStaticCallValueProperty_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    StaticCallValueProperty staticProperty = (StaticCallValueProperty) model;
   
    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();
View Full Code Here


    }
  }
 
  @Override
  public void completeStaticCallValueProperty_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    StaticCallValueProperty staticProperty = null;
    if( model instanceof Element ) {
      staticProperty = (StaticCallValueProperty) model.eContainer();
    } else {
      staticProperty = (StaticCallValueProperty) model; 
    }
   
    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

          createNode(parentNode, mpp);
        }
        return;
      }
    } else if( modelElement instanceof StaticCallValueProperty ) {
      StaticCallValueProperty p = (StaticCallValueProperty) modelElement;
      if( p.getValue() instanceof SimpleValueProperty ) {
        return;
      } else {
        if( p.getValue() != null ) {
          createNode(parentNode, p.getValue())
        }
        return;
      }
    }
   
View Full Code Here

            }
          }
        }
      }
    } 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())) {
                          if( f.getElementName().equals(sp.getStringValue()) ) {
                            return createHover(f, object, viewer, region);
                          }
                        }
                      }
                    } catch (JavaModelException ex) {
View Full Code Here

      sb.append("static " + p.getName() + " : ");
      sb.append(new ValuePropertyFormatter(p.getValue())
          .getFormattedValue());
      formattedValue = sb.toString();
    } else if (value instanceof StaticCallValueProperty) {
      StaticCallValueProperty p = (StaticCallValueProperty) value;
      StringBuffer sb = new StringBuffer();
      if (p.getModifier() != null) {
        sb.append(p.getModifier() + " ");
      }
      sb.append("call " + p.getType().getSimpleName() + " # "
          + p.getName() + " : ");
      sb.append(new ValuePropertyFormatter(p.getValue())
          .getFormattedValue());
      formattedValue = sb.toString();
    } else if (value instanceof ConstValueProperty) {
      ConstValueProperty p = (ConstValueProperty) value;
      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
View Full Code Here

TOP

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

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.