本文整理汇总了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();
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}