Examples of IMetaclass


Examples of org.eclipse.e4.xwt.metadata.IMetaclass

                  return field.getInt(null);
                }
              }
            }
            else {
              IMetaclass metaclass = XWT.getMetaclass(className, IConstants.XWT_NAMESPACE);
              if (metaclass != null) {
                Class<?> type = metaclass.getType();
                if (type != null) {
                  String memberName = str.substring(index+1);
                  Field field = type.getField(memberName);
                  if (Modifier.isStatic(field.getModifiers())) {
                    return field.getInt(null);
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

  public static Class<?> getValueType(Class<?> type, String propertyName) {
    if (type == null || propertyName == null || propertyName.indexOf(".") != -1) {
      return null;
    }
    try {
      IMetaclass metaclass = XWT.getMetaclass(type);
      IProperty property = metaclass.findProperty(propertyName);
      if (property != null) {
        return property.getType();
      }
    } catch (Exception e) {
      LoggerManager.log(e);
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

          field.set(target, value);
          return;
        }
      }
     
      IMetaclass metaclass = XWT.getMetaclass(type);
      IProperty property = metaclass.findProperty(propertyName);
      if (property != null) {
        property.setValue(target, value);
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

  public static boolean isPropertyReadOnly(Class<?> type, String propertyName) {
    if (type == null || propertyName == null || propertyName.indexOf(".") != -1) {
      return true;
    }
    try {     
      IMetaclass metaclass = XWT.getMetaclass(type);
      IProperty property = metaclass.findProperty(propertyName);
      if (property != null) {
        return property.isReadOnly();
      }
    } catch (Exception e) {
      LoggerManager.log(e);
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

        }
      }
    } catch (Exception e) {
      throw new XWTException(e);
    }
    IMetaclass mateclass = XWT.getMetaclass(type);
    IProperty property = mateclass.findProperty(propertyName);
    if (property instanceof EventProperty) {
      return true;
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

    int index = str.lastIndexOf(':');
    if (index != -1) {
      typeName = str.substring(index + 1);
      namespace = str.substring(0, index);
    }
    IMetaclass metaclass = XWT.getMetaclass(typeName, namespace);
    if (metaclass != null) {
      return metaclass.getType();
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

        }
      } catch (Exception e) {
        throw new XWTException(e);
      }
    }
    IMetaclass mateclass = XWT.getMetaclass(control);
    IProperty property = mateclass.findProperty(propertyName);
    if (property instanceof EventProperty) {
      return new EventPropertyObservableValue(control,
          (EventProperty) property);
    }
    return null;
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

  public static Shell findShell(Widget context) {
    return XWTLoaderManager.getActive().findShell(context);
  }

  public static IProperty findProperty(Object object, String name) {
    IMetaclass metaclass = XWTLoaderManager.getActive()
        .getMetaclass(object);
    return metaclass.findProperty(name);
  }
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

  public static Map<String, Object> getResources(Object object) {
    return XWTLoaderManager.getActive().getResources(object);
  }

  public static IEvent findEvent(Object object, String name) {
    IMetaclass metaclass = XWTLoaderManager.getActive()
        .getMetaclass(object);
    return metaclass.findEvent(name);
  }
View Full Code Here

Examples of org.eclipse.e4.xwt.metadata.IMetaclass

   * Get the dynamic property value
   *
   * @param javaclass
   */
  static public Object getPropertyValue(Object uiElement, String propertyName) {
    IMetaclass metaclass = XWT.getMetaclass(uiElement);
    IProperty property = metaclass.findProperty(propertyName);
    if (property == null) {
      return null;
    }
    return XWTLoaderManager.getActive().getPropertyValue(uiElement,
        property);
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.