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

Bug 371010

Summary: [api] provide abstracted priority mapping
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 3.7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Thomas Ehrnhoefer CLA 2012-02-08 16:25:00 EST
Most connectors have a different number than 5 for priority options.
Some framework support for trying to map any ordered collection of priorities into those 5 buckets in Mylyn would be great. I assume lots of connectors implement something like this (most of them hardcoded), but also lots of connectors will have customizable options, so a generic approach seems like a good solution (of course with the connector being able to override that behaviour)
Comment 1 Steffen Pingel CLA 2012-02-08 16:34:19 EST
I'll look into extracting the code from the Trac connector to a reusable framework utility.
Comment 2 Steffen Pingel CLA 2012-02-11 08:42:18 EST
I have added PriorityLevel.fromValue() which returns a mapped value based on a list of priorities and a priority value.
Comment 3 Steffen Pingel CLA 2012-02-11 08:42:21 EST
Created attachment 210883 [details]
mylyn/context/zip