Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359149 - OutlineNodeMoveActionHandler doesn't refresh if MasterDetailsContentNode's property is set
Summary: OutlineNodeMoveActionHandler doesn't refresh if MasterDetailsContentNode's pr...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-27 17:56 EDT by Shenxue Zhou CLA
Modified: 2021-11-19 09:22 EST (History)
1 user (show)

See Also:


Attachments
Fix (1.12 KB, patch)
2011-09-27 18:48 EDT, Shenxue Zhou CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.