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.

Bug 48659 - MakeCallerCurrent action does not work
Summary: MakeCallerCurrent action does not work
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: issues@debugger
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2004-09-08 12:19 UTC by _ lcincura
Modified: 2006-03-24 10:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ lcincura 2004-09-08 12:19:53 UTC
NetBeans IDE 200409071800 on java 1.5.0_rc-b63

Action Make Caller Current does nothing.
Comment 1 Jan Jancura 2004-09-13 13:39:24 UTC
Fixed in the main trunk:

There were two problems: bad indexing of stack lines in
CallStackTreeModel, so equals on stack frames was not correct.
And CurrentThreadAnnotationListener was highliting and listening on
current thread not current csf.

Fix is simple and isolated, so I am ready to put it to beta2 branch!

QA: test CallStackFrame View & Make Caller / Calle Actions and
doubleclick one call stack nodes.


Index:
src/org/netbeans/modules/debugger/jpda/models/CallStackTreeModel.java
===================================================================
RCS file:
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/CallStackTreeModel.java,v
retrieving revision 1.7
diff -r1.7 CallStackTreeModel.java
91c91
<             int i, k = ch.length;
---
>             int i, k = ch.length, j = from;
97c97
<                     id = threadName + ":" + i;
---
>                     id = threadName + ":" + j;
108c108
<                     i
---
>                     j
109a110
>                 j++;
Index:
ui/src/org/netbeans/modules/debugger/jpda/ui/CurrentThreadAnnotationListener.java
===================================================================
RCS file:
/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/CurrentThreadAnnotationListener.java,v
retrieving revision 1.8
diff -r1.8 CurrentThreadAnnotationListener.java
61c61
<         if (e.getPropertyName () == JPDADebugger.PROP_CURRENT_THREAD) {
---
>         if (e.getPropertyName () ==
JPDADebugger.PROP_CURRENT_CALL_STACK_FRAME) {
117a118
>         final CallStackFrame csf =
currentDebugger.getCurrentCallStackFrame ();
134c135
<                     sp.showSource (ct, language);
---
>                     sp.showSource (csf, language);
cvs server: Diffing ui/src/org/netbeans/modules/debugger/jpda/ui/actions
Index:
ui/src/org/netbeans/modules/debugger/jpda/ui/actions/MakeCallerCurrentActionProvider.java
===================================================================
RCS file:
/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/MakeCallerCurrentActionProvider.java,v
retrieving revision 1.4
diff -r1.4 MakeCallerCurrentActionProvider.java
110,118d109
<             SwingUtilities.invokeLater (new Runnable () {
<                 public void run () {
<                     String language =
DebuggerManager.getDebuggerManager ().
<                         getCurrentSession ().getCurrentLanguage ();
<                     SourcePath ectx = (SourcePath)
lookupProvider.lookupFirst 
<                         (null, SourcePath.class);
<                     ectx.showSource (csf, language);
<                 }
<             });
cvs server: Diffing
ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints
cvs server: Diffing ui/src/org/netbeans/modules/debugger/jpda/ui/models
Index:
ui/src/org/netbeans/modules/debugger/jpda/ui/models/CallStackActionsProvider.java
===================================================================
RCS file:
/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/CallStackActionsProvider.java,v
retrieving revision 1.7
diff -r1.7 CallStackActionsProvider.java
136,144d135
<         SwingUtilities.invokeLater (new Runnable () {
<             public void run () {
<                 String language = DebuggerManager.getDebuggerManager ().
<                     getCurrentSession ().getCurrentLanguage ();
<                 SourcePath ectx = (SourcePath)
lookupProvider.lookupFirst 
<                     (null, SourcePath.class);
<                 ectx.showSource (frame, language);
<             }
<         });
Comment 2 _ lcincura 2004-09-14 11:09:53 UTC
Verified on build 200409131800
Comment 3 Jan Chalupa 2004-09-14 11:50:24 UTC
Hanz, please integrate into release40_beta2. Thanks.
Comment 4 Jan Jancura 2004-09-14 16:46:04 UTC
fixed in beta2 branch.