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