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 60595 - New class JPDAStep is needed for implementation of RunIntoMethod action.
Summary: New class JPDAStep is needed for implementation of RunIntoMethod action.
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Roman Ondruska
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2005-06-29 10:43 UTC by Roman Ondruska
Modified: 2010-04-29 09:23 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Code, manifest and apichanges diff (6.19 KB, text/plain)
2005-06-29 10:48 UTC, Roman Ondruska
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Ondruska 2005-06-29 10:43:28 UTC
Implementing a new RunIntoMethod action in JPDA debugger we need to do several
JDI steps with no UI interference. For this purpose we created a new class

org.netbeans.api.debugger.jpda.JPDAStep

and add a new method 

JPDADebugger.createJPDAStep(int size, int depth)

which is overridden in JPDADebuggerImpl to return new JPDAStepImpl instance.

Typical usage is:

JPDAStep step = debugger.createJPDAStep(JPDAStep.STEP_LINE, JPDAStep.STEP_INTO);
step.addPropertyChangeListener(JPDAStep.PROP_STATE_EXEC, new   
PropertyChangeListener() { .... }

PROP_STATE_EXEC is fired when the step is executed. Then it is possible to ask
for an other step (via step.addStep(debugger.getCurrentThread())) with no UI
interference. If no other step is needed it is possible to view the debugger
counter on the current possition (via step.setHidden(false) ).
Comment 1 Roman Ondruska 2005-06-29 10:48:39 UTC
Created attachment 22936 [details]
Code, manifest and apichanges diff
Comment 2 Jaroslav Tulach 2005-06-29 22:11:34 UTC
1. if the JPDAStep is not supposed to be subclassed by anyone else than jpda 
impl, you may want to add if (!getClass().getName().equals("jpdaimpl....")) 
throw an exception. Also add note to javadoc, if people shall not subclass 
this. 
 
2. throwing UnsupportedException is pretty poor way to tell that something is 
not supported. In fact it requires the method to be called, exception caught 
and the continuing. It would be nicer to have isJPDAStep supported method. 
Might simplify the usages of the API 
 
3. Please write a test to show the expected calls to the API and also your 
implementation successfully passes the expectations. 
 
 
Comment 3 Roman Ondruska 2005-07-28 15:17:36 UTC
Thanks for comments. I am going to commit these changes (test will be incl.).
Comment 4 Roman Ondruska 2005-07-28 16:06:59 UTC
commit:

Checking in ide/golden/deps.txt;
/cvs/ide/golden/deps.txt,v  <--  deps.txt
new revision: 1.113; previous revision: 1.112
done
Checking in debuggerjpda/api/apichanges.xml;
/cvs/debuggerjpda/api/apichanges.xml,v  <--  apichanges.xml
new revision: 1.9; previous revision: 1.8
done
Checking in debuggerjpda/api/manifest.mf;
/cvs/debuggerjpda/api/manifest.mf,v  <--  manifest.mf
new revision: 1.10; previous revision: 1.9
done
Checking in
debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java;
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v
 <--  JPDADebuggerImpl.java
new revision: 1.78; previous revision: 1.77
done
RCS file:
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDAStepImpl.java,v
done
Checking in debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDAStepImpl.java;
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDAStepImpl.java,v 
<--  JPDAStepImpl.java
initial revision: 1.1
done
Checking in debuggerjpda/api/src/org/netbeans/api/debugger/jpda/JPDADebugger.java;
/cvs/debuggerjpda/api/src/org/netbeans/api/debugger/jpda/JPDADebugger.java,v 
<--  JPDADebugger.java
new revision: 1.16; previous revision: 1.15
done
RCS file: /cvs/debuggerjpda/api/src/org/netbeans/api/debugger/jpda/JPDAStep.java,v
done
Checking in debuggerjpda/api/src/org/netbeans/api/debugger/jpda/JPDAStep.java;
/cvs/debuggerjpda/api/src/org/netbeans/api/debugger/jpda/JPDAStep.java,v  <-- 
JPDAStep.java
initial revision: 1.1
done
RCS file:
/cvs/debuggerjpda/test/unit/src/org/netbeans/api/debugger/jpda/JPDAStepTest.java,v
done
Checking in
debuggerjpda/test/unit/src/org/netbeans/api/debugger/jpda/JPDAStepTest.java;
/cvs/debuggerjpda/test/unit/src/org/netbeans/api/debugger/jpda/JPDAStepTest.java,v
 <--  JPDAStepTest.java
initial revision: 1.1
done
Checking in
debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/Bundle.properties;
/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.7; previous revision: 1.6
done
Checking in
debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/RunIntoMethodActionProvider.java;
/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/actions/RunIntoMethodActionProvider.java,v
 <--  RunIntoMethodActionProvider.java
new revision: 1.10; previous revision: 1.9
done
Checking in
debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml;
/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml,v
 <--  mf-layer.xml
new revision: 1.25; previous revision: 1.24
done
Checking in debuggerjpda/nbproject/project.xml;
/cvs/debuggerjpda/nbproject/project.xml,v  <--  project.xml
new revision: 1.12; previous revision: 1.11
done
Comment 5 Roman Ondruska 2005-07-28 16:13:41 UTC
Fixed.
Comment 6 Quality Engineering 2010-04-29 09:23:22 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.