Package org.eclipse.e4.core.services.contributions

Examples of org.eclipse.e4.core.services.contributions.IContributionFactory


    try {
      URL url = AboutPageTab.class.getResource(name);
      Map<String, Object> options = new HashMap<String, Object>();
      options.put(IXWTLoader.CLASS_PROPERTY, this);
      options.put(IXWTLoader.CONTAINER_PROPERTY, this);
      XWT.setLoadingContext(new DefaultLoadingContext(this.getClass().getClassLoader()));
      XWT.loadWithOptions(url, options);
    } catch (Throwable e) {
      throw new Error("Unable to load " + name, e);
    }
  }
View Full Code Here


    try {
      URL url = HelpPageTab.class.getResource(name);
      Map<String, Object> options = new HashMap<String, Object>();
      options.put(IXWTLoader.CLASS_PROPERTY, this);
      options.put(IXWTLoader.CONTAINER_PROPERTY, this);
      XWT.setLoadingContext(new DefaultLoadingContext(this.getClass().getClassLoader()));
      XWT.loadWithOptions(url, options);
    } catch (Throwable e) {
      throw new Error("Unable to load " + name, e);
    }
  }
View Full Code Here

  public IDataProvider findDataProvider(Object dataContext) {
    if (dataContext instanceof IDataProvider) {
      return (IDataProvider) dataContext;
    }
    for (IDataProviderFactory factory : dataProviderFactories.values()) {
      IDataProvider dataProvider = factory.create(dataContext);
      if (dataProvider != null) {
        return dataProvider;
      }
    }
    ObjectDataProvider dataProvider = new ObjectDataProvider();
    dataProvider.setObjectInstance(dataContext);
    return dataProvider;
  }
View Full Code Here

    // direct binding
    if (dataContext instanceof IBinding) {
      dataContext = ((IBinding) dataContext).getValue(null);
    }

    IDataProvider dataProvider = getDataProvider(dataContext);

    try {
      if (isSourceControl()) {
        ControlDataBinding controlDataBinding = new ControlDataBinding(
            dataContext, this, dataProvider);
View Full Code Here

    }
    return value;
  }

  public boolean isSourcePropertyReadOnly() {
    IDataProvider dataProvider = getDataProvider();
    try {
      return ScopeManager.isPropertyReadOnly(dataProvider,
          getPathPropertySegments());
    } catch (XWTException e) {
    }
View Full Code Here

    return valueProperty;
  }

  protected static IValueProperty doCreateValueProperty(Object type,
      String fullPath) {
    IDataProvider dataProvider = XWT.findDataProvider(type);
    return dataProvider.createValueProperty(type, fullPath);
  }
View Full Code Here

        targetToSource = new UpdateValueStrategy(
            UpdateValueStrategy.POLICY_UPDATE);
      }

      // Add converter to UpdateValueStrategy.
      IDataProvider sourceDataProvider = XWT.findDataProvider(source);
      Object sourceValueType = sourceDataProvider.getDataType(null);
      if (sourceValueType == null) {
        sourceValueType = Object.class;
      }
      IDataProvider targetDataProvider = XWT.findDataProvider(target);
      Object targetValueType = targetDataProvider.getDataType(null);
      if (targetValueType == null) {
        targetValueType = Object.class;
      }
      Class<?> sourceType = (sourceValueType instanceof Class<?>) ? (Class<?>) sourceValueType
          : sourceValueType.getClass();
View Full Code Here

          getConverter());
    }

    IObservableValue observableWidget = getObservableWidget();

    IDataProvider dataProvider = getDataProvider();
    if (dataProvider != null) {
      BindingGate bindingGate = getBindingGate();
      if (bindingGate != null) {
        Object target = getControl();
        if (target instanceof Text
View Full Code Here

  public void removeDataProviderFactory(IDataProviderFactory dataProviderFactory) {
    if (dataProviderFactory == null) {
      return;
    }
    for (String name : dataProviderFactories.keySet()) {
      IDataProviderFactory value = dataProviderFactories.get(name);
      if (dataProviderFactory == value) {
        dataProviderFactories.remove(name);
      }
    }
  }
View Full Code Here

  }

  protected IMetaclass createMetaclass(Class<?> javaClass,
      IMetaclass superMetaclass) {
    if (service != null) {
      IMetaclassFactory factory = service.findFactory(javaClass);
      if (factory != null) {
        return factory.create(javaClass, superMetaclass, xwtLoader);
      }
    }
    boolean lazyLoading = false; // TODO Get value from preference
    return new Metaclass(javaClass, superMetaclass, lazyLoading, xwtLoader);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.e4.core.services.contributions.IContributionFactory

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.