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


Java IEclipseContext.createChild方法代码示例

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


在下文中一共展示了IEclipseContext.createChild方法的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: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Optional
@Execute
public void execute(
		@Optional @Named(IServiceConstants.ACTIVE_SHELL) final Shell shell,
		IEclipseContext context,
		@Optional @Named("org.bbaw.bts.ui.main.commandparameter.dbManagerMessage") String message) {
	IEclipseContext child = context.createChild("DBManager");
	child.set("dbManagerMessage", message);
	if (shell == null)
	{
		child.set(Shell.class, new Shell());
	}
	else
	{
		child.set(Shell.class, shell);
	}
	DBManagerDialog dialog = ContextInjectionFactory.make(
			DBManagerDialog.class, child);
	// context.set(UserManagementDialog.class, dialog);

	if (dialog.open() == dialog.OK) {
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:24,代码来源:OpenDBManagerDialog.java

示例3: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(IEclipseContext context,
		@Optional @Named("userId") String userId, BTSUserController userController) {
	IEclipseContext child = context.createChild("changePassword");

	if (userId != null)
	{
		BTSUser user = userController.findUser(userId, null);
		child.set(BTSUser.class, user);
	}
	PasswordChangeDialog dialog = ContextInjectionFactory.make(PasswordChangeDialog.class, child);
	//		context.set(UserManagementDialog.class, dialog);

	if (dialog.open() == SWT.OK)
	{
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:18,代码来源:OpenChangePasswordDialogHandler.java

示例4: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional Object object,
		@Named(IServiceConstants.ACTIVE_SHELL) final Shell shell,
		IEclipseContext context) {
	BTSCorpusObject corpusObject = null;
	if (object instanceof BTSCorpusObject)
	{
		corpusObject = (BTSCorpusObject) object;
	}
	else if (object instanceof BTSTextSelectionEvent && ((BTSTextSelectionEvent) object).data instanceof BTSCorpusObject)
	{
		corpusObject = (BTSCorpusObject) ((BTSTextSelectionEvent) object).data;
	}
	if (corpusObject == null) return;
	IEclipseContext child = context.createChild();
	child.set(BTSCorpusObject.class, corpusObject);
	child.set(Shell.class, shell);
	
	CheckPassportDialog dialog = ContextInjectionFactory.make(
			CheckPassportDialog.class, child);

	if (dialog.open() == CheckPassportDialog.OK) {
		
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:26,代码来源:CheckPassportCompletenessHandler.java

示例5: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(IEclipseContext context, @Named("objectId") String objectId, 
		CorpusNavigatorController corpusNavigatorController) {
	
	if (objectId != null)
	{
		BTSObject object = corpusNavigatorController.find(objectId, null);
		if (object == null) return;
		IEclipseContext child = context.createChild();
		child.set(BTSObject.class, object);
		child.set(Shell.class, new Shell());
		child.set(BTSCoreConstants.CORE_EXPRESSION_MAY_EDIT, false);

		PassportEditorDialog dialog = ContextInjectionFactory.make(
				PassportEditorDialog.class, child);
		if (dialog.open() == dialog.OK) {
			
		}
	}
	
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:PassportOpenObjectMetadataHandler.java

示例6: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional Object object,
		@Named(IServiceConstants.ACTIVE_SHELL) final Shell shell,
		IEclipseContext context) {
	BTSText text = null;
	if (object instanceof BTSText)
	{
		text = (BTSText) object;
	}
	else if (object instanceof BTSTextSelectionEvent && ((BTSTextSelectionEvent) object).data instanceof BTSText)
	{
		text = (BTSText) ((BTSTextSelectionEvent) object).data;
	}
	if (text == null) return;
	IEclipseContext child = context.createChild();
	child.set(BTSText.class, text);
	child.set(Shell.class, shell);
	
	CheckTextDialog dialog = ContextInjectionFactory.make(
			CheckTextDialog.class, child);

	if (dialog.open() == CheckTextDialog.OK) {
		
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:26,代码来源:CheckTextHandler.java

示例7: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
		@Named(IServiceConstants.ACTIVE_SHELL) final Shell shell,
		IEclipseContext context) {
	IEclipseContext child = context.createChild();
	Object o = context.get(CompareObjectsController.class);
	child.set("compareObject", selection);
	CompareDialog dialog = ContextInjectionFactory.make(
			CompareDialog.class, child);
	// context.set(UserManagementDialog.class, dialog);

	if (dialog.open() == dialog.OK) {
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:15,代码来源:OpenCompareDialogHandler.java

示例8: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(IEclipseContext context) {
	IEclipseContext child = context.createChild();
	
	StatusMessageDialog dialog = new StatusMessageDialog();
			
	ContextInjectionFactory.inject(
					dialog, child);
	dialog.create();

	if (dialog.open() == dialog.OK) {
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:14,代码来源:OpenStatusMessagesDialogHandler.java

示例9: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Optional
@Execute
public void execute(
		@Named(IServiceConstants.ACTIVE_SHELL) final Shell shell,
		@Named(IServiceConstants.ACTIVE_SELECTION) final BTSDBBaseObject selection,
		IEclipseContext context) {
	IEclipseContext childContext = context.createChild("Edit Updaters/Readers Context");
	childContext.set(BTSCoreConstants.CORE_EXPRESSION_MAY_EDIT, 
			new Boolean(permissionsController.userMayEditObject(
					permissionsController.getAuthenticatedUser(), selection)));
	ObjectUpdaterReaderEditorDialog dialog = ContextInjectionFactory.make(
			ObjectUpdaterReaderEditorDialog.class, childContext);
	childContext.set(ObjectUpdaterReaderEditorDialog.class, dialog);
	dialog.open();
}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:OpenUpdatersReadersEditorDialogHandler.java

示例10: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(@Optional @Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
		@Named(IServiceConstants.ACTIVE_SHELL) final Shell shell,
		IEclipseContext context) {
	IEclipseContext child = context.createChild();
	Object o = context.get(CompareObjectsController.class);
	child.set("compareObject", selection);
	ConflictsDialog dialog = ContextInjectionFactory.make(
			ConflictsDialog.class, child);
	// context.set(UserManagementDialog.class, dialog);

	if (dialog.open() == dialog.OK) {
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:15,代码来源:OpenConflictsDialog.java

示例11: 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(
			CorpusNavigatorPart.class, child);
	return searchViewer;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:SearchViewerFactoryCorpus.java

示例12: 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

示例13: 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(
			LemmaNavigator.class, child);
	return searchViewer;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:SearchViewerFactoryLemma.java

示例14: 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(
			ATextNavigatorPart.class, child);
	return searchViewer;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:16,代码来源:SearchViewerFactoryAText.java

示例15: execute

import org.eclipse.e4.core.contexts.IEclipseContext; //导入方法依赖的package包/类
@Execute
public void execute(
		@Named(IServiceConstants.ACTIVE_SELECTION) BTSCorpusObject corpusObject,
		@Named(IServiceConstants.ACTIVE_SHELL) final Shell shell,
		EventBroker eventBroker,
		CommentController commentController, IEclipseContext context) {
	
		if (corpusObject != null)
		{
			final BTSComment object = commentController
					.createComment((BTSCorpusObject) corpusObject);

			BTSRelation rel = null;
			if (object.getRelations().isEmpty())
			{
				rel = BtsmodelFactory.eINSTANCE.createBTSRelation();
				rel.setType(BTSCoreConstants.BASIC_RELATIONS_PARTOF);
			}
			else
			{
				rel = object.getRelations().get(0);
			}

			rel.setObjectId(corpusObject.get_id());
			object.getRelations().add(rel);
			
			IEclipseContext child = context.createChild();
			child.set(BTSComment.class, object);
			child.set(Shell.class, shell);
			
			CommentEditorDialog dialog = ContextInjectionFactory.make(
					CommentEditorDialog.class, child);

			if (dialog.open() == CommentEditorDialog.OK) {
				
			}
			
		}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:40,代码来源:AddCommentToATextHandler.java


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