Package org.eclipse.e4.xwt.metadata

Examples of org.eclipse.e4.xwt.metadata.IMetaclass.findProperty()


      }
      if (dico != null) {
        UserData.setResources(control, dico);
      }
      if (dataContext != null) {
        IProperty property = widgetMetaclass
            .findProperty(IConstants.XAML_DATA_CONTEXT);
        if (property != null) {
          property.setValue(UserData.getWidget(control), dataContext);
        } else {
          throw new XWTException("DataContext is missing in "
View Full Code Here


      }
      if (dico != null) {
        UserData.setResources(control, dico);
      }
      if (bindingContext != null) {
        IProperty property = widgetMetaclass
            .findProperty(IConstants.XAML_BINDING_CONTEXT);
        if (property != null) {
          property.setValue(UserData.getWidget(control),
              bindingContext);
        } else {
View Full Code Here

    if (attrName.indexOf('.') != -1) {
      String[] segments = attrName.split("\\.");
      IMetaclass currentMetaclass = metaclass;
      Object target = targetObject;
      for (int i = 0; i < segments.length - 1; i++) {
        IProperty property = currentMetaclass.findProperty(segments[i]);
        if (property != null) {
          target = property.getValue(target);
          if (target == null) {
            LoggerManager.log(new XWTException("Property \""
                + segments[i] + "\" is null."));
View Full Code Here

      } else {
        //
        IMetaclass metaclassAttached = loader.getMetaclass(namePrefix,
            attribute.getNamespace());
        if (metaclassAttached != null) {
          property = metaclassAttached.findProperty(propertyName);
          isAttached = true;
        } else {
          LoggerManager.log(attribute.getNamespace() + " -> "
              + namePrefix + " is not found.");
          return;
View Full Code Here

    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

          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

    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

      }
    } 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

      } 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

  }

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

  public static Object findResource(Object object, String name) {
    return XWTLoaderManager.getActive().findResource(object, name);
  }
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.