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.
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.
Created attachment 26083 [details] The patch, that implements the desired method.
The patch is attached, no tests included - we do not know the expected result in advance.
I'm requesting a fast API review for this simple addition. Thanks.
@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.
Created attachment 26221 [details] Full patch with additional requested changes.
Thanks for the review, I'm going to integrate the patch...
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
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.