Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359149

Summary: OutlineNodeMoveActionHandler doesn't refresh if MasterDetailsContentNode's property is set
Product: z_Archived Reporter: Shenxue Zhou <shenxue.zhou>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: konstantin
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Shenxue Zhou CLA 2011-09-27 17:56:47 EDT
In content outline, when node-factory is added to a node and the node-factory's  <property> element is set, the "move-up", "move-down" actions on the corresponding list don't refresh when the list property is changed.

The root cause is inside OutlineNodeMoveActionHandler's init() method. It uses the following code to register a listener on the list property:

getPart().getParentPart().getModelElement().addListener( this.listPropertyListener );

Here, getPart().getParentPart() would return an instance of MasterDetailsContentNode which doesn't supply its own getModelElement(). So SapphirePart's getModelElement() will be used. In this case, it'll return the parent element which doesn't contain the list property.
Comment 1 Shenxue Zhou CLA 2011-09-27 18:48:21 EDT
Created attachment 204128 [details]
Fix
Comment 2 Konstantin Komissarchik CLA 2011-09-27 19:03:54 EDT
Looks good. Go ahead and commit it.
Comment 3 Konstantin Komissarchik CLA 2011-09-27 19:29:10 EDT
You must have gone home already. I will go ahead and commit this fix and you can verify.
Comment 4 Konstantin Komissarchik CLA 2011-09-27 19:36:56 EDT
Actually, the attached fix is only partially correct. The same change is needed during listener remove.

Fixed in 0.3.1 and 0.4 lines. Please verify.
Comment 5 Shenxue Zhou CLA 2011-09-28 11:59:04 EDT
Verified the fix. Closing.