Lines 94-99
Link Here
|
94 |
private static final int PAUSE = Integer.getInteger("org.netbeans.core.TimeableEventQueue.pause", 15000); // NOI18N |
94 |
private static final int PAUSE = Integer.getInteger("org.netbeans.core.TimeableEventQueue.pause", 15000); // NOI18N |
95 |
|
95 |
|
96 |
private final RequestProcessor.Task TIMEOUT; |
96 |
private final RequestProcessor.Task TIMEOUT; |
|
|
97 |
private final RequestProcessor.Task WAIT_CURSOR_CHECKER; |
97 |
private volatile long ignoreTill; |
98 |
private volatile long ignoreTill; |
98 |
private volatile long start; |
99 |
private volatile long start; |
99 |
private volatile ActionListener stoppable; |
100 |
private volatile ActionListener stoppable; |
Lines 105-110
Link Here
|
105 |
this.mainWindow = f; |
106 |
this.mainWindow = f; |
106 |
TIMEOUT = RP.create(this); |
107 |
TIMEOUT = RP.create(this); |
107 |
TIMEOUT.setPriority(Thread.MIN_PRIORITY); |
108 |
TIMEOUT.setPriority(Thread.MIN_PRIORITY); |
|
|
109 |
WAIT_CURSOR_CHECKER = RP.create(new Runnable() { |
110 |
|
111 |
@Override |
112 |
public void run() { |
113 |
isWaitCursor |= isWaitCursor(); |
114 |
} |
115 |
}, true); |
116 |
WAIT_CURSOR_CHECKER.setPriority(Thread.MIN_PRIORITY); |
108 |
} |
117 |
} |
109 |
|
118 |
|
110 |
static void initialize() { |
119 |
static void initialize() { |
Lines 161-166
Link Here
|
161 |
private void done() { |
170 |
private void done() { |
162 |
TIMEOUT.cancel(); |
171 |
TIMEOUT.cancel(); |
163 |
TIMEOUT.waitFinished(); |
172 |
TIMEOUT.waitFinished(); |
|
|
173 |
WAIT_CURSOR_CHECKER.cancel(); |
174 |
WAIT_CURSOR_CHECKER.waitFinished(); |
164 |
|
175 |
|
165 |
LOG.log(Level.FINE, "isWait cursor {0}", isWaitCursor); // NOI18N |
176 |
LOG.log(Level.FINE, "isWait cursor {0}", isWaitCursor); // NOI18N |
166 |
long r; |
177 |
long r; |
Lines 219-224
Link Here
|
219 |
stoppable = (ActionListener)selfSampler; |
230 |
stoppable = (ActionListener)selfSampler; |
220 |
} |
231 |
} |
221 |
isWaitCursor |= isWaitCursor(); |
232 |
isWaitCursor |= isWaitCursor(); |
|
|
233 |
if (!isWaitCursor) { |
234 |
WAIT_CURSOR_CHECKER.schedule(Math.max(REPORT - QUANTUM, 0)); |
235 |
} |
222 |
} |
236 |
} |
223 |
|
237 |
|
224 |
private static void report(final ActionListener ss, final long time) { |
238 |
private static void report(final ActionListener ss, final long time) { |