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.
Steps to reproduce: 1) Open 'form' project from NetBeans sources. 2) Place breakpoint on first line of FormEditorModule.restore method, i.e. on: Beans.setDesignTime(true); 3) Start NetBeans, attach debugger... 4) When debugger stops, step into the Beans.setDesignTime method. Step over everything in this method - so 'Current Program Counter' is show at the closing }. 5) Now evaluate the following expression: java.beans.ThreadGroupContext.getContext() It works well. 6) Now step out from the method (back to FormEditorModule class) and evaluate the expression again. You get "No Expression to evaluate" window, the evaluation does not work. And it does not work on other places either. Seems like the debugger must be stopped in the same package to evaluate a static method call? I'm seeing this consistently in Dev Build 201307282300 on Windows 7 JDK u25.
Strange it's actually always possible to evaluate 'java.beans.Beans.isDesignTime()', which is quite similar...
I have reproduced the problem. ThreadGroupContext is package private class, this can cause the trouble in evaluator based on javac.
The problem is, that the appropriate type element is marked as an error element, since it's not accessible from a different package. We'd need some mechanism how to disable the access checks in the javac parser.
Integrated into 'main-silver', will be available in build *201308112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/49907dd44877 User: mentlicher@netbeans.org Log: #234037: Preparing tests for evaluation of expressions that access private elements.
Fixed by changeset: 263200:2df6cf07b590 http://hg.netbeans.org/core-main/rev/2df6cf07b590