Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322081 - refactor Strings for Flags
Summary: refactor Strings for Flags
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: 3.5   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-08 11:21 EDT by Frank Becker CLA
Modified: 2011-01-13 23:04 EST (History)
2 users (show)

See Also:
eclipse: iplog-


Attachments
patch (21.71 KB, patch)
2010-08-08 13:17 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (10.25 KB, application/octet-stream)
2010-08-08 13:17 EDT, Frank Becker CLA
no flags Details
commited patch (20.74 KB, patch)
2010-09-02 17:40 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (7.53 KB, application/octet-stream)
2010-09-02 17:40 EDT, Frank Becker CLA
no flags Details
fix (1.28 KB, patch)
2010-09-14 14:13 EDT, Steffen Pingel CLA
no flags Details | Diff
comited junit patch (8.84 KB, patch)
2010-09-18 11:12 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (5.34 KB, application/octet-stream)
2010-09-18 11:12 EDT, Frank Becker CLA
no flags Details

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