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