当前位置: 首页>>代码示例>>Java>>正文


Java ContextInjectionFactory类代码示例

本文整理汇总了Java中org.eclipse.e4.core.contexts.ContextInjectionFactory的典型用法代码示例。如果您正苦于以下问题:Java ContextInjectionFactory类的具体用法?Java ContextInjectionFactory怎么用?Java ContextInjectionFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ContextInjectionFactory类属于org.eclipse.e4.core.contexts包,在下文中一共展示了ContextInjectionFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runContainerResolverJob

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
public static void runContainerResolverJob(IJavaProject javaProject) {
  IEclipseContext context = EclipseContextFactory.getServiceContext(
      FrameworkUtil.getBundle(BuildPath.class).getBundleContext());
  final IEclipseContext childContext =
      context.createChild(LibraryClasspathContainerResolverJob.class.getName());
  childContext.set(IJavaProject.class, javaProject);
  Job job =
      ContextInjectionFactory.make(LibraryClasspathContainerResolverJob.class, childContext);
  job.addJobChangeListener(new JobChangeAdapter() {
    @Override
    public void done(IJobChangeEvent event) {
      childContext.dispose();
    }
  });
  job.schedule();
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:17,代码来源:BuildPath.java

示例2: postConstruct

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@PostConstruct
public void postConstruct(IEclipseContext context, Composite parent) {
	viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);

	// create the columns
	// not yet implemented
	createColumns(viewer);

	// make lines and header visible
	final Table table = viewer.getTable();
	table.setHeaderVisible(true);
	table.setLinesVisible(true);
	viewer.setContentProvider(ArrayContentProvider.getInstance());
	// attach a selection listener to our jface viewer
	viewer.addSelectionChangedListener(ContextInjectionFactory.make(TermSelectionListener.class, context));

}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:18,代码来源:AlignmentResultsPart.java

示例3: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize BTSImageService");
	// Add the new object to the application context
	MApplication application = context.get(MApplication.class);
	IEclipseContext ctx = context;
	if (application != null)
	{
		ctx= application.getContext();
	}
	if (ctx == null)
	{
		ctx = context;
	}
	BTSImageService imageService = ContextInjectionFactory.make(BTSImageServiceImpl.class, ctx);
	ctx.set(BTSImageService.class, imageService);

	return imageService;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:21,代码来源:BTSImageServiceContextFunction.java

示例4: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize  DBAdminController");
	// Add the new object to the application context
	DBAdminController controller = ContextInjectionFactory.make(DBAdminControllerImpl.class, context);

	MApplication application = context.get(MApplication.class);

	if (application == null)
	{
		context.set(DBAdminController.class, controller);
	} else
	{
		IEclipseContext ctx = application.getContext();
		ctx.set(DBAdminController.class, controller);
	}

	return controller;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:21,代码来源:DBAdminControllerContextFunction.java

示例5: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context) {
	System.out
			.println("Intitialize  PermissionsAndExpressionsEvaluationController");
	// Add the new object to the application context
	PermissionsAndExpressionsEvaluationController controller = ContextInjectionFactory
			.make(PermissionsAndExpressionsEvaluationControllerImpl.class,
					context);

	MApplication application = context.get(MApplication.class);

	if (application == null) {
		context.set(PermissionsAndExpressionsEvaluationController.class,
				controller);
	} else {
		IEclipseContext ctx = application.getContext();
		ctx.set(PermissionsAndExpressionsEvaluationController.class,
				controller);
	}

	return controller;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:23,代码来源:PermissionsAndExpressionsEvaluationControllerContextFunction.java

示例6: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize BTSTextService");
	// Add the new object to the application context
	MApplication application = context.get(MApplication.class);
	IEclipseContext ctx = context;
	if (application != null)
	{
		ctx= application.getContext();
	}
	if (ctx == null)
	{
		ctx = context;
	}
	BTSTextService textService =  ContextInjectionFactory.make(BTSTextServiceImpl.class, ctx);
	ctx.set(BTSTextService.class, textService);

	return textService;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:21,代码来源:BTSTextServiceContextFunction.java

示例7: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context) {
	System.out
			.println("Intitialize  PermissionsAndExpressionsEvaluationService");
	// Add the new object to the application context
	PermissionsAndExpressionsEvaluationService controller = ContextInjectionFactory
			.make(PermissionsAndExpressionsEvaluationServiceImpl.class,
					context);

	MApplication application = context.get(MApplication.class);

	if (application == null) {
		context.set(PermissionsAndExpressionsEvaluationService.class,
				controller);
	} else {
		IEclipseContext ctx = application.getContext();
		ctx.set(PermissionsAndExpressionsEvaluationService.class,
				controller);
	}

	return controller;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:23,代码来源:PermissionsAndExpressionsEvaluationServiceCF.java

示例8: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize BTSStatusMessageService");
	// Add the new object to the application context
	MApplication application = context.get(MApplication.class);
	IEclipseContext ctx = context;
	if (application != null)
	{
		ctx= application.getContext();
	}
	if (ctx == null)
	{
		ctx = context;
	}

	BTSStatusMessageService service = ContextInjectionFactory.make(BTSStatusMessageServiceImpl.class, ctx);
	ctx.set(BTSStatusMessageService.class, service);

	return service;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:BTSStatusMessageServiceContextFunction.java

示例9: getSearchServices

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public List<BTSObjectSearchService> getSearchServices() {
	SearchServiceFactoryHelper helper = ContextInjectionFactory.make(SearchServiceFactoryHelper.class, StaticAccessController.getContext());
	List<BTSObjectSearchService> services = new Vector<>(7);
	
	GenericObjectService<?, ?> service = helper.getCommentService();
	if (service instanceof BTSObjectSearchService)
	{
		services.add((BTSObjectSearchService) service);
	}
	
	service = helper.getUserGroupService();
	if (service instanceof BTSObjectSearchService)
	{
		services.add((BTSObjectSearchService) service);
	}
	
	service = helper.getUserService();
	if (service instanceof BTSObjectSearchService)
	{
		services.add((BTSObjectSearchService) service);
	}
	return services;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:25,代码来源:BTSObjectSearchServiceFactoryCore.java

示例10: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize GeneralBTSObjectService");
	// Add the new object to the application context
	IEclipseContext ctx = context;
	MApplication application = context.get(MApplication.class);
	if (application != null)
	{
		ctx = application.getContext();
	}
	if (ctx == null)
	{
		ctx = context;
	}
	GeneralBTSObjectService service = ContextInjectionFactory.make(GeneralBTSObjectServiceImpl.class, ctx);
	ctx.set(GeneralBTSObjectService.class, service);

	return service;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:21,代码来源:GeneralBTSObjectServiceContextFunction.java

示例11: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize BTSConfigurationService");
	// Add the new object to the application context
	MApplication application = context.get(MApplication.class);
	IEclipseContext ctx = context;
	if (application != null && application.getContext() != null) {
		ctx = application.getContext();
	}


	BTSConfigurationService service = ContextInjectionFactory.make(BTSConfigurationServiceImpl.class, context);
	ctx.set(BTSConfigurationService.class, service);

	return service;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:18,代码来源:BTSConfigurationServiceContextFunction.java

示例12: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize  UserManagerController");
	// Add the new object to the application context
	UserManagerController controller = ContextInjectionFactory.make(UserManagerControllerImpl.class, context);

	MApplication application = context.get(MApplication.class);

	if (application == null)
	{
		context.set(UserManagerController.class, controller);
	} else
	{
		IEclipseContext ctx = application.getContext();
		ctx.set(UserManagerController.class, controller);
	}

	return controller;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:21,代码来源:UserManagerControllerContextFunction.java

示例13: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize BTSConfigurationController");
	// Add the new object to the application context
	MApplication application = context.get(MApplication.class);
	IEclipseContext ctx = context;
	if (application != null && application.getContext() != null) {
		ctx = application.getContext();
	}


	BTSConfigurationController controller = ContextInjectionFactory.make(BTSConfigurationControllerImpl.class,
			context);
	ctx.set(BTSConfigurationController.class, controller);

	return controller;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:19,代码来源:BTSConfigurationControllerContextFunction.java

示例14: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context) {
	System.out.println("Intitialize BTSAbstractTextService");

	// Add the new object to the application context
	MApplication application = context.get(MApplication.class);
	IEclipseContext ctx = context;
	if (application != null)
	{
		ctx= application.getContext();
	}
	if (ctx == null)
	{
		ctx = context;
	}
	BTSAbstractTextService service =  ContextInjectionFactory.make(BTSAbstractTextServiceImpl.class, ctx);
			
	ctx.set(BTSAbstractTextService.class, service);

	return service;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:BTSAbstractTextServiceContextFunction.java

示例15: compute

import org.eclipse.e4.core.contexts.ContextInjectionFactory; //导入依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	System.out.println("Intitialize services");
	// Add the new object to the application context
	MApplication application = context.get(MApplication.class);
	IEclipseContext ctx = context;
	if (application != null)
	{
		ctx= application.getContext();
	}
	if (ctx == null)
	{
		ctx = context;
	}
	BTSLemmaEntryService listEntryService =  ContextInjectionFactory.make(BTSLemmaEntryServiceImpl.class, ctx);
	ctx.set(BTSLemmaEntryService.class, listEntryService);

	return listEntryService;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:21,代码来源:BTSLemmaEntryServiceContextFunction.java


注:本文中的org.eclipse.e4.core.contexts.ContextInjectionFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。