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

Examples of org.eclipse.e4.core.services.contributions.IContributionFactory.create()


      ThemeManager themeManager) {
    if( factoryUrl == null ) {
      factoryUrl = defaultFactoryUrl;
    }
    IContributionFactory contribFactory = context.get(IContributionFactory.class);
    this.factory = (RendererFactory) contribFactory.create(factoryUrl, context);
    this.modelService = modelService;
   
    ifcontext.get(EBindingService.class.getName()) != null ) {
      KeyBindingDispatcher dispatcher = ContextInjectionFactory.make(KeyBindingDispatcher.class, context);
      context.set(KeyBindingDispatcher.class, dispatcher);
View Full Code Here


    // Install the life-cycle manager for this session if there's one
    // defined
    String lifeCycleURI = getArgValue(E4Workbench.LIFE_CYCLE_URI_ARG, applicationContext, false);
    if (lifeCycleURI != null) {
      lcManager = factory.create(lifeCycleURI, appContext);
      if (lcManager != null) {
        // Let the manager manipulate the appContext if desired
        Boolean rv = (Boolean) ContextInjectionFactory.invoke(lcManager, PostContextCreate.class, appContext, Boolean.TRUE);
        if( rv != null && ! rv.booleanValue() ) {
          return null;
View Full Code Here

    // Create the addons
    IEclipseContext addonStaticContext = EclipseContextFactory.create();
    for (MAddon addon : appModel.getAddons()) {
      addonStaticContext.set(MAddon.class, addon);
      Object obj = factory.create(addon.getContributionURI(), appContext, addonStaticContext);
      addon.setObject(obj);
    }

    // Parse out parameters from both the command line and/or the product
    // definition (if any) and put them in the context
View Full Code Here

      resourceHandler = "bundleclass://org.eclipse.e4.ui.workbench/" + ResourceHandler.class.getName();
    }

    IContributionFactory factory = eclipseContext.get(IContributionFactory.class);

    handler = (IModelResourceHandler) factory.create(resourceHandler, eclipseContext);

    Resource resource = handler.loadMostRecentModel();
    theApp = (MApplication) resource.getContents().get(0);

    return theApp;
View Full Code Here

        logger.error("No contribution uri defined");
        return null;
      }
     
      IContributionFactory cf = (IContributionFactory) context.get(IContributionFactory.class.getName());
      rv = cf.create(contribution.getContributionURI(), context);
      contribution.setObject(rv);
    }
    return rv;
  }
 
View Full Code Here

      cl = cl.getSuperclass();
    } while( ! cl.getName().equals("java.lang.Object") );
   
    IContributionFactory contributionFactory = (IContributionFactory) element.getContext().get(IContributionFactory.class
        .getName());
    Object newPart = contributionFactory.create(element.getContributionURI(), element.getContext());
    element.setObject(newPart);
   
  }

  @Override
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
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.