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 67046

Summary: Add boolean JPDADebugger.canBeModified()
Product: debugger Reporter: Martin Entlicher <mentlicher>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: CLOSED FIXED    
Severity: blocker Keywords: API, API_REVIEW_FAST
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 58555    
Attachments: The patch, that implements the desired method.
Full patch with additional requested changes.

Description Martin Entlicher 2005-10-18 14:06:22 UTC
We need to have a way to find out whether the debuggee is modifiable or not.
Whether we can set new values to variables and fields.
There is VirtualMachine.canBeModified() method for that (in JDK 1.5 and higher
only). However, there is no access to JDI in UI components.

Therefore I propose to add boolean JPDADebugger.canBeModified() method into the
JPDA APIs.
Comment 1 Martin Entlicher 2005-10-18 14:13:58 UTC
Created attachment 26083 [details]
The patch, that implements the desired method.
Comment 2 Martin Entlicher 2005-10-18 14:16:37 UTC
The patch is attached, no tests included - we do not know the expected result in
advance.
Comment 3 Martin Entlicher 2005-10-18 14:19:21 UTC
I'm requesting a fast API review for this simple addition. Thanks.
Comment 4 Jaroslav Tulach 2005-10-19 05:30:04 UTC
@since and apichanges, at least. Also arch*.xml could mention use of 
reflection. Btw. I am not sure how to test this either, maybe just make sure 
that on 1.4 the method always returns false. 
Comment 5 Martin Entlicher 2005-10-21 13:51:20 UTC
Created attachment 26221 [details]
Full patch with additional requested changes.
Comment 6 Martin Entlicher 2005-11-03 09:45:07 UTC
Thanks for the review, I'm going to integrate the patch...
Comment 7 Martin Entlicher 2005-11-03 11:35:52 UTC
Integrated in trunk:

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v
 <--  JPDADebuggerImpl.java
new revision: 1.91; previous revision: 1.90

/cvs/debuggerjpda/api/src/org/netbeans/api/debugger/jpda/JPDADebugger.java,v 
<--  JPDADebugger.java
new revision: 1.19; previous revision: 1.18

/cvs/debuggerjpda/arch.xml,v  <--  arch.xml
new revision: 1.2; previous revision: 1.1

/cvs/debuggerjpda/api/manifest.mf,v  <--  manifest.mf
new revision: 1.14; previous revision: 1.13

/cvs/debuggerjpda/api/apichanges.xml,v  <--  apichanges.xml
new revision: 1.12; previous revision: 1.11
Comment 8 Quality Engineering 2010-04-29 09:26:27 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.