Community
Participate
Working Groups
1. Launch this testcase and add "strings" to the Expressions View as Watch Expresion. 2. Expand the array. 3. Launch another testcase where "strings" cannot be resolved. 4. When the second debug session is started, select a stackframe from the second debug session. 5. You would see a node added under "strings" saying htat "strings cannot be resoled". Under this "unresolved" node, you still see children for the array. I will attach screen shot. Testcase: public static void main(String[] args) { String[] strings = new String[1000]; strings[0] = "a"; strings[1] = "b"; System.out.println("over over"); // breakpoint here }
Created attachment 39992 [details] screen shot
This is because the error message (String) does not have a content adapater. In the case of no adaper, the model is not updated: protected void updateHasChildren(ModelNode node) { Object element = node.getElement(); IAsynchronousContentAdapter adapter = getContentAdapter(element); if (adapter != null) { IContainerRequestMonitor update = new ContainerRequestMonitor(node, this); requestScheduled(update); adapter.isContainer(element, getPresentationContext(), update); } } For updateChildren() and updateHasChildren() we should update the model appropriately when no adapter exists, else the remaining tree structure 'remains'.
Created attachment 40633 [details] Patch The simplest fix is to have an "empty content" adapter by default for elements that have no content adapters.
Marking as RC4 candidate. Clients using the new flex hierarhcy support should get this behavior for free, else views will not update properly for elements that do not provide adapters.
Risk: This fix comes with minimal risk. The fix adds a simple content adapter that is only used when an element in a view has no content adapter registered. The code in the adapter is trivial. Importance: The fix is important to ensure views update properly when clients using the new flex hierarchy support do not provide content adapters for their elements (which is reasonable for elements that do not have children/content). CC'ing Philippe and Markus for RC4 approval
(cc'ing markus for RC4 approval)
Cc'ing Martin for RC4 approval. I was only stand-in component lead last week - Martin has now taken over again.
+1 for 3.2RC4. The current behavior is really unhappy, and the fix seems trivial enough that it is a good candidate.
+1 for 3.2 RC4
verified code changes.
Fixed.
Please verify, Samantha.
verified