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 59072
Collapse All | Expand All

(-)debuggerjpda/api/src/org/netbeans/api/debugger/jpda/JPDAThread.java (-1 / +6 lines)
Lines 7-13 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
Lines 111-116 Link Here
111
     * Unsuspends thread.
111
     * Unsuspends thread.
112
     */
112
     */
113
    public abstract void resume ();
113
    public abstract void resume ();
114
    
115
    /**
116
     * Interrupts this thread unless the thread has been suspended.
117
     */
118
    public abstract void interrupt();
114
    
119
    
115
    /**
120
    /**
116
     * Returns file name this frame is stopped in or null.
121
     * Returns file name this frame is stopped in or null.
(-)debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/JPDAThreadImpl.java (-1 / +13 lines)
Lines 7-13 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
Lines 279-284 Link Here
279
        } catch (VMDisconnectedException ex) {
279
        } catch (VMDisconnectedException ex) {
280
        }
280
        }
281
        
281
        
282
    }
283
    
284
    /**
285
     * Interrupts this thread unless the thread has been suspended.
286
     */
287
    public void interrupt() {
288
        try {
289
            if (isSuspended ()) return;
290
            threadReference.interrupt();
291
        } catch (ObjectCollectedException ex) {
292
        } catch (VMDisconnectedException ex) {
293
        }
282
    }
294
    }
283
    
295
    
284
    /**
296
    /**
(-)debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/Bundle.properties (+1 lines)
Lines 135-140 Link Here
135
CTL_ThreadAction_GoToSource_Label = Go To Source
135
CTL_ThreadAction_GoToSource_Label = Go To Source
136
CTL_ThreadAction_Suspend_Label = Suspend
136
CTL_ThreadAction_Suspend_Label = Suspend
137
CTL_ThreadAction_Resume_Label = Resume
137
CTL_ThreadAction_Resume_Label = Resume
138
CTL_ThreadAction_Interrupt_Label = Interrupt
138
139
139
#ThreadsActionsProvider
140
#ThreadsActionsProvider
140
CTL_CallstackAction_MakeCurrent_Label = Make Current
141
CTL_CallstackAction_MakeCurrent_Label = Make Current
(-)debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/ThreadsActionsProvider.java (+26 lines)
Lines 127-132 Link Here
127
        Models.MULTISELECTION_TYPE_ALL
127
        Models.MULTISELECTION_TYPE_ALL
128
    );
128
    );
129
        
129
        
130
    private Action INTERRUPT_ACTION = Models.createAction (
131
        NbBundle.getBundle(ThreadsActionsProvider.class).getString("CTL_ThreadAction_Interrupt_Label"),
132
        new Models.ActionPerformer () {
133
            public boolean isEnabled (Object node) {
134
                if (node instanceof MonitorModel.ThreadWithBordel) node = ((MonitorModel.ThreadWithBordel) node).originalThread;
135
                if (node instanceof JPDAThread)
136
                    return !((JPDAThread) node).isSuspended ();
137
                else
138
                    return false;
139
            }
140
            
141
            public void perform (Object[] nodes) {
142
                int i, k = nodes.length;
143
                for (i = 0; i < k; i++) {
144
                    Object node = (nodes[i] instanceof MonitorModel.ThreadWithBordel) ? 
145
                            ((MonitorModel.ThreadWithBordel) nodes[i]).originalThread : nodes[i];
146
                    if (node instanceof JPDAThread) {
147
                        ((JPDAThread) node).interrupt();
148
                    }
149
                }
150
            }
151
        },
152
        Models.MULTISELECTION_TYPE_ALL
153
    );
154
        
130
    private JPDADebugger debugger;
155
    private JPDADebugger debugger;
131
    
156
    
132
    
157
    
Lines 155-160 Link Here
155
            return new Action [] {
180
            return new Action [] {
156
                MAKE_CURRENT_ACTION,
181
                MAKE_CURRENT_ACTION,
157
                a,
182
                a,
183
                INTERRUPT_ACTION,
158
                GO_TO_SOURCE_ACTION,
184
                GO_TO_SOURCE_ACTION,
159
            };
185
            };
160
        } else
186
        } else

Return to bug 59072