eclipse 4 rcp process dialog exampleDevel/RCP(Rich Client Platform)2020. 9. 16. 14:05
Table of Contents
ProgressMonitorDialog progressDialog = new ProgressMonitorDialog(shell);
try {
progressDialog.run(false, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
int workload = 100;
// Tell the user what you are doing
monitor.beginTask("Copying files", workload);
// Do your work
for (int i = 0; i < workload; i++) {
// Optionally add subtasks
monitor.subTask("Copying file " + (i + 1) + " of " + workload + "...");
Thread.sleep(2000);
// Tell the monitor that you successfully finished one item of "workload"-many
monitor.worked(1);
// Check if the user pressed "cancel"
if (monitor.isCanceled()) {
monitor.done();
return;
}
}
// You are done
monitor.done();
}
});
} catch (Exception e) {
e.printStackTrace();
}
'Devel > RCP(Rich Client Platform)' 카테고리의 다른 글
eclipse plug-in RCP 프로젝트 resources 폴더 추가와 파일 읽기 (0) | 2020.07.31 |
---|---|
eclipse plug-in RCP 개발 시 외부 라이브러리 추가 후 Unable to create class ... from bundle '420' 에러 처리 (0) | 2015.03.05 |
@kogun82 :: Ctrl+C&V 로 하는 프로그래밍
Korean BioInformation Center(KOBIC) Korea Research Institute of Bioscience & Biotechnology Address: #52 Eoeun-dong, Yuseong-gu, Deajeon, 305-806, KOREA +82-10-9936-2261 e-mail: kogun82@kribb.re.kr Blog: kogun82.tistory.com Homepage: www.kobic.re.kr
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!