Monitors
-
Upload
sean-sellers -
Category
Documents
-
view
30 -
download
0
description
Transcript of Monitors
![Page 1: Monitors](https://reader035.fdocuments.net/reader035/viewer/2022072013/56812b5c550346895d8f7f0e/html5/thumbnails/1.jpg)
Monitors
IProgressMonitor IRepositoryProgressMonitor
Surya Tripathi
![Page 2: Monitors](https://reader035.fdocuments.net/reader035/viewer/2022072013/56812b5c550346895d8f7f0e/html5/thumbnails/2.jpg)
Purpose
• Monitor is used to monitor the progress of an operation.
• It provides functions to set the progress and cancel the operation in the middle.
• Listeners can be added to respond to state change of the monitor.
![Page 3: Monitors](https://reader035.fdocuments.net/reader035/viewer/2022072013/56812b5c550346895d8f7f0e/html5/thumbnails/3.jpg)
Demo/Code
• Running long operation without any feedback to users.
• Running long operation with a busy cursor – hourglass, spin cursor.
• Running long operation with progress
• Running long operation without blocking UI.
![Page 4: Monitors](https://reader035.fdocuments.net/reader035/viewer/2022072013/56812b5c550346895d8f7f0e/html5/thumbnails/4.jpg)
Eclipse 4
• Uses SubMonitor
• No need to call done()
• Pass monitor to another function using SubMonitor.newChild()
![Page 5: Monitors](https://reader035.fdocuments.net/reader035/viewer/2022072013/56812b5c550346895d8f7f0e/html5/thumbnails/5.jpg)
Example - SubMonitor
![Page 6: Monitors](https://reader035.fdocuments.net/reader035/viewer/2022072013/56812b5c550346895d8f7f0e/html5/thumbnails/6.jpg)
Progress Monitor in RTC
• Uses the same IProgressMonitor
• Uses wrapper IRepositoryProgressMonitor to pass to server side.
• Whenever you invoke a IScmService function, pass IRepositoryProgressMonitor
• SCMClientUtil.monitorFor() creates IRPM from IPM.• IRepositoryProgressMonitor.ITEM_FACTORY.createItem(monitor);
• SCMProgressMonitor, RepositoryProgressMonitorImpl
model object implementation.
![Page 7: Monitors](https://reader035.fdocuments.net/reader035/viewer/2022072013/56812b5c550346895d8f7f0e/html5/thumbnails/7.jpg)
copyWorkSpace
• ?