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


Java EPartService.showPart方法代码示例

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


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

示例1: openProgressView

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
/**
 * Open the progress view in the supplied window.
 *
 * @param window
 */
// TODO E4
public static void openProgressView() {
	Services services = Services.getInstance();
	MPart progressView = (MPart) services.getModelService().find(
	        ProgressManager.PROGRESS_VIEW_NAME, services.getMWindow());
	EPartService partService = services.getPartService();
	if (progressView == null) {
		progressView = partService.createPart(ProgressManager.PROGRESS_VIEW_NAME);
		if (progressView != null)
			partService.showPart(progressView, PartState.VISIBLE);
	}
	if (progressView == null) {
		return;
	}
	partService.activate(progressView);
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:22,代码来源:ProgressManagerUtil.java

示例2: showPart

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
/**
 * @param partService
 * @param newPart
 * @param activePart
 */
private void showPart(EPartService partService, MPart newPart, MPart activePart) {

    partService.showPart(newPart, PartState.VISIBLE);

    // The current tab will stay active
    partService.showPart(stayActiveTab ? activePart : newPart, PartState.ACTIVATE);
}
 
开发者ID:e4c,项目名称:EclipseCommander,代码行数:13,代码来源:PartServiceImpl.java

示例3: openEditor

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
private void openEditor(EPartService partService, IEditorInputResource eir){

		String editorPartID = findEditorID(eir);
		String resourcePath = eir.getResource().getFullPath().toString();
		
		MPart part = null;
		
		//find existing
		for(MPart p : partService.getParts()){
			String path = p.getPersistedState().get(AlternativeEditor.ALTERNATIVE_RESOURCE);
			if(path != null && path.equals(resourcePath)){
				part = p;
			}
		}
		
		if(part == null){
			MPartStack stack = (MPartStack)modelService.find("org.eclipse.e4.primaryDataStack", application);
			if(stack != null){
				part = partService.createPart(editorPartID);
				part.getProperties().put(AlternativeEditor.ALTERNATIVE_RESOURCE, eir.getResource().getFullPath().toString());
				
				stack.getChildren().add(part);				
				partService.showPart(part, PartState.ACTIVATE);
			}
		}
		else{
			partService.showPart(part, PartState.ACTIVATE);
		}
		
	}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:31,代码来源:OpenAlternativeHandler.java

示例4: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(EPartService partService, EModelService modelService, @Named("part_id") String partID) {
	MPart part = partService.findPart(partID);
			
	if(part == null){
		MPartStack stack = (MPartStack)modelService.find("org.eclipse.e4.primaryDataStack", application);
		if(stack != null){
			part = partService.createPart(partID);
			stack.getChildren().add(part);
		}
	}
	
	partService.showPart(part, PartState.ACTIVATE);
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:15,代码来源:OpenPartHandler.java

示例5: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(final EPartService partService, @Optional @Named(IServiceConstants.ACTIVE_SELECTION) final BettingSchedule schedule) {
    if (schedule != null) {
        MPart part = partService.findPart("optm.bettingschedule.part.bettingSchedule");
        part.setVisible(true);
        partService.showPart(part, PartState.VISIBLE);
    }
}
 
开发者ID:ksteuern,项目名称:optm,代码行数:9,代码来源:OpenBettingSchedule.java

示例6: init

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Inject @Optional
private void init(@UIEventTopic(TermSuiteEvents.JOB_STARTED) String jobName, 
		EPartService partService) {
	partService.showPart(TermSuiteUI.PROGRESS_VIEW_ID, PartState.ACTIVATE);
}
 
开发者ID:termsuite,项目名称:termsuite-ui,代码行数:6,代码来源:LifeCycleManager.java

示例7: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute( @Named("com.opcoach.e34tools.parameter.view.id") String viewID, EPartService ps) {

	MPart p = ps.showPart(viewID, EPartService.PartState.ACTIVATE);
	System.out.println("Part ouvert : " + p);
}
 
开发者ID:opcoach,项目名称:E34MigrationTooling,代码行数:7,代码来源:OpenView.java


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