Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 307308 - When change made to node, not all instances of node as displayed in tree are updated
Summary: When change made to node, not all instances of node as displayed in tree are ...
Status: RESOLVED FIXED
Alias: None
Product: AMP
Classification: Modeling
Component: AMF UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Miles Parker CLA
QA Contact: Miles Parker CLA
URL:
Whiteboard:
Keywords:
Depends on: 289896
Blocks:
  Show dependency tree
 
Reported: 2010-03-28 13:55 EDT by John T. Murphy CLA
Modified: 2010-05-27 01:35 EDT (History)
0 users

See Also:


Attachments
Image1: Shows changes to one set of nodes but not the other (131.91 KB, image/jpeg)
2010-03-28 13:57 EDT, John T. Murphy CLA
no flags Details
Image2: Tree for second version of bug, with non-matching nodes (147.08 KB, image/jpeg)
2010-03-28 13:59 EDT, John T. Murphy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John T. Murphy CLA 2010-03-28 13:55:44 EDT
Build Identifier: M20100211-1343

When editing an AMP model in the MetaABM editor, the node tree commonly displays multiple instances of a node that has multiple sources. When changes are made to the underlying node, however, they should be reflected in the display in all instances. This fails: a change made to the node can be visible in some instances and not reflected in other instances. This can lead to confusion: It is already difficult for naive users to see that the node, which can appear in multiple places, is actually only one instance of a target; proper behavior would be for changes to be reflected on all nodes simultaneously, reinforcing the underlying structure, but when this does not occur it appears that there are actually multiple nodes. The changes where I have seen this problem include changing the label in the properties window and adding targets. This only seems to occur when there are multiple upstream branches; often 2 instances of the node will be updated, but others (from a yet more distant branch) will not.

Reproducible: Always

Steps to Reproduce:
1. Create a new MetaABM project

2. Import the 'Epidemic' model

3. In the 'MetaABM Editor', expand the tree so that every branch of the 'Individual' 'Movement' node is visible, all the way to the end of all four apparent branches.

4. Click on one of the nodes labeled: "Movement (Status Different Dead Query & Status Different Symptom Infectious Query)"; note that there are two, but these should be two instances of the same node.

5. In the properties window, change the 'Label' for this to 'M1'. Observe that in the tree display both instances of the node have their labels updated.

6. Click on one of the (four) nodes labeled "Neighboring Location: Available Neighboring".

7. In the properties window, change the 'Label' for this from 'Neighboring Location' to 'N'. Note that two of the instances change, but the other (along the other branch) do not. This is true even though they are all instances of the same node.

Closing and re-opening the editor window resolves the issue.

Alternative:

To replicate, add the nodes that appear in the accompanying image (image2). As the final steps:

Add the 'New Location: New Location (Available() Query & Neighbor() Query)' node as a child of 'New Location: Available() Query'

Drag this node (using ctrl) to add (copy) it to the 'New Location: Neighbor() Query'.

Note that it appears in the upper instance (where the drag and drop took place) but not in the lower instance. This is not just because it is not expanded (note that there is no 'triangle'); it is not present in the display.
Comment 1 John T. Murphy CLA 2010-03-28 13:57:54 EDT
Created attachment 163185 [details]
Image1: Shows changes to one set of nodes but not the other

Note also that for the node that is selected the label is clearly 'N' in the Properties window but not in the tree display.
Comment 2 John T. Murphy CLA 2010-03-28 13:59:58 EDT
Created attachment 163186 [details]
Image2: Tree for second version of bug, with non-matching nodes

The new child node is visible in the upper instance of the New Location: Neighbor() query, but not in the lower one.
Comment 3 Miles Parker CLA 2010-03-29 17:11:46 EDT
Getting these updates to function properly has been the bane of my existence. While I can test for the proper updating of the data itself, there isn't currently a clean way to have a unit test for the visual update. Thanks for the detail -- I'll check into this, hopefully an easy fix.
Comment 4 Miles Parker CLA 2010-03-30 18:06:35 EDT
OK, I've spent enough of my lifetime playing around with item provider wrappers. So what I'm going to do is punt on this one in favor of a real solution to the issue.
Comment 5 Miles Parker CLA 2010-05-27 01:35:03 EDT
This *should* be fixed as a result of the other changes that were made to the tree editor. Please reopen if not.