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

Bug 329577

Summary: [editor] provide attribute editor for integer and double task attribute types
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.muskalla, robert.elves, steffen.pingel, thomas.ehrnhoefer
Version: unspecifiedKeywords: contributed
Target Milestone: 3.5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 332328    
Bug Blocks: 329664    
Attachments:
Description Flags
patch v1
none
mylyn/context/zip
none
patch v2 (depends on bug 332328)
steffen.pingel: iplog+, thomas.ehrnhoefer: review?
mylyn/context/zip none

Description Thomas Ehrnhoefer CLA 2010-11-05 14:18:26 EDT
Potentially add input validation with decorator.
Comment 1 Thomas Ehrnhoefer CLA 2010-12-09 19:18:53 EST
Created attachment 184916 [details]
patch v1

First try on an attribute editor along with a suggested integration in the framework
Let me know what you think of that Steffen
Comment 2 Thomas Ehrnhoefer CLA 2010-12-09 19:18:55 EST
Created attachment 184917 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-12-10 13:14:05 EST
Thanks Thomas. This looks promising. I have opened bug 332328 to track the API portion of the change. Once that is resolved I am happy to apply a patch based on the new API.
Comment 4 Thomas Ehrnhoefer CLA 2010-12-10 13:46:06 EST
Created attachment 184978 [details]
patch v2 (depends on bug 332328)

(depends on bug 332328)

includes fix for bug 329575 as well
Comment 5 Thomas Ehrnhoefer CLA 2010-12-10 13:46:07 EST
Created attachment 184979 [details]
mylyn/context/zip
Comment 6 Steffen Pingel CLA 2010-12-10 14:19:01 EST
Committed as part of bug 329575.

*** This bug has been marked as a duplicate of bug 329575 ***
Comment 7 Steffen Pingel CLA 2010-12-10 14:30:03 EST
On further review this needs a little bit more work. Values should be retrieved and modified through TaskAttributeMapper. 

I have added methods to support attributes of type double. Can you make the corresponding changes to the patch? You can use BooleanAttributeEditor.get/setValue() as a guideline.
Comment 8 Steffen Pingel CLA 2010-12-10 14:43:37 EST
On second thought, let's go with this patch. Otherwise, invalid value would be discarded on save. We might need to reconsider the current design in the future but generally I believe it's better to allow entering of invalid values and handle this on submit (bug 242430).