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

Bug 322081

Summary: refactor Strings for Flags
Product: z_Archived Reporter: Frank Becker <eclipse>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: robert.elves, steffen.pingel
Version: unspecifiedFlags: eclipse: iplog-
Target Milestone: 3.5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch
none
mylyn/context/zip
none
commited patch
none
mylyn/context/zip
none
fix
none
comited junit patch
none
mylyn/context/zip none

Description Frank Becker CLA 2010-08-08 11:21:54 EDT
In more the 30 cases we use the String

*  task.common.kind.flag
*  task.common.kind.flag_type

we should use an static final field and change the String to no longer include "task.common"
Comment 1 Frank Becker CLA 2010-08-08 13:17:21 EDT
Created attachment 176115 [details]
patch

Rob,

can you please look into this.

I think we need the following steps to be save.

1) update the configuration
2) update all tasks
Comment 2 Frank Becker CLA 2010-08-08 13:17:24 EDT
Created attachment 176116 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-09-01 15:56:22 EDT
+1 for extracting it to a constant. I would leave the current value though. It shouldn't matter that it includes task.common as long as it's unique.
Comment 4 Frank Becker CLA 2010-09-02 17:40:17 EDT
Created attachment 178107 [details]
commited patch

constant includes task.common (see comment#3)
Comment 5 Frank Becker CLA 2010-09-02 17:40:19 EDT
Created attachment 178108 [details]
mylyn/context/zip
Comment 6 Frank Becker CLA 2010-09-02 17:40:55 EDT
Done!
Comment 7 Steffen Pingel CLA 2010-09-14 14:13:01 EDT
Created attachment 178860 [details]
fix
Comment 8 Steffen Pingel CLA 2010-09-14 14:19:55 EDT
Committed fix.
Comment 9 Steffen Pingel CLA 2010-09-14 20:00:56 EDT
I'll reopen this bug since one of the tests is still failing:

junit.framework.ComparisonFailure: flagA is set(wrong precondidion) expected:<[ ]> but was:<[+]>
	at org.eclipse.mylyn.bugzilla.tests.core.BugzillaFlagsTest.testFlags(BugzillaFlagsTest.java:83)
Comment 10 Frank Becker CLA 2010-09-18 11:12:53 EDT
Created attachment 179176 [details]
comited junit patch
Comment 11 Frank Becker CLA 2010-09-18 11:12:55 EDT
Created attachment 179177 [details]
mylyn/context/zip
Comment 12 Frank Becker CLA 2010-09-18 11:13:44 EDT
The more robust is now in place.