Community
Participate
Working Groups
I cannot always reproduce the problem, but here's the steps that I see it happening: 1. Start Eclipse. (seems to happen in the first launch) 2. Create and launch the attached testcase. The launch config stops in main. 3. The testcase has two static variables: hello and me. When the debug session is first suspended, the Variables View show both static variables, assigned to null. 4. Select one of the variables from the variables view. Both static variables disappear. The static variables will not be shown again in subsequent launches or if I step.
Turning on: Show Static Variables will make the static variables appear again. But the static variables should not be shown in the first place when the option was originally turned off.
This is lazy action init problem. The static filter is an action an is not created until the first selection change in the view.
Created attachment 31649 [details] testcase
In 3.1.x, it appears that the first expansion had the side effect of selecting the variable to be expanded which init'd the filters. In 3.2, we don't select when expanding (which seems more correct). I tried setting an initial empty selection but the view never fires an original selection change of an EMPTY selection, as the variables view is configured to suppress 'equal' selections (the initial selection is also empty).
*** Bug 127309 has been marked as a duplicate of this bug. ***
For those of us who are suffering from not being able to see static variables how do we work around it? Where is this "Show Static Variables" option? How do we get to the option?
Goto Variables view pane. Click Menu button [\/] Select "Show static variables" Sorry, could not find it in the docs, had to google for the answer.
note: In 3.2, the action is one level deeper in the view menu: "Java > Show Static Variables" One possible fix for this bug is to put the filter into the content adapter for the java debugger. This way, the filter will be loaded with the adapter when content is retrieved, rather than after the fact, when a selection changes in the viewer. This is too big of a change for 3.2, but could be a 3.2.1 or 3.3 fix.
Created attachment 43294 [details] patch Patch in progress. This patch solves the problem in the variables view, but not the expressions view. The issues with the expressions view is that the root IExpression content adapter is owned by the platform (jdt does not have it's own implementation on which to override a content adapter).
Created attachment 43307 [details] patch This is an alternate patch that makes things work. It's a small hack that fires a selection change with an 'object' when a new debug model is 'activated' in the variables/expressions view. It forces action delegates from all active plug-ins to be initialized. It then fires a second selection change with the current selection (possibly EMPTY).
Released minimal (2nd) patch to TARGET_321 branch
Released to HEAD
Released to R3_2_maintenance.
Please verify, Kevin.
verified