This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 192427
Collapse All | Expand All

(-)a/o.n.core/src/org/netbeans/core/TimableEventQueue.java (-3 / +10 lines)
Lines 133-148 Link Here
133
    @Override
133
    @Override
134
    protected void dispatchEvent(AWTEvent event) {
134
    protected void dispatchEvent(AWTEvent event) {
135
        eq = Thread.currentThread();
135
        eq = Thread.currentThread();
136
        boolean scheduled = false;
136
        try {
137
        try {
137
            tick("dispatchEvent"); // NOI18N
138
            scheduled = tick("dispatchEvent"); // NOI18N
138
            super.dispatchEvent(event);
139
            super.dispatchEvent(event);
139
        } finally {
140
        } finally {
140
            done();
141
            if (scheduled) {
142
                done();
143
            }
141
        }
144
        }
142
    }
145
    }
143
146
144
    private void done() {
147
    private void done() {
145
        TIMEOUT.cancel();
148
        TIMEOUT.cancel();
149
        TIMEOUT.waitFinished();
150
146
        LOG.log(Level.FINE, "isWait cursor {0}", isWaitCursor); // NOI18N
151
        LOG.log(Level.FINE, "isWait cursor {0}", isWaitCursor); // NOI18N
147
        long r;
152
        long r;
148
        if (isWaitCursor) {
153
        if (isWaitCursor) {
Lines 174-185 Link Here
174
        return;
179
        return;
175
    }
180
    }
176
181
177
    private void tick(String name) {
182
    private boolean tick(String name) {
178
        start = System.currentTimeMillis();
183
        start = System.currentTimeMillis();
179
        if (start >= ignoreTill && mainWindow.isShowing()) {
184
        if (start >= ignoreTill && mainWindow.isShowing()) {
180
            LOG.log(Level.FINEST, "tick, schedule a timer for {0}", name);
185
            LOG.log(Level.FINEST, "tick, schedule a timer for {0}", name);
181
            TIMEOUT.schedule(QUANTUM);
186
            TIMEOUT.schedule(QUANTUM);
187
            return true;
182
        }
188
        }
189
        return false;
183
    }
190
    }
184
191
185
    @Override
192
    @Override

Return to bug 192427