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


Java EPartService.isPartVisible方法代码示例

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


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

示例1: activate

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
void activate(final EPartService inPartService,
        final EModelService inModelService, final MApplication inApplication) {
	// get browser stack
	final MPartStack lStack = (MPartStack) inModelService.find(
	        RelationsConstants.PART_STACK_BROWSERS, inApplication);
	final Iterator<MStackElement> lParts = lStack.getChildren().iterator();
	// iterate over children
	while (lParts.hasNext()) {
		final MStackElement lElement = lParts.next();
		if (lElement instanceof MPart) {
			final MPart lPart = (MPart) lElement;
			// activate visible
			if (inPartService.isPartVisible(lPart)) {
				inPartService.activate(lPart, true);
				break;
			}
		}
	}
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:21,代码来源:ActivateViewBrowsers.java

示例2: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(MApplication application, EPartService partService,
		EModelService modelService){
	
	MPart projectExplorer = (MPart)modelService.find(PART_ID, application);
	
	boolean isVisible = partService.isPartVisible(projectExplorer);
	
	if(isVisible){
		partService.hidePart(projectExplorer);
	}
	else{
		partService.activate(projectExplorer);
	}
}
 
开发者ID:Pro-Nouns,项目名称:LinGUIne,代码行数:16,代码来源:ViewProjectExplorerHandler.java

示例3: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(MApplication application, EPartService partService,
		EModelService modelService){
	
	MPart properties = (MPart)modelService.find(PART_ID, application);
	
	boolean isVisible = partService.isPartVisible(properties);
	
	if(isVisible){
		partService.hidePart(properties);
	}
	else{
		partService.activate(properties);
	}
}
 
开发者ID:Pro-Nouns,项目名称:LinGUIne,代码行数:16,代码来源:ViewPropertiesHandler.java

示例4: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(MApplication application, EPartService partService,
		EModelService modelService){
	
	MPart quickAnalysis = (MPart)modelService.find(PART_ID, application);
	
	boolean isVisible = partService.isPartVisible(quickAnalysis);
	
	if(isVisible){
		partService.hidePart(quickAnalysis);
	}
	else{
		partService.activate(quickAnalysis);
	}
}
 
开发者ID:Pro-Nouns,项目名称:LinGUIne,代码行数:16,代码来源:ViewQuickAnalysisViewHandler.java

示例5: execute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@Execute
public void execute(MApplication application, EPartService partService,
		EModelService modelService){
	
	MPart settings = (MPart)modelService.find(PART_ID, application);
	
	boolean isVisible = partService.isPartVisible(settings);
	
	if(isVisible){
		partService.hidePart(settings);
	}
	else{
		partService.activate(settings);
	}
}
 
开发者ID:Pro-Nouns,项目名称:LinGUIne,代码行数:16,代码来源:ViewSettingsHandler.java

示例6: canExecute

import org.eclipse.e4.ui.workbench.modeling.EPartService; //导入方法依赖的package包/类
@CanExecute
public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART) MPart part, EPartService partService) {
    return partService.isPartVisible(part);
}
 
开发者ID:e4c,项目名称:EclipseCommander,代码行数:5,代码来源:CloseActivePartHandler.java


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