Community
Participate
Working Groups
1. set a breakpoint in JavaOutlinePage, ElementChangedListener elementChanged after 'public void run() {' 2. takes about 5 seconds
I can only reproduce the problem is I am self-hosting...that is the JavaOutlinePage has been loaded. As well the delay only occurs putting breakpoints in the inner classes.
Seems to be a problem in classes with numerous inner classes and you are attempting to put a breakpoint in an inner class that is not yet prepared (loaded). In this case there are 11 inner classes (named and anonymous). We walk all of them and ask for the location for the line number. Seems to strictly be the buildup of all of these location requests to the VM. It looks like trying to find locations for these types of cases (inner anonymous classes in classes with lots of inner classes) will be slow and expensive. Now to try to find a better way...
We were doing much more work than required when dealing with nested types. Fixed in JavaLineBreakpoint#determineLocations
Please verify
Verified.
Non-deferred breakpoints in inner types no longer work. I.e. if an inner type is already loaded, and you add a breakpoint to the type, it does not get installed.
Reworked. ReferenceType.nestedTypes() is implemented such that it does String matching on all of the loaded types in the VM to find any nested types of the type (slow). The implementation only uses this call for local nested types (types defined in methods). Added test to Nondeferred breakpoint tests for adding breakpoint to a loaded inner class.
*** Bug 5817 has been marked as a duplicate of this bug. ***