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


Java IEclipseContext.set方法代码示例

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


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

示例1: runContainerResolverJob

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的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: compute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的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

示例3: compute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	MApplication application = context.get(MApplication.class);
	if (application != null && application.getContext() != null)
	{
		context = application.getContext();
	}
	BTSAnnotationDao dao;
	try
	{
		dao = loadDao(context, daoFactoryName, BTSAnnotationDao.class);
	} catch (CoreException e)
	{
		e.printStackTrace();
		throw new BTSDBException("No DaoFactory found for BTSAnnotationDao and factory name: " + daoFactoryName, e);

	}
	context.set(BTSAnnotationDao.class, dao);

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

示例4: compute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的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

示例5: compute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	MApplication application = context.get(MApplication.class);
	if (application != null && application.getContext() != null)
	{
		context = application.getContext();
	}
	DBLeaseDao dao;
	try
	{
		dao = loadDao(context, daoFactoryName,DBLeaseDao.class);
	} catch (CoreException e)
	{
		e.printStackTrace();
		throw new BTSDBException("No DaoFactory found for DBLeaseDao and factory name: " + daoFactoryName, e);

	}
	context.set(DBLeaseDao.class, dao);

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

示例6: compute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的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

示例7: compute

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

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

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

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

示例8: compute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	MApplication application = context.get(MApplication.class);
	if (application != null && application.getContext() != null)
	{
		context = application.getContext();
	}
	CorpusObjectDao dao;
	try
	{
		dao = loadDao(context, daoFactoryName, CorpusObjectDao.class);
	} catch (CoreException e)
	{
		e.printStackTrace();
		throw new BTSDBException("No DaoFactory found for CorpusObjectDao and factory name: " + daoFactoryName, e);

	}
	context.set(CorpusObjectDao.class, dao);

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

示例9: compute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Override
public Object compute(IEclipseContext context)
{
	MApplication application = context.get(MApplication.class);
	if (application != null && application.getContext() != null)
	{
		context = application.getContext();
	}
	BTSCommentDao dao;
	try
	{
		dao = loadDao(context, daoFactoryName, BTSCommentDao.class);
	} catch (CoreException e)
	{
		e.printStackTrace();
		throw new BTSDBException("No DaoFactory found for BTSCommentDao and factory name: " + daoFactoryName, e);

	}
	context.set(BTSCommentDao.class, dao);

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

示例10: init

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@PostConstruct
public void init(ILoggerProvider loggerProvider, MApplication application, IEclipseContext context) {
	loggerProvider.getClassLogger(this.getClass()).debug("Entering [email protected]");
	IEclipseContext appContext = application.getContext();
	appContext.set(Preferences.class, ContextInjectionFactory.make(Preferences.class, appContext));
	appContext.set(PreferenceStore.class, ContextInjectionFactory.make(PreferenceStore.class, appContext));
	ContextInjectionFactory.make(Services.class, context);
	ProgressManager progressManager = ContextInjectionFactory.make(ProgressManager.class, context);
	appContext.set(ProgressManager.class, progressManager);
	// bug-fix: add a ProgressViewUpdater to the application context
	appContext.set(ProgressViewUpdater.class, ContextInjectionFactory.make(ProgressViewUpdater.class, appContext));
	loggerProvider.getClassLogger(this.getClass()).debug("Exiting [email protected]");
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:14,代码来源:ProgressViewAddon.java

示例11: addServicesToContext

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
private void addServicesToContext(IEclipseContext cont) {
	cont.set(LinguisticResourcesService.class, ContextInjectionFactory.make(LinguisticResourcesServiceImpl.class, cont));
	cont.set(ResourceService.class, ContextInjectionFactory.make(ResourceServiceImpl.class, cont));
	cont.set(NLPService.class, ContextInjectionFactory.make(NLPServiceImpl.class, cont));
	cont.set(ETerminologyService.class, ContextInjectionFactory.make(TerminologyServiceImpl.class, cont));
	cont.set(CorpusService.class, ContextInjectionFactory.make(CorpusServiceImpl.class, cont));
	cont.set(TaggerService.class, ContextInjectionFactory.make(TaggerServiceImpl.class, cont));
	cont.set(TermSuiteSelectionService.class, ContextInjectionFactory.make(TermSuiteSelectionServiceImpl.class, cont));
	cont.set(AlignmentService.class, ContextInjectionFactory.make(AlignmentServiceImpl.class, cont));
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:11,代码来源:LifeCycleManager.java

示例12: compute

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

	MApplication application = context.get(MApplication.class);
	// IEclipseContext ctx = application.getContext();

	context.set(BTSUserService.class, userService);

	return userService;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:15,代码来源:BTSUserServiceContextFunction.java

示例13: compute

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

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

示例14: createPartControl

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@PostConstruct
	public void createPartControl(Composite parent) {
		if (parentShell == null)
		{
			parentShell = new Shell();
		}
		try {
			part = partService.findPart(PART_ID);
		} catch (Exception e) {
//			logger.warn("Part Service couldn't find org.fuberlin.bts.ui.corpus.egy.annotations.TextAnnotationsPart ");
			e.printStackTrace();
		}
		parent.setLayout(new GridLayout());
		((GridLayout) parent.getLayout()).marginHeight = 0;
		((GridLayout) parent.getLayout()).marginWidth = 0;
//		contextService
//				.activateContext("org.eclipse.ui.contexts.dialogAndWindow");
		IEclipseContext child = context.createChild();
		child.set(Composite.class, parent);
		child.set(IBTSEditor.class, TextAnnotationsPart.this);
		textAnnotatationEditor = ContextInjectionFactory.make(
				TextAnnotationsComposite.class, child);
		
		// load annotatin styling settings node
		Preferences rootNode = ConfigurationScope.INSTANCE.getNode("org.bbaw.bts.ui.corpus");
		annotationSettings = (EclipsePreferences) rootNode.node(BTSCorpusConstants.PREF_ANNOTATION_SETTINGS);
		AnnotationToolbarItemCreator.processAndUpateToolbarItemsAnnotationShortcut(part, annotationSettings);

		Map<String, Boolean> filters = (Map<String, Boolean>) context.get("org.bbaw.bts.corpus.annotationsPart.filter");
		textAnnotatationEditor.setFilters(filters );
		if (text != null)
		{
			loadInput(text);
		}
		
		parent.layout();
		parent.pack();
		constructed = true;
	}
 
开发者ID:cplutte,项目名称:bts,代码行数:40,代码来源:TextAnnotationsPart.java

示例15: createSearchViewer

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Override
public SearchViewer createSearchViewer(Composite parent, int style, BTSConfigItem relationConfig, IEclipseContext context) {
	if (context == null)
	{
		context = StaticAccessController.getContext();
	}
	IEclipseContext child = context.createChild();
	child.set(Composite.class, parent);
	child.set(BTSConfigItem.class, relationConfig);
	child.set(BTSUIConstants.SELECTION_TYPE,
			BTSUIConstants.SELECTION_TYPE_SECONDARY);
	searchViewer = ContextInjectionFactory.make(
			ThsNavigator.class, child);
	return searchViewer;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:SearchViewerFactoryThs.java


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