Package org.eclipse.e4.ui.di

Examples of org.eclipse.e4.ui.di.UISynchronize


  public IMetaclass getMetaclass(Class<?> type) {
    MetaclassManager manager = map.get(IConstants.XWT_NAMESPACE);
    if (manager == null) {
      return null;
    }
    IMetaclass metaclass = manager.getMetaclass(type);
    if (metaclass == null) {
      String packageName = "";
      Package packageObject = type.getPackage();
      if (packageObject != null) {
        packageName = packageObject.getName();
View Full Code Here


    MetaclassManager manager = map.get(namespace);
    if (manager == null) {
      manager = new MetaclassManager(this, null, xwtLoader);
      map.put(namespace, manager);
    }
    IMetaclass metaclass = manager.getMetaclass(type);
    if (metaclass == null) {
      metaclass = manager.getMetaclass(type);
      if (metaclass == null) {
        manager.register(type);
        metaclass = manager.getMetaclass(type);
View Full Code Here

    this.bindingPath = bindingPath;
  }
 
  protected IProperty getColumnsProperty() {
    if (columnsProperty == null) {
      IMetaclass metaclass = XWT.getMetaclass(viewer.getClass());
      columnsProperty = metaclass.findProperty(PropertiesConstants.PROPERTY_COLUMNS);
      if (columnsProperty == null) {
        throw new XWTException("Columns property is not found.");
      }
    }
    return columnsProperty;
View Full Code Here

    Object setterTarget = element;
    Object oldValue = null;
    if (targetName != null) {
      setterTarget = TriggerBase.getElementByName(element, targetName);
    }
    IMetaclass metaclass = XWT.getMetaclass(setterTarget);
    IProperty prop = metaclass.findProperty(propName);
    if (prop != null && propValue != null) {
      Object toValue = XWT.convertFrom(prop.getType(), propValue);
      try {
        oldValue = prop.getValue(setterTarget);
        if (update) {
View Full Code Here

    String targetName = getTargetName();
    Object setterTarget = element;
    if (targetName != null) {
      setterTarget = TriggerBase.getElementByName(element, targetName);
    }
    IMetaclass metaclass = XWT.getMetaclass(setterTarget);
    IProperty prop = metaclass.findProperty(propName);
    if (prop != null) {
      try {
        prop.setValue(setterTarget, value);
      } catch (Exception e) {
        throw new RuntimeException(e);
View Full Code Here

    IBaseLabelProvider labelProvider = viewer.getLabelProvider();
    return (labelProvider == null || labelProvider.getClass() == DefaultViewerLabelProvider.class);
  }

  protected Class<?> getElementType() {
    IProperty property = getDelegate();
    Class<?> type = property.getType();
    if (type == null) {
      return Object.class;
    }
    if (type.isArray()) {
      return type.getComponentType();
View Full Code Here

      }

      if (observable == null
          && dataProvider instanceof IObjectDataProvider) {
        IMetaclass mateclass = XWT.getMetaclass(type);
        IProperty property = mateclass.findProperty(propertyName);
        if (property instanceof EventProperty) {
          observable = new EventPropertyObservableValue(object,
              (EventProperty) property);
        }
      }
View Full Code Here

    Object oldValue = null;
    if (targetName != null) {
      setterTarget = TriggerBase.getElementByName(element, targetName);
    }
    IMetaclass metaclass = XWT.getMetaclass(setterTarget);
    IProperty prop = metaclass.findProperty(propName);
    if (prop != null && propValue != null) {
      Object toValue = XWT.convertFrom(prop.getType(), propValue);
      try {
        oldValue = prop.getValue(setterTarget);
        if (update) {
          prop.setValue(setterTarget, toValue);
        }
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

    Object setterTarget = element;
    if (targetName != null) {
      setterTarget = TriggerBase.getElementByName(element, targetName);
    }
    IMetaclass metaclass = XWT.getMetaclass(setterTarget);
    IProperty prop = metaclass.findProperty(propName);
    if (prop != null) {
      try {
        prop.setValue(setterTarget, value);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
View Full Code Here

        case SourceToTarget:
          addValidatorToStrategy(sourceToTarget, validator);
          break;
        case TargetToSource:
          addValidatorToStrategy(targetToSource,
              new InverseValidationRule(validator));
          break;
        case Both:
        default:
          addValidatorToStrategy(sourceToTarget, validator);
          addValidatorToStrategy(targetToSource,
              new InverseValidationRule(validator));
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.e4.ui.di.UISynchronize

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.