本文整理汇总了Java中org.eclipse.ui.progress.IProgressService.showInDialog方法的典型用法代码示例。如果您正苦于以下问题:Java IProgressService.showInDialog方法的具体用法?Java IProgressService.showInDialog怎么用?Java IProgressService.showInDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.progress.IProgressService
的用法示例。
在下文中一共展示了IProgressService.showInDialog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processFile
import org.eclipse.ui.progress.IProgressService; //导入方法依赖的package包/类
protected void processFile(IFile file) {
if (file != null
&& file.getFileExtension().equalsIgnoreCase(
GUIEditorPlugin.FORGED_UI_EXTENSION)) {
if (GUIEditorPlugin.getDefault().getWorkbench()
.saveAllEditors(true)) {
// Do the start of the job here.
Shell shell = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell();
IProgressService progressService = PlatformUI.getWorkbench()
.getProgressService();
CodeGenJob job = new CodeGenJob(file);
UIJob runJob = new EditorUIJob(job);
progressService.showInDialog(shell, runJob);
// runJob.setRule(ISchedulingRule);
runJob.schedule();
}
}
}
示例2: execute
import org.eclipse.ui.progress.IProgressService; //导入方法依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
Bookmark bookmark = getSelectedBookmark(selection);
ImportTeamProjectFromBookmarkJob job = new ImportTeamProjectFromBookmarkJob(bookmark);
IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
progressService.showInDialog(HandlerUtil.getActiveShell(event), job);
job.schedule();
return null;
}