Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / test / ControlUI.groovy @ 479

History | View | Annotate | Download (974 Bytes)

1
package org.txm.test
2

    
3
//import org.txm.rcpapplication.views.*
4

    
5
// Bindings
6
println "The current job monitor: "+monitor
7
println "The current editor: "+editor
8
println "The current selection: "+selection
9

    
10
// Interact with SWT Objects
11
monitor.syncExec(new Runnable() {
12
        public void run() {
13
                //CorporaView.reload()
14
                println "corpora view refreshed !"
15
        }
16
})
17

    
18
// Move the progress bar and cancel if necessary
19
println "waiting..."
20
Thread.sleep(1000)
21
monitor.worked(20)
22
if (monitor.isCanceled()) {monitor.done(); return}
23

    
24
println "waiting..."
25
Thread.sleep(1000)
26
monitor.worked(20)
27
if (monitor.isCanceled()) {monitor.done(); return}
28

    
29
println "waiting..."
30
Thread.sleep(1000)
31
monitor.worked(20)
32
if (monitor.isCanceled()) {monitor.done(); return}
33

    
34
println "waiting..."
35
Thread.sleep(1000)
36
monitor.worked(20)
37
if (monitor.isCanceled()) {monitor.done(); return}
38

    
39
println "waiting..."
40
Thread.sleep(1000)
41
monitor.worked(20)
42
if (monitor.isCanceled()) {monitor.done(); return}
43

    
44
println "Done."