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


Java IProgressService.busyCursorWhile方法代码示例

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


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

示例1: run

import org.eclipse.ui.progress.IProgressService; //导入方法依赖的package包/类
@Override
public void run(IAction action) {
	final ArrayList<File> tmp = new ArrayList<File>();
	LeJOSEV3Util.getFilesFromSelection(_selection, tmp);
	if (!tmp.isEmpty())
	{
		// open progress monitor
		IWorkbench wb = PlatformUI.getWorkbench();
		IProgressService ps = wb.getProgressService();
		try {
			ps.busyCursorWhile(new IRunnableWithProgress() {
				public void run(IProgressMonitor pm) {
					uploadFile(pm, tmp);
				} // end run
			});
		} catch (Throwable t) {
			// log
			LeJOSEV3Util.log(t);
		}
	}
}
 
开发者ID:JanKoehnlein,项目名称:XRobot,代码行数:22,代码来源:UploadAction.java

示例2: getBookmarks

import org.eclipse.ui.progress.IProgressService; //导入方法依赖的package包/类
private List<Bookmark> getBookmarks(IStructuredSelection selection) {
	List<Bookmark> bookmarks = new ArrayList<>();
	IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
	try {
		progressService.busyCursorWhile(monitor -> {
			bookmarks.addAll(getBookmarks(selection, monitor));
		});
	} catch (InvocationTargetException | InterruptedException e) {
		// ignore
	}
	return bookmarks;
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:13,代码来源:BookmarksViewerDropListener.java

示例3: terminateLaunches

import org.eclipse.ui.progress.IProgressService; //导入方法依赖的package包/类
private void terminateLaunches() {
  if( preferences.isTerminateBeforeRelaunch() ) {
    IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
    try {
      progressService.busyCursorWhile( this::terminateLaunches );
    } catch( InvocationTargetException ite ) {
      handleException( ite.getCause() );
    } catch( InterruptedException ignore ) {
      Thread.interrupted();
    }
  }
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:13,代码来源:LaunchConfigStarter.java

示例4: execute

import org.eclipse.ui.progress.IProgressService; //导入方法依赖的package包/类
public void execute(ICustomContext context) {
  try {
    URI uri = getDiagram().eResource().getURI();
    URI bpmnUri = uri.trimFragment();
    bpmnUri = bpmnUri.trimFileExtension();
    bpmnUri = bpmnUri.appendFileExtension("bpmn20.xml");

    IProject project = null;
    String parentDiagramName = null;
    if (bpmnUri.isPlatformResource()) {
      String platformString = bpmnUri.toPlatformString(true);
      IResource fileResource = ResourcesPlugin.getWorkspace().getRoot().findMember(platformString);
      if (fileResource != null) {
        project = fileResource.getProject();
        parentDiagramName = uri.trimFragment().trimFileExtension().lastSegment();
      }
    }

    final IProgressService progressService = PlatformUI.getWorkbench().getProgressService();

    final ExportMarshallerRunnable runnable = new ExportMarshallerRunnable(getDiagram(), ActivitiBPMNDiagramConstants.BPMN_MARSHALLER_NAME);
    progressService.busyCursorWhile(runnable);

  } catch (Exception e) {
    e.printStackTrace();
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:28,代码来源:SaveBpmnModelFeature.java


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