Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352918 - attribute editors generate duplicate change event when task attribute changed
Summary: attribute editors generate duplicate change event when task attribute changed
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: 3.6.1   Edit
Assignee: Sam Davis CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 350561
  Show dependency tree
 
Reported: 2011-07-22 17:43 EDT by Sam Davis CLA
Modified: 2011-07-28 14:33 EDT (History)
0 users

See Also:
steffen.pingel: juno+


Attachments
fix (1.37 KB, patch)
2011-07-22 17:47 EDT, Sam Davis CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2011-07-22 17:43:36 EDT
When TextAttributeEditor or RichTextAttributeEditor are refresh()ed, they call attributeChanged. I'm not sure if any other attribute editors have this problem.
Comment 1 Sam Davis CLA 2011-07-22 17:47:51 EDT
Created attachment 200228 [details]
fix

This should fix it, unless there are any attribute editors that have this problem and call attributeChanged directly on the model.
Comment 2 Steffen Pingel CLA 2011-07-27 18:33:05 EDT
Thanks. We should fix this. Would you be able to include a test case?
Comment 3 Steffen Pingel CLA 2011-07-28 13:31:21 EDT
Attribute editors should not be invoking attributeChanged() unless a user interaction happens. TextAttributeEditor or RichTextAttributeEditor guard against that but LongTextEditor does not which caused bug 350561.

To fix it I have applied the patch to the master and e_3_7_m_3_6_x branches: c68c0975a0b613575a96faceb94adc8fd26e5afd. 

Thanks for looking into this Sam. Apparently, the previous API contract was too brittle (considering that the framework did not observe it correctly) and your patch helps to make this more robust and simpler to implement for clients.
Comment 4 Steffen Pingel CLA 2011-07-28 14:33:04 EDT
Marking resolved.