Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2008-12-15 18:48:20 -0500
committerrelves2008-12-15 18:48:20 -0500
commite891b7e68f45dcc92d1fa59bdf89f7b1a4d60b1c (patch)
treec6a14e63625202f68bc05fc4ab61dc722bf263bd
parentddd6517f7422a156147da8ebcce8270659a8506b (diff)
downloadorg.eclipse.mylyn.tasks-e891b7e68f45dcc92d1fa59bdf89f7b1a4d60b1c.tar.gz
org.eclipse.mylyn.tasks-e891b7e68f45dcc92d1fa59bdf89f7b1a4d60b1c.tar.xz
org.eclipse.mylyn.tasks-e891b7e68f45dcc92d1fa59bdf89f7b1a4d60b1c.zip
NEW - bug 253053: externalize strings for org.eclipse.mylyn.bugzilla.*
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253053
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.mylyn.bugzilla.core/build.properties3
-rw-r--r--org.eclipse.mylyn.bugzilla.core/plugin.properties3
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java163
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java18
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java376
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java36
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java12
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java16
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java20
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java81
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java18
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java20
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java200
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java7
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java251
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java64
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java94
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java44
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java16
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java30
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java16
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java31
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java52
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java46
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java14
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties118
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs4
43 files changed, 1116 insertions, 690 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs
index 1eece41c5..fa10b7532 100644
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Sat Sep 13 19:04:13 PDT 2008
+#Mon Dec 15 14:23:06 PST 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -41,7 +41,7 @@ org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.nullReference=error
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
diff --git a/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
index 230a409f4..1fde9c257 100644
--- a/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Mylyn Bugzilla Connector Core
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.core;singleton:=true
Bundle-Version: 3.1.0.qualifier
Bundle-Activator: org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin
@@ -10,8 +10,9 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
org.eclipse.core.net
Bundle-ActivationPolicy: lazy
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %Bundle-Vendor
Bundle-ClassPath: .
Export-Package: org.eclipse.mylyn.internal.bugzilla.core;x-friends:="org.eclipse.mylyn.bugzilla.ide,org.eclipse.mylyn.bugzilla.ui",
org.eclipse.mylyn.internal.bugzilla.core.history;x-friends:="org.eclipse.mylyn.bugzilla.ide,org.eclipse.mylyn.bugzilla.ui"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
diff --git a/org.eclipse.mylyn.bugzilla.core/build.properties b/org.eclipse.mylyn.bugzilla.core/build.properties
index 22200b3a4..0130a60da 100644
--- a/org.eclipse.mylyn.bugzilla.core/build.properties
+++ b/org.eclipse.mylyn.bugzilla.core/build.properties
@@ -9,7 +9,8 @@
bin.includes = META-INF/,\
about.html,\
.,\
- plugin.xml
+ plugin.xml,\
+ plugin.properties
src.includes = about.html
jre.compilation.profile = J2SE-1.5
source.. = src/
diff --git a/org.eclipse.mylyn.bugzilla.core/plugin.properties b/org.eclipse.mylyn.bugzilla.core/plugin.properties
new file mode 100644
index 000000000..25c80dfb6
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.core/plugin.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.mylyn.bugzilla.core
+Bundle-Vendor = Eclipse.org
+Bundle-Name = Mylyn Bugzilla Connector Core
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
index 1fdd5f740..73e9c51d5 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
@@ -100,7 +100,7 @@ public class AbstractReportFactory {
// currently, we just supply a dummy (empty) resource for
// each request...
InputSource source = new InputSource();
- source.setCharacterStream(new StringReader(""));
+ source.setCharacterStream(new StringReader("")); //$NON-NLS-1$
return source;
}
};
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java
index 21bd31475..304ee188a 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java
@@ -18,156 +18,168 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
*/
public enum BugzillaAttribute {
- STATUS_WHITEBOARD("Status Whiteboard:", "status_whiteboard", TaskAttribute.TYPE_LONG_RICH_TEXT, false, false),
+ STATUS_WHITEBOARD(Messages.BugzillaAttribute_Status_Whiteboard,
+ "status_whiteboard", TaskAttribute.TYPE_LONG_RICH_TEXT, false, false), //$NON-NLS-1$
- ACTUAL_TIME("Worked:", "actual_time", TaskAttribute.TYPE_SHORT_TEXT, true, true),
+ ACTUAL_TIME(Messages.BugzillaAttribute_Worked, "actual_time", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
- ADD_COMMENT("Additional Comments:", "comment", TaskAttribute.TYPE_LONG_TEXT, true, false),
+ ADD_COMMENT(Messages.BugzillaAttribute_Additional_Comments, "comment", TaskAttribute.TYPE_LONG_TEXT, true, false), //$NON-NLS-1$
- ASSIGNED_TO("Assigned to:", "assigned_to", TaskAttribute.TYPE_PERSON, true, true),
+ ASSIGNED_TO(Messages.BugzillaAttribute_Assigned_to, "assigned_to", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
- ASSIGNED_TO_NAME("Assigned to:", "assigned_to_name", TaskAttribute.TYPE_PERSON, true, true),
+ ASSIGNED_TO_NAME(Messages.BugzillaAttribute_Assigned_to_NAME,
+ "assigned_to_name", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
- ATTACHID("attachid", "attachid", TaskAttribute.TYPE_SHORT_TEXT, false, false),
+ ATTACHID(Messages.BugzillaAttribute_ATTACH_ID, "attachid", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
- ATTACHMENT("attachment", "attachment", TaskAttribute.TYPE_ATTACHMENT, false, false),
+ ATTACHMENT(Messages.BugzillaAttribute_attachment, "attachment", TaskAttribute.TYPE_ATTACHMENT, false, false), //$NON-NLS-1$
- BLOCKED("Blocks:", "blocked", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false),
+ BLOCKED(Messages.BugzillaAttribute_Blocks, "blocked", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false), //$NON-NLS-1$
- BUG("bug", "bug", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ BUG(Messages.BugzillaAttribute_bug, "bug", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- BUG_FILE_LOC("URL:", "bug_file_loc", TaskAttribute.TYPE_URL, false, false),
+ BUG_FILE_LOC(Messages.BugzillaAttribute_URL, "bug_file_loc", TaskAttribute.TYPE_URL, false, false), //$NON-NLS-1$
- BUG_ID("Bug:", "bug_id", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ BUG_ID(Messages.BugzillaAttribute_Bug_ID, "bug_id", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- BUG_SEVERITY("Severity:", "bug_severity", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
+ BUG_SEVERITY(Messages.BugzillaAttribute_Severity, "bug_severity", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
- BUG_STATUS("Status:", "bug_status", TaskAttribute.TYPE_SHORT_TEXT, true, true),
+ BUG_STATUS(Messages.BugzillaAttribute_Status, "bug_status", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
- BUG_WHEN("bug_when", "bug_when", TaskAttribute.TYPE_DATE, true, true),
+ BUG_WHEN(Messages.BugzillaAttribute_bug_when, "bug_when", TaskAttribute.TYPE_DATE, true, true), //$NON-NLS-1$
- BUGZILLA("bugzilla", "bugzilla", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ BUGZILLA(Messages.BugzillaAttribute_bugzilla, "bugzilla", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- CC("CC:", "cc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true),
+ CC(Messages.BugzillaAttribute_CC, "cc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true), //$NON-NLS-1$
- REMOVECC("Remove CC", "removecc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true),
+ REMOVECC(Messages.BugzillaAttribute_Remove_CC, "removecc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true), //$NON-NLS-1$
- CCLIST_ACCESSIBLE("CC List", "cclist_accessible", TaskAttribute.TYPE_BOOLEAN, true, false),
+ CCLIST_ACCESSIBLE(Messages.BugzillaAttribute_CC_List, "cclist_accessible", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
- CLASSIFICATION("Classification:", "classification", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ CLASSIFICATION(Messages.BugzillaAttribute_Classification,
+ "classification", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- CLASSIFICATION_ID("Classification ID:", "classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ CLASSIFICATION_ID(Messages.BugzillaAttribute_Classification_ID,
+ "classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- COMPONENT("Component:", "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
+ COMPONENT(Messages.BugzillaAttribute_Component, "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
- CREATION_TS("Opened:", "creation_ts", TaskAttribute.TYPE_DATE, true, false),
+ CREATION_TS(Messages.BugzillaAttribute_Opened, "creation_ts", TaskAttribute.TYPE_DATE, true, false), //$NON-NLS-1$
- CTYPE("Content Type", "ctype", TaskAttribute.TYPE_SHORT_TEXT, false, false),
+ CTYPE(Messages.BugzillaAttribute_Content_Type, "ctype", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
- DATA("data", "data", TaskAttribute.TYPE_SHORT_TEXT, false, false),
+ DATA(Messages.BugzillaAttribute_data, "data", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
- DATE("Date", "date", TaskAttribute.TYPE_DATE, false, false),
+ DATE(Messages.BugzillaAttribute_Date, "date", TaskAttribute.TYPE_DATE, false, false), //$NON-NLS-1$
- DEADLINE("Due:", "deadline", TaskAttribute.TYPE_DATE, true, false),
+ DEADLINE(Messages.BugzillaAttribute_Due, "deadline", TaskAttribute.TYPE_DATE, true, false), //$NON-NLS-1$
- DELTA_TS("Modified:", "delta_ts", TaskAttribute.TYPE_DATETIME, true, false),
+ DELTA_TS(Messages.BugzillaAttribute_Modified, "delta_ts", TaskAttribute.TYPE_DATE, true, false), //$NON-NLS-1$
- DEPENDSON("Depends on (Subtasks):", "dependson", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false),
+ DEPENDSON(Messages.BugzillaAttribute_Depends_on__Subtasks_,
+ "dependson", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false), //$NON-NLS-1$
- DESC("desc", "desc", TaskAttribute.TYPE_LONG_TEXT, true, true),
+ DESC(Messages.BugzillaAttribute_desc, "desc", TaskAttribute.TYPE_LONG_TEXT, true, true), //$NON-NLS-1$
- EVERCONFIRMED("everconfirmed", "everconfirmed", TaskAttribute.TYPE_BOOLEAN, true, false),
+ EVERCONFIRMED(Messages.BugzillaAttribute_everconfirmed, "everconfirmed", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
- ESTIMATED_TIME("Estimated Time:", "estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ ESTIMATED_TIME(Messages.BugzillaAttribute_Estimated_Time,
+ "estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- FILENAME("filename", "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false),
+ FILENAME(Messages.BugzillaAttribute_filename, "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
- FLAG("Flag:", "flag", null, false, false),
+ FLAG(Messages.BugzillaAttribute_flag, "flag", null, false, false), //$NON-NLS-1$
- GROUP("Group", "group", TaskAttribute.TYPE_BOOLEAN, true, true),
+ GROUP(Messages.BugzillaAttribute_Group, "group", TaskAttribute.TYPE_BOOLEAN, true, true), //$NON-NLS-1$
- IS_OBSOLETE("Obsolete", "isobsolete", TaskAttribute.TYPE_BOOLEAN, true, false),
+ IS_OBSOLETE(Messages.BugzillaAttribute_Obsolete, "isobsolete", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
- IS_PATCH("Patch", "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false),
+ IS_PATCH(Messages.BugzillaAttribute_Patch, "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
- KEYWORDS("Keywords:", "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false),
+ KEYWORDS(Messages.BugzillaAttribute_Keywords, "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false), //$NON-NLS-1$
- LONG_DESC("Description:", "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true),
+ LONG_DESC(Messages.BugzillaAttribute_Description, "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true), //$NON-NLS-1$
- LONGDESCLENGTH("Number of comments", "longdesclength", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ LONGDESCLENGTH(Messages.BugzillaAttribute_Number_of_comments,
+ "longdesclength", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- NEWCC("Add CC:", "newcc", TaskAttribute.TYPE_PERSON, true, false),
+ NEWCC(Messages.BugzillaAttribute_Add_CC, "newcc", TaskAttribute.TYPE_PERSON, true, false), //$NON-NLS-1$
- OP_SYS("OS:", "op_sys", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
+ OP_SYS(Messages.BugzillaAttribute_OS, "op_sys", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
- PRIORITY("Priority:", "priority", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
+ PRIORITY(Messages.BugzillaAttribute_Priority, "priority", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
- PRODUCT("Product:", "product", TaskAttribute.TYPE_SHORT_TEXT, false, true),
+ PRODUCT(Messages.BugzillaAttribute_Product, "product", TaskAttribute.TYPE_SHORT_TEXT, false, true), //$NON-NLS-1$
- REP_PLATFORM("Platform:", "rep_platform", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
+ REP_PLATFORM(Messages.BugzillaAttribute_Platform, "rep_platform", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
- REPORTER("Reporter:", "reporter", TaskAttribute.TYPE_PERSON, true, true),
+ REPORTER(Messages.BugzillaAttribute_Reporter, "reporter", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
- REPORTER_NAME("Reporter:", "reporter_name", TaskAttribute.TYPE_PERSON, true, true),
+ REPORTER_NAME(Messages.BugzillaAttribute_REPORT_NAME, "reporter_name", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
- REPORTER_ACCESSIBLE("Reporter", "reporter_accessible", TaskAttribute.TYPE_BOOLEAN, true, false),
+ REPORTER_ACCESSIBLE(Messages.BugzillaAttribute_REPORT_ACCESSIBLE, "reporter_accessible", //$NON-NLS-1$
+ TaskAttribute.TYPE_BOOLEAN, true, false),
- RESOLUTION("Resolution:", "resolution", TaskAttribute.TYPE_SHORT_TEXT, false, true),
+ RESOLUTION(Messages.BugzillaAttribute_Resolution, "resolution", TaskAttribute.TYPE_SHORT_TEXT, false, true), //$NON-NLS-1$
- REMAINING_TIME("Remaining:", "remaining_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ REMAINING_TIME(Messages.BugzillaAttribute_Remaining, "remaining_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- SET_DEFAULT_ASSIGNEE("Reset assignee to default", "set_default_assignee", TaskAttribute.TYPE_BOOLEAN, true, false),
+ SET_DEFAULT_ASSIGNEE(Messages.BugzillaAttribute_Reassign_to_default_assignee,
+ "set_default_assignee", TaskAttribute.TYPE_OPERATION, false, //$NON-NLS-1$
+ false),
- SHORT_DESC("Summary:", "short_desc", TaskAttribute.TYPE_SHORT_RICH_TEXT, true, false),
+ SHORT_DESC(Messages.BugzillaAttribute_Summary, "short_desc", TaskAttribute.TYPE_SHORT_RICH_TEXT, true, false), //$NON-NLS-1$
- SIZE("Size:", "size", TaskAttribute.TYPE_SHORT_TEXT, false, false),
+ SIZE(Messages.BugzillaAttribute_Size, "size", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
- TARGET_MILESTONE("Target milestone:", "target_milestone", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
+ TARGET_MILESTONE(Messages.BugzillaAttribute_Target_milestone,
+ "target_milestone", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
- THETEXT("thetext", "thetext", TaskAttribute.TYPE_SHORT_TEXT, false, true),
+ THETEXT(Messages.BugzillaAttribute_thetext, "thetext", TaskAttribute.TYPE_SHORT_TEXT, false, true), //$NON-NLS-1$
- TYPE("type", "type", TaskAttribute.TYPE_SHORT_TEXT, false, false),
+ TYPE(Messages.BugzillaAttribute_type, "type", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
- UNKNOWN("UNKNOWN", "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false),
+ UNKNOWN(Messages.BugzillaAttribute_UNKNOWN, "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
- VERSION("Version:", "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false),
+ VERSION(Messages.BugzillaAttribute_Version, "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
- INSTALL_VERSION("version of bugzilla installed", "install_version", null, true, false),
+ INSTALL_VERSION(Messages.BugzillaAttribute_version_of_bugzilla_installed, "install_version", null, true, false), //$NON-NLS-1$
- VOTES("Votes:", "votes", IBugzillaConstants.EDITOR_TYPE_VOTES, false, true),
+ VOTES(Messages.BugzillaAttribute_Votes, "votes", IBugzillaConstants.EDITOR_TYPE_VOTES, false, true), //$NON-NLS-1$
- WORK_TIME("Add:", "work_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),
+ WORK_TIME(Messages.BugzillaAttribute_Add, "work_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
- WHO("who", "who", TaskAttribute.TYPE_PERSON, false, false),
+ WHO(Messages.BugzillaAttribute_who, "who", TaskAttribute.TYPE_PERSON, false, false), //$NON-NLS-1$
- WHO_NAME("who_name", "who_name", TaskAttribute.TYPE_SHORT_TEXT, true, true),
+ WHO_NAME(Messages.BugzillaAttribute_who_name, "who_name", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
- QA_CONTACT("QA Contact", "qa_contact", TaskAttribute.TYPE_PERSON, true, false),
+ QA_CONTACT(Messages.BugzillaAttribute_QA_Contact, "qa_contact", TaskAttribute.TYPE_PERSON, true, false), //$NON-NLS-1$
- QA_CONTACT_NAME("QA Contact", "qa_contact_name", TaskAttribute.TYPE_SHORT_TEXT, true, true),
+ QA_CONTACT_NAME(Messages.BugzillaAttribute_QA_Contact_NAME,
+ "qa_contact_name", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
- ADDSELFCC("Add self to CC", "addselfcc", TaskAttribute.TYPE_BOOLEAN, false, false),
+ ADDSELFCC(Messages.BugzillaAttribute_Add_self_to_CC, "addselfcc", TaskAttribute.TYPE_BOOLEAN, false, false), //$NON-NLS-1$
- STATUS_OPEN("open status values", "status_open", null, true, true),
+ STATUS_OPEN(Messages.BugzillaAttribute_open_status_values, "status_open", null, true, true), //$NON-NLS-1$
- NEW_COMMENT("new comment", "new_comment", TaskAttribute.TYPE_LONG_RICH_TEXT, true, false),
+ NEW_COMMENT(Messages.BugzillaAttribute_new_comment, "new_comment", TaskAttribute.TYPE_LONG_RICH_TEXT, true, false), //$NON-NLS-1$
// Used by search engine
- LI("used by search engine", "li", null, true, false),
+ LI(Messages.BugzillaAttribute_used_by_search_engine_li, "li", null, true, false), //$NON-NLS-1$
- ID("used by search engine", "id", null, true, false),
+ ID(Messages.BugzillaAttribute_used_by_search_engine_id, "id", null, true, false), //$NON-NLS-1$
- SHORT_SHORT_DESC("used by search engine", "short_short_desc", null, false, false),
+ SHORT_SHORT_DESC(Messages.BugzillaAttribute_used_by_search_engine_desc, "short_short_desc", null, false, false), //$NON-NLS-1$
- SEQ("used by search engine", "seq", null, false, false),
+ SEQ(Messages.BugzillaAttribute_used_by_search_engine_seq, "seq", null, false, false), //$NON-NLS-1$
- RESULT("used by search engine", "result", null, false, false),
+ RESULT(Messages.BugzillaAttribute_used_by_search_engine_result, "result", null, false, false), //$NON-NLS-1$
- RDF("used by search engine", "rdf", null, false, false),
+ RDF(Messages.BugzillaAttribute_used_by_search_engine_rdf, "rdf", null, false, false), //$NON-NLS-1$
- INSTALLATION("used by search engine", "installation", null, false, false),
+ INSTALLATION(Messages.BugzillaAttribute_used_by_search_engine_installation, "installation", null, false, false), //$NON-NLS-1$
- BUGS("used by search engine", "bugs", null, false, false);
+ BUGS(Messages.BugzillaAttribute_used_by_search_engine_bugs, "bugs", null, false, false); //$NON-NLS-1$
private final boolean isHidden;
@@ -201,6 +213,7 @@ public enum BugzillaAttribute {
return isReadOnly;
}
+ @Override
public String toString() {
return prettyName;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java
index 1ac5d28af..0e8705236 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java
@@ -29,11 +29,11 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
*/
public class BugzillaAttributeMapper extends TaskAttributeMapper {
- private static final String DATE_FORMAT_1 = "yyyy-MM-dd HH:mm";
+ private static final String DATE_FORMAT_1 = "yyyy-MM-dd HH:mm"; //$NON-NLS-1$
- private static final String DATE_FORMAT_2 = "yyyy-MM-dd HH:mm:ss";
+ private static final String DATE_FORMAT_2 = "yyyy-MM-dd HH:mm:ss"; //$NON-NLS-1$
- private static final String DATE_FORMAT_3 = "yyyy-MM-dd";
+ private static final String DATE_FORMAT_3 = "yyyy-MM-dd"; //$NON-NLS-1$
private static final String delta_ts_format = DATE_FORMAT_2;
@@ -71,7 +71,7 @@ public class BugzillaAttributeMapper extends TaskAttributeMapper {
@Override
public boolean getBooleanValue(TaskAttribute attribute) {
- if (attribute.getValue().equals("1")) {
+ if (attribute.getValue().equals("1")) { //$NON-NLS-1$
return true;
} else {
return false;
@@ -81,11 +81,11 @@ public class BugzillaAttributeMapper extends TaskAttributeMapper {
@Override
public void setBooleanValue(TaskAttribute attribute, Boolean value) {
if (value == null) {
- attribute.setValue("0");
+ attribute.setValue("0"); //$NON-NLS-1$
} else if (value) {
- attribute.setValue("1");
+ attribute.setValue("1"); //$NON-NLS-1$
} else {
- attribute.setValue("0");
+ attribute.setValue("0"); //$NON-NLS-1$
}
}
@@ -263,8 +263,8 @@ public class BugzillaAttributeMapper extends TaskAttributeMapper {
// DUPLICATE and MOVED have special meanings so do not show as resolution
// TODO: COPIED FUNCTIONALITY from RepositoryConfiguration.addOperation() refactor.
if (options != null) {
- options.remove("DUPLICATE");
- options.remove("MOVED");
+ options.remove("DUPLICATE"); //$NON-NLS-1$
+ options.remove("MOVED"); //$NON-NLS-1$
}
}
Map<String, String> newOptions = new LinkedHashMap<String, String>();
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
index b9aa3cd80..36793471e 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
@@ -88,70 +88,63 @@ import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
*/
public class BugzillaClient {
- private static final String COOKIE_BUGZILLA_LOGIN = "Bugzilla_login";
+ private static final String COOKIE_BUGZILLA_LOGIN = "Bugzilla_login"; //$NON-NLS-1$
- protected static final String USER_AGENT = "BugzillaConnector";
+ protected static final String USER_AGENT = "BugzillaConnector"; //$NON-NLS-1$
private static final int MAX_RETRIEVED_PER_QUERY = 100;
- private static final String QUERY_DELIMITER = "?";
+ private static final String QUERY_DELIMITER = "?"; //$NON-NLS-1$
- private static final String KEY_ID = "id";
+ private static final String KEY_ID = "id"; //$NON-NLS-1$
- private static final String VAL_TRUE = "true";
+ private static final String VAL_TRUE = "true"; //$NON-NLS-1$
- private static final String KEY_CC = "cc";
+ private static final String KEY_CC = "cc"; //$NON-NLS-1$
- private static final String POST_BUG_CGI = "/post_bug.cgi";
+ private static final String POST_BUG_CGI = "/post_bug.cgi"; //$NON-NLS-1$
- private static final String PROCESS_BUG_CGI = "/process_bug.cgi";
+ private static final String PROCESS_BUG_CGI = "/process_bug.cgi"; //$NON-NLS-1$
- private static final String PROCESS_ATTACHMENT_CGI = "/attachment.cgi";
+ private static final String PROCESS_ATTACHMENT_CGI = "/attachment.cgi"; //$NON-NLS-1$
public static final int WRAP_LENGTH = 80;
- private static final String VAL_PROCESS_BUG = "process_bug";
+ private static final String VAL_PROCESS_BUG = "process_bug"; //$NON-NLS-1$
- private static final String KEY_FORM_NAME = "form_name";
+ private static final String KEY_FORM_NAME = "form_name"; //$NON-NLS-1$
- private static final String VAL_NONE = "none";
+ private static final String VAL_NONE = "none"; //$NON-NLS-1$
- private static final String KEY_KNOB = "knob";
+ private static final String KEY_KNOB = "knob"; //$NON-NLS-1$
// TODO change to BugzillaReportElement.ADD_COMMENT
- private static final String KEY_COMMENT = "comment";
+ private static final String KEY_COMMENT = "comment"; //$NON-NLS-1$
- private static final String KEY_SHORT_DESC = "short_desc";
+ private static final String KEY_SHORT_DESC = "short_desc"; //$NON-NLS-1$
- // Pages with this string in the html occur when login is required
- //private static final String LOGIN_REQUIRED = "goaheadandlogin=1";
+ private static final String VALUE_CONTENTTYPEMETHOD_MANUAL = "manual"; //$NON-NLS-1$
- private static final String VALUE_CONTENTTYPEMETHOD_MANUAL = "manual";
+ private static final String VALUE_ISPATCH = "1"; //$NON-NLS-1$
- private static final String VALUE_ISPATCH = "1";
+ private static final String VALUE_ACTION_INSERT = "insert"; //$NON-NLS-1$
- private static final String VALUE_ACTION_INSERT = "insert";
+ private static final String ATTRIBUTE_CONTENTTYPEENTRY = "contenttypeentry"; //$NON-NLS-1$
- private static final String ATTRIBUTE_CONTENTTYPEENTRY = "contenttypeentry";
+ private static final String ATTRIBUTE_CONTENTTYPEMETHOD = "contenttypemethod"; //$NON-NLS-1$
- private static final String ATTRIBUTE_CONTENTTYPEMETHOD = "contenttypemethod";
+ private static final String ATTRIBUTE_ISPATCH = "ispatch"; //$NON-NLS-1$
- private static final String ATTRIBUTE_ISPATCH = "ispatch";
+ private static final String CONTENT_TYPE_APP_RDF_XML = "application/rdf+xml"; //$NON-NLS-1$
- // private static final String CONTENT_TYPE_TEXT_HTML = "text/html";
+ private static final String CONTENT_TYPE_APP_XML = "application/xml"; //$NON-NLS-1$
- // private static final String CONTENT_TYPE_APP_XCGI = "application/x-cgi";
-
- private static final String CONTENT_TYPE_APP_RDF_XML = "application/rdf+xml";
-
- private static final String CONTENT_TYPE_APP_XML = "application/xml";
-
- private static final String CONTENT_TYPE_TEXT_XML = "text/xml";
+ private static final String CONTENT_TYPE_TEXT_XML = "text/xml"; //$NON-NLS-1$
private static final String[] VALID_CONFIG_CONTENT_TYPES = { CONTENT_TYPE_APP_RDF_XML, CONTENT_TYPE_APP_XML,
CONTENT_TYPE_TEXT_XML };
- private static final String ATTR_CHARSET = "charset";
+ private static final String ATTR_CHARSET = "charset"; //$NON-NLS-1$
protected Proxy proxy = Proxy.NO_PROXY;
@@ -200,7 +193,7 @@ public class BugzillaClient {
GzipGetMethod method = null;
try {
logout(monitor);
- method = getConnect(repositoryUrl + "/", monitor);
+ method = getConnect(repositoryUrl + "/", monitor); //$NON-NLS-1$
} finally {
if (method != null) {
method.releaseConnection();
@@ -253,11 +246,11 @@ public class BugzillaClient {
getMethod.setQueryString(requestURL.substring(requestURL.indexOf(QUERY_DELIMITER)));
}
- getMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset="
+ getMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" //$NON-NLS-1$ //$NON-NLS-2$
+ characterEncoding);
// Resolves bug#195113
- httpClient.getParams().setParameter("http.protocol.single-cookie-header", true);
+ httpClient.getParams().setParameter("http.protocol.single-cookie-header", true); //$NON-NLS-1$
// WARNING!! Setting browser compatibility breaks Bugzilla
// authentication
@@ -290,24 +283,24 @@ public class BugzillaClient {
getMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
+ "Proxy authentication required")); //$NON-NLS-1$
} else {
getMethod.getResponseBodyNoop();
getMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code)));
+ RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code))); //$NON-NLS-1$
}
}
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString()
- + " failed. Please verify connection and authentication information."));
+ RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString() //$NON-NLS-1$
+ + " failed. Please verify connection and authentication information.")); //$NON-NLS-1$
}
public void logout(IProgressMonitor monitor) throws IOException, CoreException {
monitor = Policy.monitorFor(monitor);
authenticated = true;
- String loginUrl = repositoryUrl + "/relogin.cgi";
+ String loginUrl = repositoryUrl + "/relogin.cgi"; //$NON-NLS-1$
GzipGetMethod method = null;
try {
method = getConnect(loginUrl, monitor);
@@ -330,13 +323,13 @@ public class BugzillaClient {
private boolean isZippedReply(HttpMethodBase method) {
// content-encoding:gzip can be set by a dedicated perl script or mod_gzip
- boolean zipped = (null != method.getResponseHeader("Content-encoding") && method.getResponseHeader(
- "Content-encoding").getValue().equals(IBugzillaConstants.CONTENT_ENCODING_GZIP))
+ boolean zipped = (null != method.getResponseHeader("Content-encoding") && method.getResponseHeader( //$NON-NLS-1$
+ "Content-encoding").getValue().equals(IBugzillaConstants.CONTENT_ENCODING_GZIP)) //$NON-NLS-1$
||
// content-type: application/x-gzip can be set by any apache after 302 redirect, based on .gz suffix
- (null != method.getResponseHeader("Content-Type") && method.getResponseHeader("Content-Type")
+ (null != method.getResponseHeader("Content-Type") && method.getResponseHeader("Content-Type") //$NON-NLS-1$ //$NON-NLS-2$
.getValue()
- .equals("application/x-gzip"));
+ .equals("application/x-gzip")); //$NON-NLS-1$
return zipped;
}
@@ -346,7 +339,7 @@ public class BugzillaClient {
authenticated = false;
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Authentication credentials missing."));
+ "Authentication credentials missing.")); //$NON-NLS-1$
}
GzipPostMethod postMethod = null;
@@ -362,7 +355,7 @@ public class BugzillaClient {
postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl.toString()
+ IBugzillaConstants.URL_POST_LOGIN), true);
- postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset="
+ postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" //$NON-NLS-1$ //$NON-NLS-2$
+ characterEncoding);
postMethod.setRequestBody(formData);
@@ -384,7 +377,7 @@ public class BugzillaClient {
postMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "HTTP authentication failed."));
+ "HTTP authentication failed.")); //$NON-NLS-1$
} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
authenticated = false;
@@ -392,14 +385,14 @@ public class BugzillaClient {
postMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
+ "Proxy authentication required")); //$NON-NLS-1$
} else if (code != HttpURLConnection.HTTP_OK) {
authenticated = false;
postMethod.getResponseBodyNoop();
postMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code)));
+ RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code))); //$NON-NLS-1$
}
if (hasAuthenticationCredentials()) {
@@ -445,12 +438,12 @@ public class BugzillaClient {
List<NameValuePair> pairs = new ArrayList<NameValuePair>();
if (start != -1) {
queryUrl = queryUrl.substring(start + 1);
- String[] result = queryUrl.split("&");
+ String[] result = queryUrl.split("&"); //$NON-NLS-1$
if (result.length > 0) {
for (String string : result) {
- String[] nameValue = string.split("=");
+ String[] nameValue = string.split("="); //$NON-NLS-1$
if (nameValue.length == 1) {
- pairs.add(new NameValuePair(nameValue[0].trim(), ""));
+ pairs.add(new NameValuePair(nameValue[0].trim(), "")); //$NON-NLS-1$
} else if (nameValue.length == 2 && nameValue[0] != null && nameValue[1] != null) {
pairs.add(new NameValuePair(nameValue[0].trim(), URLDecoder.decode(nameValue[1].trim(),
characterEncoding)));
@@ -459,7 +452,7 @@ public class BugzillaClient {
}
}
- NameValuePair ctypePair = new NameValuePair("ctype", "rdf");
+ NameValuePair ctypePair = new NameValuePair("ctype", "rdf"); //$NON-NLS-1$ //$NON-NLS-2$
// Test that we don't specify content type twice.
if (!pairs.contains(ctypePair)) {
pairs.add(ctypePair);
@@ -467,8 +460,8 @@ public class BugzillaClient {
postMethod = postFormData(IBugzillaConstants.URL_BUGLIST, pairs.toArray(new NameValuePair[pairs.size()]),
monitor);
- if (postMethod.getResponseHeader("Content-Type") != null) {
- Header responseTypeHeader = postMethod.getResponseHeader("Content-Type");
+ if (postMethod.getResponseHeader("Content-Type") != null) { //$NON-NLS-1$
+ Header responseTypeHeader = postMethod.getResponseHeader("Content-Type"); //$NON-NLS-1$
for (String type : VALID_CONFIG_CONTENT_TYPES) {
if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
InputStream stream = getResponseStream(postMethod, monitor);
@@ -525,7 +518,7 @@ public class BugzillaClient {
public static String getCharsetFromString(String string) {
int charsetStartIndex = string.indexOf(ATTR_CHARSET);
if (charsetStartIndex != -1) {
- int charsetEndIndex = string.indexOf("\"", charsetStartIndex); // TODO:
+ int charsetEndIndex = string.indexOf("\"", charsetStartIndex); // TODO: //$NON-NLS-1$
// could
// be
// space
@@ -551,13 +544,13 @@ public class BugzillaClient {
// provide a solution for bug 196056 by allowing a (cached) gzipped configuration to be sent
// modified to also accept "application/x-gzip" as results from a 302 redirect to a previously gzipped file.
if (method == null) {
- throw new IOException("Could not retrieve configuratoin. HttpClient return null method.");
+ throw new IOException("Could not retrieve configuratoin. HttpClient return null method."); //$NON-NLS-1$
}
InputStream stream = getResponseStream(method, monitor);
try {
- if (method.getResponseHeader("Content-Type") != null) {
- Header responseTypeHeader = method.getResponseHeader("Content-Type");
+ if (method.getResponseHeader("Content-Type") != null) { //$NON-NLS-1$
+ Header responseTypeHeader = method.getResponseHeader("Content-Type"); //$NON-NLS-1$
for (String type : VALID_CONFIG_CONTENT_TYPES) {
if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
RepositoryConfigurationFactory configFactory = new RepositoryConfigurationFactory(
@@ -577,7 +570,7 @@ public class BugzillaClient {
} else {
throw new CoreException(
new Status(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to retrieve repository configuration. Ensure credentials are valid."));
+ "Unable to retrieve repository configuration. Ensure credentials are valid.")); //$NON-NLS-1$
}
}
}
@@ -653,7 +646,7 @@ public class BugzillaClient {
Assert.isNotNull(contentType);
if (description == null) {
throw new CoreException(new Status(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- "A description is required when submitting attachments."));
+ Messages.BugzillaClient_description_required_when_submitting_attachments));
}
hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
@@ -696,13 +689,13 @@ public class BugzillaClient {
Iterator<TaskAttribute> itr = attributes.iterator();
while (itr.hasNext()) {
TaskAttribute a = itr.next();
- if (a.getId().startsWith("task.common.kind.flag_type")) {
+ if (a.getId().startsWith("task.common.kind.flag_type")) { //$NON-NLS-1$
List<BugzillaFlag> flags = repositoryConfiguration.getFlags();
- TaskAttribute requestee = a.getAttribute("requestee");
- a = a.getAttribute("state");
+ TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
+ a = a.getAttribute("state"); //$NON-NLS-1$
String value = a.getValue();
- String id = "";
- if (value.equals(" ")) {
+ String id = ""; //$NON-NLS-1$
+ if (value.equals(" ")) { //$NON-NLS-1$
continue;
}
String flagname = a.getMetaData().getLabel();
@@ -715,28 +708,28 @@ public class BugzillaClient {
}
if (theFlag != null) {
int flagTypeNumber = theFlag.getFlagId();
- id = "flag_type-" + flagTypeNumber;
+ id = "flag_type-" + flagTypeNumber; //$NON-NLS-1$
value = a.getValue();
- if (value.equals("?") && requestee != null) {
- parts.add(new StringPart("requestee_type-" + flagTypeNumber,
- requestee.getValue() != null ? requestee.getValue() : ""));
+ if (value.equals("?") && requestee != null) { //$NON-NLS-1$
+ parts.add(new StringPart("requestee_type-" + flagTypeNumber, //$NON-NLS-1$
+ requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
}
}
- parts.add(new StringPart(id, value != null ? value : ""));
- } else if (a.getId().startsWith("task.common.kind.flag")) {
- TaskAttribute flagnumber = a.getAttribute("number");
- TaskAttribute requestee = a.getAttribute("requestee");
- a = a.getAttribute("state");
- String id = "flag-" + flagnumber.getValue();
+ parts.add(new StringPart(id, value != null ? value : "")); //$NON-NLS-1$
+ } else if (a.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
+ TaskAttribute flagnumber = a.getAttribute("number"); //$NON-NLS-1$
+ TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
+ a = a.getAttribute("state"); //$NON-NLS-1$
+ String id = "flag-" + flagnumber.getValue(); //$NON-NLS-1$
String value = a.getValue();
- if (value.equals(" ")) {
- value = "X";
+ if (value.equals(" ")) { //$NON-NLS-1$
+ value = "X"; //$NON-NLS-1$
}
- if (value.equals("?") && requestee != null) {
- parts.add(new StringPart("requestee-" + flagnumber.getValue(),
- requestee.getValue() != null ? requestee.getValue() : ""));
+ if (value.equals("?") && requestee != null) { //$NON-NLS-1$
+ parts.add(new StringPart("requestee-" + flagnumber.getValue(), //$NON-NLS-1$
+ requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
}
- parts.add(new StringPart(id, value != null ? value : ""));
+ parts.add(new StringPart(id, value != null ? value : "")); //$NON-NLS-1$
}
}
}
@@ -754,7 +747,7 @@ public class BugzillaClient {
} else {
postMethod.getResponseBodyNoop();
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, repositoryUrl.toString(), "Http error: "
+ RepositoryStatus.ERROR_NETWORK, repositoryUrl.toString(), "Http error: " //$NON-NLS-1$
+ HttpStatus.getStatusText(status)));
// throw new IOException("Communication error occurred during
// upload. \n\n"
@@ -783,7 +776,7 @@ public class BugzillaClient {
}
postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl.toString() + formUrl), true);
- postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" + characterEncoding);
+ postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" + characterEncoding); //$NON-NLS-1$ //$NON-NLS-2$
httpClient.getHttpConnectionManager().getParams().setSoTimeout(WebUtil.getConnectionTimeout());
@@ -800,7 +793,7 @@ public class BugzillaClient {
//StatusManager.log("Post failed: " + HttpStatus.getStatusText(status), this);
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_IO, repositoryUrl.toString(), new IOException(
- "Communication error occurred during upload. \n\n" + HttpStatus.getStatusText(status))));
+ "Communication error occurred during upload. \n\n" + HttpStatus.getStatusText(status)))); //$NON-NLS-1$
// throw new IOException("Communication error occurred during upload. \n\n" + HttpStatus.getStatusText(status));
}
@@ -811,33 +804,33 @@ public class BugzillaClient {
List<NameValuePair> formData = new ArrayList<NameValuePair>(5);
boolean existingBugPosted = false;
- formData.add(new NameValuePair("action", action));
- formData.add(new NameValuePair("contenttypemethod", "manual"));
+ formData.add(new NameValuePair("action", action)); //$NON-NLS-1$
+ formData.add(new NameValuePair("contenttypemethod", "manual")); //$NON-NLS-1$ //$NON-NLS-2$
- formData.add(new NameValuePair("id", taskAttribute.getValue()));
+ formData.add(new NameValuePair("id", taskAttribute.getValue())); //$NON-NLS-1$
Collection<TaskAttribute> attributes = taskAttribute.getAttributes().values();
Iterator<TaskAttribute> itr = attributes.iterator();
while (itr.hasNext()) {
TaskAttribute a = itr.next();
String id = a.getId();
String value = a.getValue();
- if (id.equals(TaskAttribute.ATTACHMENT_AUTHOR) || id.equals("date") || id.equals("size")
+ if (id.equals(TaskAttribute.ATTACHMENT_AUTHOR) || id.equals("date") || id.equals("size") //$NON-NLS-1$ //$NON-NLS-2$
|| id.equals(TaskAttribute.ATTACHMENT_URL)) {
continue;
}
- if (id.equals("desc")) {
- id = "description";
+ if (id.equals("desc")) { //$NON-NLS-1$
+ id = "description"; //$NON-NLS-1$
}
- if (id.equals("ctype")) {
- id = "contenttypeentry";
+ if (id.equals("ctype")) { //$NON-NLS-1$
+ id = "contenttypeentry"; //$NON-NLS-1$
}
if (id.equals(TaskAttribute.ATTACHMENT_IS_DEPRECATED)) {
- id = "isobsolete";
+ id = "isobsolete"; //$NON-NLS-1$
}
if (id.equals(TaskAttribute.ATTACHMENT_IS_PATCH)) {
- id = "ispatch";
+ id = "ispatch"; //$NON-NLS-1$
}
formData.add(new NameValuePair(id, value));
}
@@ -847,7 +840,7 @@ public class BugzillaClient {
method = postFormData(PROCESS_ATTACHMENT_CGI, formData.toArray(new NameValuePair[formData.size()]), monitor);
if (method == null) {
- throw new IOException("Could not post form, client returned null method.");
+ throw new IOException(Messages.BugzillaClient_could_not_post_form_null_returned);
}
input = getResponseStream(method, monitor);
@@ -859,7 +852,7 @@ public class BugzillaClient {
HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
boolean isTitle = false;
- String title = "";
+ String title = ""; //$NON-NLS-1$
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
@@ -872,7 +865,7 @@ public class BugzillaClient {
if (isTitle) {
// get all of the data in the title tag
if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " ";
+ title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " "; //$NON-NLS-1$
continue;
} else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
&& ((HtmlTag) token.getValue()).isEndTag()) {
@@ -890,7 +883,8 @@ public class BugzillaClient {
} catch (Exception e) {
authenticated = false;
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
+ RepositoryStatus.ERROR_INTERNAL, Messages.BugzillaClient_unable_to_parse_resonse_from
+ + repositoryUrl.toString() + ".")); //$NON-NLS-1$
} finally {
if (input != null) {
input.close();
@@ -902,7 +896,7 @@ public class BugzillaClient {
if (!existingBugPosted) {
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_REPOSITORY, repositoryUrl.toString(),
- "Unable to submit update of Attachment"));
+ Messages.BugzillaClient_unable_to_submit_attachment_update));
}
}
@@ -937,7 +931,7 @@ public class BugzillaClient {
}
if (method == null) {
- throw new IOException("Could not post form, client returned null method.");
+ throw new IOException("Could not post form, client returned null method."); //$NON-NLS-1$
}
input = getResponseStream(method, monitor);
@@ -950,7 +944,7 @@ public class BugzillaClient {
boolean existingBugPosted = false;
boolean isTitle = false;
- String title = "";
+ String title = ""; //$NON-NLS-1$
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
@@ -963,7 +957,7 @@ public class BugzillaClient {
if (isTitle) {
// get all of the data in the title tag
if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " ";
+ title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " "; //$NON-NLS-1$
continue;
} else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
&& ((HtmlTag) token.getValue()).isEndTag()) {
@@ -1025,7 +1019,7 @@ public class BugzillaClient {
} catch (ParseException e) {
authenticated = false;
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
+ RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + ".")); //$NON-NLS-1$ //$NON-NLS-2$
} finally {
if (input != null) {
input.close();
@@ -1046,7 +1040,7 @@ public class BugzillaClient {
Iterator<TaskAttribute> itr = attributes.iterator();
while (itr.hasNext()) {
TaskAttribute a = itr.next();
- if (a != null && a.getId() != null && a.getId().compareTo("") != 0) {
+ if (a != null && a.getId() != null && a.getId().compareTo("") != 0) { //$NON-NLS-1$
String value = null;
value = a.getValue();
if (value == null) {
@@ -1072,15 +1066,15 @@ public class BugzillaClient {
}
TaskAttribute descAttribute = taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION);
- if (descAttribute != null && !descAttribute.getValue().equals("")) {
+ if (descAttribute != null && !descAttribute.getValue().equals("")) { //$NON-NLS-1$
String bugzillaVersion = null;
if (repositoryConfiguration != null) {
bugzillaVersion = repositoryConfiguration.getInstallVersion();
} else {
- bugzillaVersion = "2.18";
+ bugzillaVersion = "2.18"; //$NON-NLS-1$
}
- if (bugzillaVersion.startsWith("2.18")) {
+ if (bugzillaVersion.startsWith("2.18")) { //$NON-NLS-1$
fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, formatTextToLineWrap(descAttribute.getValue(),
true)));
} else {
@@ -1099,9 +1093,9 @@ public class BugzillaClient {
}
private void cleanIfShortLogin(TaskAttribute a) {
- if ("true".equals(configParameters.get(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN))) {
+ if ("true".equals(configParameters.get(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN))) { //$NON-NLS-1$
if (a.getValue() != null && a.getValue().length() > 0) {
- int atIndex = a.getValue().indexOf("@");
+ int atIndex = a.getValue().indexOf("@"); //$NON-NLS-1$
if (atIndex != -1) {
String newValue = a.getValue().substring(0, atIndex);
a.setValue(newValue);
@@ -1138,9 +1132,9 @@ public class BugzillaClient {
if (repositoryConfiguration != null) {
bugzillaVersion = repositoryConfiguration.getInstallVersion();
} else {
- bugzillaVersion = "2.18";
+ bugzillaVersion = "2.18"; //$NON-NLS-1$
}
- if (bugzillaVersion.startsWith("2.18")) {
+ if (bugzillaVersion.startsWith("2.18")) { //$NON-NLS-1$
a.setValue(formatTextToLineWrap(a.getValue(), true));
}
}
@@ -1152,20 +1146,20 @@ public class BugzillaClient {
List<String> values = a.getValues();
int i = 0;
for (String string : values) {
- fields.put(a.getId() + i++, new NameValuePair(a.getId(), string != null ? string : ""));
+ fields.put(a.getId() + i++, new NameValuePair(a.getId(), string != null ? string : "")); //$NON-NLS-1$
}
- } else if (a.getId() != null && a.getId().compareTo("") != 0) {
+ } else if (a.getId() != null && a.getId().compareTo("") != 0) {//$NON-NLS-1$
String id = a.getId();
String value = a.getValue();
if (a.getId().equals(BugzillaAttribute.DELTA_TS.getKey())) {
value = stripTimeZone(value);
}
- if (a.getId().startsWith("task.common.kind.flag_type")) {
+ if (a.getId().startsWith("task.common.kind.flag_type")) { //$NON-NLS-1$
List<BugzillaFlag> flags = repositoryConfiguration.getFlags();
- TaskAttribute requestee = a.getAttribute("requestee");
- a = a.getAttribute("state");
+ TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
+ a = a.getAttribute("state"); //$NON-NLS-1$
value = a.getValue();
- if (value.equals(" ")) {
+ if (value.equals(" ")) { //$NON-NLS-1$
continue;
}
String flagname = a.getMetaData().getLabel();
@@ -1178,28 +1172,28 @@ public class BugzillaClient {
}
if (theFlag != null) {
int flagTypeNumber = theFlag.getFlagId();
- id = "flag_type-" + flagTypeNumber;
+ id = "flag_type-" + flagTypeNumber; //$NON-NLS-1$
value = a.getValue();
- if (value.equals("?") && requestee != null) {
- fields.put("requestee_type-" + flagTypeNumber, new NameValuePair("requestee_type-"
- + flagTypeNumber, requestee.getValue() != null ? requestee.getValue() : ""));
+ if (value.equals("?") && requestee != null) { //$NON-NLS-1$
+ fields.put("requestee_type-" + flagTypeNumber, new NameValuePair("requestee_type-" //$NON-NLS-1$ //$NON-NLS-2$
+ + flagTypeNumber, requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
}
}
- } else if (a.getId().startsWith("task.common.kind.flag")) {
- TaskAttribute flagnumber = a.getAttribute("number");
- TaskAttribute requestee = a.getAttribute("requestee");
- a = a.getAttribute("state");
- id = "flag-" + flagnumber.getValue();
+ } else if (a.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
+ TaskAttribute flagnumber = a.getAttribute("number"); //$NON-NLS-1$
+ TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
+ a = a.getAttribute("state"); //$NON-NLS-1$
+ id = "flag-" + flagnumber.getValue(); //$NON-NLS-1$
value = a.getValue();
- if (value.equals(" ")) {
- value = "X";
+ if (value.equals(" ")) { //$NON-NLS-1$
+ value = "X"; //$NON-NLS-1$
}
- if (value.equals("?") && requestee != null) {
- fields.put("requestee-" + flagnumber.getValue(), new NameValuePair("requestee-"
- + flagnumber.getValue(), requestee.getValue() != null ? requestee.getValue() : ""));
+ if (value.equals("?") && requestee != null) { //$NON-NLS-1$
+ fields.put("requestee-" + flagnumber.getValue(), new NameValuePair("requestee-" //$NON-NLS-1$ //$NON-NLS-2$
+ + flagnumber.getValue(), requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
}
}
- fields.put(id, new NameValuePair(id, value != null ? value : ""));
+ fields.put(id, new NameValuePair(id, value != null ? value : "")); //$NON-NLS-1$
}
}
@@ -1214,9 +1208,9 @@ public class BugzillaClient {
if (repositoryConfiguration != null) {
bugzillaVersion = repositoryConfiguration.getInstallVersion();
} else {
- bugzillaVersion = "2.18";
+ bugzillaVersion = "2.18"; //$NON-NLS-1$
}
- if (bugzillaVersion.compareTo("3.2") < 0) {
+ if (bugzillaVersion.compareTo("3.2") < 0) { //$NON-NLS-1$
TaskAttribute attributeOperation = model.getRoot().getMappedAttribute(TaskAttribute.OPERATION);
if (attributeOperation == null) {
@@ -1230,7 +1224,7 @@ public class BugzillaClient {
} else {
String inputAttributeId = originalOperation.getMetaData().getValue(
TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID);
- if (inputAttributeId == null || inputAttributeId.equals("")) {
+ if (inputAttributeId == null || inputAttributeId.equals("")) { //$NON-NLS-1$
String sel = attributeOperation.getValue();
fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, sel));
} else {
@@ -1263,7 +1257,7 @@ public class BugzillaClient {
} else if (attributeOperation != null
&& attributeOperation.getValue().equals(BugzillaOperation.duplicate.toString())) {
// fix for bug#198677
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, ""));
+ fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, "")); //$NON-NLS-1$
}
}
} else {
@@ -1285,32 +1279,32 @@ public class BugzillaClient {
fields.put(fieldName, new NameValuePair(fieldName, attributeStatus.getValue()));
} else {
String selOp = attributeOperation.getValue().toUpperCase();
- if (selOp.equals("NONE")) {
+ if (selOp.equals("NONE")) { //$NON-NLS-1$
selOp = attributeStatus.getValue();
}
- if (selOp.equals("ACCEPT")) {
- selOp = "ASSIGNED";
+ if (selOp.equals("ACCEPT")) { //$NON-NLS-1$
+ selOp = "ASSIGNED"; //$NON-NLS-1$
}
- if (selOp.equals("RESOLVE")) {
- selOp = "RESOLVED";
+ if (selOp.equals("RESOLVE")) { //$NON-NLS-1$
+ selOp = "RESOLVED"; //$NON-NLS-1$
}
- if (selOp.equals("VERIFY")) {
- selOp = "VERIFIED";
+ if (selOp.equals("VERIFY")) { //$NON-NLS-1$
+ selOp = "VERIFIED"; //$NON-NLS-1$
}
- if (selOp.equals("CLOSE")) {
- selOp = "CLOSED";
+ if (selOp.equals("CLOSE")) { //$NON-NLS-1$
+ selOp = "CLOSED"; //$NON-NLS-1$
}
- if (selOp.equals("REOPEN")) {
- selOp = "REOPENED";
+ if (selOp.equals("REOPEN")) { //$NON-NLS-1$
+ selOp = "REOPENED"; //$NON-NLS-1$
}
- if (selOp.equals("DUPLICATE")) {
- selOp = "RESOLVED";
+ if (selOp.equals("DUPLICATE")) { //$NON-NLS-1$
+ selOp = "RESOLVED"; //$NON-NLS-1$
String knob = BugzillaAttribute.RESOLUTION.getKey();
- fields.put(knob, new NameValuePair(knob, "DUPLICATE"));
+ fields.put(knob, new NameValuePair(knob, "DUPLICATE")); //$NON-NLS-1$
}
fields.put(fieldName, new NameValuePair(fieldName, selOp));
- if (inputAttributeId != null && !inputAttributeId.equals("")) {
+ if (inputAttributeId != null && !inputAttributeId.equals("")) { //$NON-NLS-1$
TaskAttribute inputAttribute = attributeOperation.getTaskData().getRoot().getAttribute(
inputAttributeId);
if (inputAttribute != null) {
@@ -1324,7 +1318,7 @@ public class BugzillaClient {
} else {
String sel = inputAttribute.getValue();
String knob = attributeOperation.getValue();
- if (knob.equals("duplicate")) {
+ if (knob.equals("duplicate")) { //$NON-NLS-1$
knob = inputAttributeId;
}
if (knob.equals(BugzillaOperation.reassign.toString())) {
@@ -1380,8 +1374,8 @@ public class BugzillaClient {
String bugUrl = taskData.getRepositoryUrl() + IBugzillaConstants.URL_GET_SHOW_BUG + taskData.getTaskId();
GzipGetMethod getMethod = new GzipGetMethod(WebUtil.getRequestPath(bugUrl), false);
- getMethod.setRequestHeader("Content-Type", "text/xml; charset=" + characterEncoding);
- httpClient.getParams().setParameter("http.protocol.single-cookie-header", true);
+ getMethod.setRequestHeader("Content-Type", "text/xml; charset=" + characterEncoding); //$NON-NLS-1$ //$NON-NLS-2$
+ httpClient.getParams().setParameter("http.protocol.single-cookie-header", true); //$NON-NLS-1$
getMethod.setDoAuthentication(true);
int code;
@@ -1397,10 +1391,10 @@ public class BugzillaClient {
&& !((HtmlTag) (token.getValue())).isEndTag()) {
HtmlTag tag = (HtmlTag) token.getValue();
// String name = tag.getAttribute("name");
- String id = tag.getAttribute("id");
- String checkedValue = tag.getAttribute("checked");
- String type = tag.getAttribute("type");
- if (type != null && type.equalsIgnoreCase("checkbox") && id != null && id.startsWith("bit-")) {
+ String id = tag.getAttribute("id"); //$NON-NLS-1$
+ String checkedValue = tag.getAttribute("checked"); //$NON-NLS-1$
+ String type = tag.getAttribute("type"); //$NON-NLS-1$
+ if (type != null && type.equalsIgnoreCase("checkbox") && id != null && id.startsWith("bit-")) { //$NON-NLS-1$ //$NON-NLS-2$
groupSecurityInformation.put(id, checkedValue);
}
}
@@ -1408,7 +1402,7 @@ public class BugzillaClient {
}
} catch (Exception e) {
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to retrieve group security information", e));
+ "Unable to retrieve group security information", e)); //$NON-NLS-1$
} finally {
if (inStream != null) {
try {
@@ -1424,9 +1418,9 @@ public class BugzillaClient {
public static String stripTimeZone(String longTime) {
String result = longTime;
if (longTime != null) {
- String[] values = longTime.split(" ");
+ String[] values = longTime.split(" "); //$NON-NLS-1$
if (values != null && values.length > 2) {
- result = values[0] + " " + values[1];
+ result = values[0] + " " + values[1]; //$NON-NLS-1$
}
}
return result;
@@ -1437,7 +1431,7 @@ public class BugzillaClient {
for (int i = 0; i < strings.length; i++) {
buffer.append(strings[i]);
if (i != strings.length - 1) {
- buffer.append(",");
+ buffer.append(","); //$NON-NLS-1$
}
}
return buffer.toString();
@@ -1457,8 +1451,8 @@ public class BugzillaClient {
HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
boolean isTitle = false;
- String title = "";
- String body = "";
+ String title = ""; //$NON-NLS-1$
+ String body = ""; //$NON-NLS-1$
try {
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
@@ -1472,7 +1466,7 @@ public class BugzillaClient {
if (isTitle) {
// get all of the data in the title tag
if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " ";
+ title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " "; //$NON-NLS-1$
continue;
} else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
&& ((HtmlTag) token.getValue()).isEndTag()) {
@@ -1523,7 +1517,7 @@ public class BugzillaClient {
// BugzillaException(IBugzillaConstants.LOGGED_OUT);
throw new CoreException(new BugzillaStatus(IStatus.INFO, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.REPOSITORY_LOGGED_OUT,
- "You have been logged out. Please retry operation."));
+ "You have been logged out. Please retry operation.")); //$NON-NLS-1$
}
found = false;
for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
@@ -1542,12 +1536,12 @@ public class BugzillaClient {
throw new CoreException(RepositoryStatus.createHtmlStatus(repositoryUrl.toString(), IStatus.INFO,
BugzillaCorePlugin.ID_PLUGIN, RepositoryStatus.ERROR_REPOSITORY,
- "A repository error has occurred.", body));
+ "A repository error has occurred.", body)); //$NON-NLS-1$
} catch (ParseException e) {
authenticated = false;
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + "."));
+ RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + ".")); //$NON-NLS-1$ //$NON-NLS-2$
} finally {
in.close();
}
@@ -1576,8 +1570,8 @@ public class BugzillaClient {
} catch (ParseException e) {
authenticated = false;
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from "
- + repositoryUrl.toString() + "."));
+ RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " //$NON-NLS-1$
+ + repositoryUrl.toString() + ".")); //$NON-NLS-1$
}
} finally {
in.close();
@@ -1619,21 +1613,21 @@ public class BugzillaClient {
int x = 0;
for (; itr.hasNext(); x++) {
String taskId = itr.next();
- formData[x] = new NameValuePair("id", taskId);
+ formData[x] = new NameValuePair("id", taskId); //$NON-NLS-1$
TaskData taskData = new TaskData(mapper, getConnectorKind(), repositoryUrl.toString(), taskId);
setupExistingBugAttributes(repositoryUrl.toString(), taskData);
taskDataMap.put(taskId, taskData);
}
- formData[x++] = new NameValuePair("ctype", "xml");
- formData[x] = new NameValuePair("excludefield", "attachmentdata");
+ formData[x++] = new NameValuePair("ctype", "xml"); //$NON-NLS-1$ //$NON-NLS-2$
+ formData[x] = new NameValuePair("excludefield", "attachmentdata"); //$NON-NLS-1$ //$NON-NLS-2$
method = postFormData(IBugzillaConstants.URL_POST_SHOW_BUG, formData, monitor);
if (method == null) {
- throw new IOException("Could not post form, client returned null method.");
+ throw new IOException("Could not post form, client returned null method."); //$NON-NLS-1$
}
boolean parseable = false;
- if (method.getResponseHeader("Content-Type") != null) {
- Header responseTypeHeader = method.getResponseHeader("Content-Type");
+ if (method.getResponseHeader("Content-Type") != null) { //$NON-NLS-1$
+ Header responseTypeHeader = method.getResponseHeader("Content-Type"); //$NON-NLS-1$
for (String type : VALID_CONFIG_CONTENT_TYPES) {
if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
InputStream input = getResponseStream(method, monitor);
@@ -1687,7 +1681,7 @@ public class BugzillaClient {
try {
method = connectHead(repositoryUrl + IBugzillaConstants.URL_GET_CONFIG_RDF, monitor);
- Header lastModifiedHeader = method.getResponseHeader("Last-Modified");
+ Header lastModifiedHeader = method.getResponseHeader("Last-Modified"); //$NON-NLS-1$
if (lastModifiedHeader != null && lastModifiedHeader.getValue() != null
&& lastModifiedHeader.getValue().length() > 0) {
lastModified = lastModifiedHeader.getValue();
@@ -1700,7 +1694,7 @@ public class BugzillaClient {
lastModifiedSupported = false;
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Error retrieving configuration timestamp", e));
+ "Error retrieving configuration timestamp", e)); //$NON-NLS-1$
} finally {
if (method != null) {
method.releaseConnection();
@@ -1722,7 +1716,7 @@ public class BugzillaClient {
headMethod.setQueryString(requestURL.substring(requestURL.indexOf(QUERY_DELIMITER)));
}
- headMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset="
+ headMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" //$NON-NLS-1$ //$NON-NLS-2$
+ characterEncoding);
// WARNING!! Setting browser compatability breaks Bugzilla
@@ -1756,20 +1750,20 @@ public class BugzillaClient {
headMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
+ "Proxy authentication required")); //$NON-NLS-1$
} else {
headMethod.getResponseBody();
headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code)));
+ throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
+ RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code))); //$NON-NLS-1$
// throw new IOException("HttpClient connection error response
// code: " + code);
}
}
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString()
- + " failed. Please verify connection and authentication information."));
+ throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
+ RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString() //$NON-NLS-1$
+ + " failed. Please verify connection and authentication information.")); //$NON-NLS-1$
}
public void setRepositoryConfiguration(RepositoryConfiguration repositoryConfiguration) {
@@ -1787,21 +1781,21 @@ public class BugzillaClient {
if (!hardWrap) {
return origText;
} else {
- String newText = "";
+ String newText = ""; //$NON-NLS-1$
- while (!origText.equals("")) {
+ while (!origText.equals("")) { //$NON-NLS-1$
int newLine = origText.indexOf('\n');
if (newLine == -1) {
if (origText.length() > WRAP_LENGTH) {
- int spaceIndex = origText.lastIndexOf(" ", WRAP_LENGTH);
+ int spaceIndex = origText.lastIndexOf(" ", WRAP_LENGTH); //$NON-NLS-1$
if (spaceIndex == -1) {
spaceIndex = WRAP_LENGTH;
}
- newText = newText + origText.substring(0, spaceIndex) + "\n";
+ newText = newText + origText.substring(0, spaceIndex) + "\n"; //$NON-NLS-1$
origText = origText.substring(spaceIndex + 1, origText.length());
} else {
newText = newText + origText;
- origText = "";
+ origText = ""; //$NON-NLS-1$
}
} else {
newText = newText + origText.substring(0, newLine + 1);
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java
index 026f68860..09fd7f879 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java
@@ -27,7 +27,7 @@ public class BugzillaClientFactory {
public static BugzillaClient createClient(TaskRepository taskRepository) throws MalformedURLException {
String language = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING);
- if (language == null || language.equals("")) {
+ if (language == null || language.equals("")) { //$NON-NLS-1$
language = IBugzillaConstants.DEFAULT_LANG;
}
BugzillaLanguageSettings languageSettings = BugzillaRepositoryConnector.getLanguageSetting(language);
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
index e0089bb8b..ecb7eaa7b 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
@@ -39,14 +39,14 @@ public class BugzillaClientManager implements IRepositoryListener {
if (client == null) {
String language = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING);
- if (language == null || language.equals("")) {
+ if (language == null || language.equals("")) { //$NON-NLS-1$
language = IBugzillaConstants.DEFAULT_LANG;
}
try {
client = createClient(taskRepository);
} catch (MalformedURLException e) {
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Malformed Repository Url", e));
+ "Malformed Repository Url", e)); //$NON-NLS-1$
}
clientByUrl.put(taskRepository.getRepositoryUrl(), client);
client.setRepositoryConfiguration(BugzillaCorePlugin.getRepositoryConfiguration(taskRepository, false,
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java
index 57aebca52..a4a30e4dd 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java
@@ -41,13 +41,13 @@ import org.osgi.framework.BundleContext;
*/
public class BugzillaCorePlugin extends Plugin {
- private static final String ERROR_DELETING_CONFIGURATION = "Error removing corrupt repository configuration file.";
+ private static final String ERROR_DELETING_CONFIGURATION = "Error removing corrupt repository configuration file."; //$NON-NLS-1$
- private static final String ERROR_INCOMPATIBLE_CONFIGURATION = "Reset Bugzilla repository configuration cache due to format change";
+ private static final String ERROR_INCOMPATIBLE_CONFIGURATION = "Reset Bugzilla repository configuration cache due to format change"; //$NON-NLS-1$
- public static final String CONNECTOR_KIND = "bugzilla";
+ public static final String CONNECTOR_KIND = "bugzilla"; //$NON-NLS-1$
- public static final String ID_PLUGIN = "org.eclipse.mylyn.bugzilla";
+ public static final String ID_PLUGIN = "org.eclipse.mylyn.bugzilla"; //$NON-NLS-1$
private static BugzillaCorePlugin INSTANCE;
@@ -57,7 +57,7 @@ public class BugzillaCorePlugin extends Plugin {
private static BugzillaRepositoryConnector connector;
- private static final String OPTION_ALL = "All";
+ private static final String OPTION_ALL = "All"; //$NON-NLS-1$
// A Map from Java's Platform to Buzilla's
private final Map<String, String> java2buzillaPlatformMap = new HashMap<String, String>();
@@ -67,12 +67,12 @@ public class BugzillaCorePlugin extends Plugin {
public BugzillaCorePlugin() {
super();
- java2buzillaPlatformMap.put("x86", "PC"); // can be PC or Macintosh!
- java2buzillaPlatformMap.put("x86_64", "PC");
- java2buzillaPlatformMap.put("ia64", "PC");
- java2buzillaPlatformMap.put("ia64_32", "PC");
- java2buzillaPlatformMap.put("sparc", "Sun");
- java2buzillaPlatformMap.put("ppc", "Power PC"); // not Power!
+ java2buzillaPlatformMap.put("x86", "PC"); // can be PC or Macintosh! //$NON-NLS-1$ //$NON-NLS-2$
+ java2buzillaPlatformMap.put("x86_64", "PC"); //$NON-NLS-1$ //$NON-NLS-2$
+ java2buzillaPlatformMap.put("ia64", "PC"); //$NON-NLS-1$ //$NON-NLS-2$
+ java2buzillaPlatformMap.put("ia64_32", "PC"); //$NON-NLS-1$ //$NON-NLS-2$
+ java2buzillaPlatformMap.put("sparc", "Sun"); //$NON-NLS-1$ //$NON-NLS-2$
+ java2buzillaPlatformMap.put("ppc", "Power PC"); // not Power! //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -146,7 +146,7 @@ public class BugzillaCorePlugin extends Plugin {
return repositoryConfigurations.get(repository.getRepositoryUrl());
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 1,
- "Error retrieving task attributes from repository.\n\n" + e.getMessage(), e));
+ "Error retrieving task attributes from repository.\n\n" + e.getMessage(), e)); //$NON-NLS-1$
}
}
@@ -272,7 +272,7 @@ public class BugzillaCorePlugin extends Plugin {
*/
protected IPath getCachedBugReportPath() {
IPath stateLocation = Platform.getStateLocation(BugzillaCorePlugin.getDefault().getBundle());
- IPath bugFile = stateLocation.append("bugReports");
+ IPath bugFile = stateLocation.append("bugReports"); //$NON-NLS-1$
return bugFile;
}
@@ -319,7 +319,7 @@ public class BugzillaCorePlugin extends Plugin {
MacOS X -> Mac OS X
*/
- bugzillaOS = System.getProperty("os.name") + " " + System.getProperty("os.version");
+ bugzillaOS = System.getProperty("os.name") + " " + System.getProperty("os.version"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// We start with the most specific Value as the Search String.
// If we didn't find it we remove the last part of the version String or the OS Name from
// the Search String and continue with the test until we found it or the Search String is empty.
@@ -352,10 +352,10 @@ public class BugzillaCorePlugin extends Plugin {
// If the OS is "macosx" we change the Platform to "Macintosh"
//
if (bugzillaPlatform != null
- && (bugzillaPlatform.compareTo("Power") == 0 || bugzillaPlatform.compareTo("PC") == 0)
- && OS != null && OS.compareTo("macosx") == 0) {
+ && (bugzillaPlatform.compareTo("Power") == 0 || bugzillaPlatform.compareTo("PC") == 0) //$NON-NLS-1$ //$NON-NLS-2$
+ && OS != null && OS.compareTo("macosx") == 0) { //$NON-NLS-1$
// TODO: this may not even be a legal value in another repository!
- bugzillaPlatform = "Macintosh";
+ bugzillaPlatform = "Macintosh"; //$NON-NLS-1$
} else if (platformAttribute != null && platformAttribute.getOption(bugzillaPlatform) == null) {
// If the platform we found is not int the list of available
// optinos, set the
@@ -378,7 +378,7 @@ public class BugzillaCorePlugin extends Plugin {
}
} catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, "could not set platform options",
+ StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, "could not set platform options", //$NON-NLS-1$
e));
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java
index f618f4b26..62f4a2f2d 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java
@@ -26,7 +26,7 @@ public class BugzillaCustomField implements Serializable {
// old version private static final long serialVersionUID = 5703683576871326128L;
private static final long serialVersionUID = 7273310489883205486L;
- public static final String CUSTOM_FIELD_PREFIX = "cf_";
+ public static final String CUSTOM_FIELD_PREFIX = "cf_"; //$NON-NLS-1$
private final String name;
@@ -46,7 +46,7 @@ public class BugzillaCustomField implements Serializable {
this.type = parseInt(type);
this.typeDesc = typeDesc;
- this.enterBug = "1".equals(enterBug);
+ this.enterBug = "1".equals(enterBug); //$NON-NLS-1$
}
private int parseInt(String type) {
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java
index a28160c0b..0c6a09001 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java
@@ -48,20 +48,20 @@ public class BugzillaFlag implements Serializable {
this.type = type;
this.flagId = flagId;
- if (multiplicable != null && !multiplicable.equals("")) {
- this.multiplicable = multiplicable.equals("1");
+ if (multiplicable != null && !multiplicable.equals("")) { //$NON-NLS-1$
+ this.multiplicable = multiplicable.equals("1"); //$NON-NLS-1$
} else {
this.multiplicable = false;
}
- if (requestable != null && !requestable.equals("")) {
- this.requestable = requestable.equals("1");
+ if (requestable != null && !requestable.equals("")) { //$NON-NLS-1$
+ this.requestable = requestable.equals("1"); //$NON-NLS-1$
} else {
this.requestable = false;
}
- if (specifically_requestable != null && !specifically_requestable.equals("")) {
- this.specifically_requestable = specifically_requestable.equals("1");
+ if (specifically_requestable != null && !specifically_requestable.equals("")) { //$NON-NLS-1$
+ this.specifically_requestable = specifically_requestable.equals("1"); //$NON-NLS-1$
} else {
this.specifically_requestable = false;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java
index c70bf2c47..3c54293a1 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java
@@ -25,21 +25,21 @@ import java.util.Map;
*/
public class BugzillaLanguageSettings {
- private String languageName = "<unknown>";
+ private String languageName = "<unknown>"; //$NON-NLS-1$
- public static final String COMMAND_ERROR_LOGIN = "error_login";
+ public static final String COMMAND_ERROR_LOGIN = "error_login"; //$NON-NLS-1$
- public static final String COMMAND_ERROR_COLLISION = "error_collision";
+ public static final String COMMAND_ERROR_COLLISION = "error_collision"; //$NON-NLS-1$
- public static final String COMMAND_ERROR_COMMENT_REQUIRED = "error_comment_required";
+ public static final String COMMAND_ERROR_COMMENT_REQUIRED = "error_comment_required"; //$NON-NLS-1$
- public static final String COMMAND_ERROR_LOGGED_OUT = "error_logged_out";
+ public static final String COMMAND_ERROR_LOGGED_OUT = "error_logged_out"; //$NON-NLS-1$
- public static final String COMMAND_BAD_LOGIN = "bad_login";
+ public static final String COMMAND_BAD_LOGIN = "bad_login"; //$NON-NLS-1$
- public static final String COMMAND_PROCESSED = "processed";
+ public static final String COMMAND_PROCESSED = "processed"; //$NON-NLS-1$
- public static final String COMMAND_CHANGES_SUBMITTED = "changes_submitted";
+ public static final String COMMAND_CHANGES_SUBMITTED = "changes_submitted"; //$NON-NLS-1$
private final Map<String, List<String>> languageAttributes = new LinkedHashMap<String, List<String>>();
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java
index da6f9aefa..a3e681d5d 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java
@@ -19,23 +19,23 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
*/
public enum BugzillaOperation {
- none("Leave as %s %s"),
+ none(Messages.BugzillaOperation_Leave_as_X_X),
- accept("Accept (change status to ASSIGNED)"),
+ accept(Messages.BugzillaOperation_Accept_to_ASSIGNED),
- resolve("Resolve as", "resolutionInput", TaskAttribute.TYPE_SINGLE_SELECT),
+ resolve(Messages.BugzillaOperation_Resolve_as, "resolutionInput", TaskAttribute.TYPE_SINGLE_SELECT), //$NON-NLS-1$
- duplicate("Duplicate of", "dup_id", TaskAttribute.TYPE_TASK_DEPENDENCY),
+ duplicate(Messages.BugzillaOperation_Duplicate_of, "dup_id", TaskAttribute.TYPE_TASK_DEPENDENCY), //$NON-NLS-1$
- reassign("Reassign to", "reassignInput", TaskAttribute.TYPE_PERSON),
+ reassign(Messages.BugzillaOperation_Reassign_to, "reassignInput", TaskAttribute.TYPE_PERSON), //$NON-NLS-1$
- reassignbycomponent("Reassign to default assignee"),
+ reassignbycomponent(Messages.BugzillaOperation_Reassign_to_default_assignee),
- reopen("Reopen bug"),
+ reopen(Messages.BugzillaOperation_Reopen_bug),
- verify("Mark as VERIFIED"),
+ verify(Messages.BugzillaOperation_Mark_as_VERIFIED),
- close("Mark as CLOSED");
+ close(Messages.BugzillaOperation_Mark_as_CLOSED);
private final String label;
@@ -64,4 +64,4 @@ public enum BugzillaOperation {
public String getInputType() {
return inputType;
}
-} \ No newline at end of file
+}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
index 8bf6bd446..44412ba0d 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
@@ -14,6 +14,7 @@ package org.eclipse.mylyn.internal.bugzilla.core;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
+import java.text.MessageFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -54,17 +55,17 @@ import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
*/
public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
- private static final String BUG_ID = "&bug_id=";
+ private static final String BUG_ID = "&bug_id="; //$NON-NLS-1$
- private static final String CHANGED_BUGS_CGI_ENDDATE = "&chfieldto=Now";
+ private static final String CHANGED_BUGS_CGI_ENDDATE = "&chfieldto=Now"; //$NON-NLS-1$
- private static final String CHANGED_BUGS_CGI_QUERY = "/buglist.cgi?query_format=advanced&chfieldfrom=";
+ private static final String CHANGED_BUGS_CGI_QUERY = "/buglist.cgi?query_format=advanced&chfieldfrom="; //$NON-NLS-1$
- private static final String CLIENT_LABEL = "Bugzilla (supports uncustomized 2.18-3.0)";
+ private static final String CLIENT_LABEL = Messages.BugzillaRepositoryConnector_BUGZILLA_SUPPORTS_2_18_TO_3_0;
- private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm";
+ private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm"; //$NON-NLS-1$
- private static final String DEADLINE_FORMAT = "yyyy-MM-dd";
+ private static final String DEADLINE_FORMAT = "yyyy-MM-dd"; //$NON-NLS-1$
private final BugzillaTaskAttachmentHandler attachmentHandler = new BugzillaTaskAttachmentHandler(this);
@@ -158,7 +159,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
// Severity
TaskAttribute attrSeverity = taskData.getRoot().getMappedAttribute(BugzillaAttribute.BUG_SEVERITY.getKey());
- if (attrSeverity != null && !attrSeverity.getValue().equals("")) {
+ if (attrSeverity != null && !attrSeverity.getValue().equals("")) { //$NON-NLS-1$
task.setAttribute(BugzillaAttribute.BUG_SEVERITY.getKey(), attrSeverity.getValue());
}
@@ -202,7 +203,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
monitor = Policy.monitorFor(monitor);
try {
- monitor.beginTask("Checking for changed tasks", session.getTasks().size());
+ monitor.beginTask(Messages.BugzillaRepositoryConnector_checking_for_changed_tasks, session.getTasks().size());
if (repository.getSynchronizationTimeStamp() == null) {
for (ITask task : session.getTasks()) {
@@ -213,7 +214,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
String dateString = repository.getSynchronizationTimeStamp();
if (dateString == null) {
- dateString = "";
+ dateString = ""; //$NON-NLS-1$
}
String urlQueryBase = repository.getRepositoryUrl() + CHANGED_BUGS_CGI_QUERY
@@ -229,7 +230,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
ITask task = itr.next();
checking.add(task);
queryCounter++;
- String newurlQueryString = URLEncoder.encode(task.getTaskId() + ",", repository.getCharacterEncoding());
+ String newurlQueryString = URLEncoder.encode(task.getTaskId() + ",", repository.getCharacterEncoding()); //$NON-NLS-1$
urlQueryString += newurlQueryString;
if (queryCounter >= 1000) {
queryForChanged(repository, changedTasks, urlQueryString, session, new SubProgressMonitor(monitor,
@@ -237,7 +238,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
queryCounter = 0;
urlQueryString = urlQueryBase + BUG_ID;
- newurlQueryString = "";
+ newurlQueryString = ""; //$NON-NLS-1$
}
if (!itr.hasNext() && queryCounter != 0) {
@@ -255,8 +256,8 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
return;
} catch (UnsupportedEncodingException e) {
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Repository configured with unsupported encoding: " + repository.getCharacterEncoding()
- + "\n\n Unable to determine changed tasks.", e));
+ "Repository configured with unsupported encoding: " + repository.getCharacterEncoding() //$NON-NLS-1$
+ + "\n\n Unable to determine changed tasks.", e)); //$NON-NLS-1$
} finally {
monitor.done();
}
@@ -283,8 +284,8 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
};
// TODO: Decouple from internals
- IRepositoryQuery query = new RepositoryQuery(repository.getConnectorKind(), "");
- query.setSummary("Query for changed tasks");
+ IRepositoryQuery query = new RepositoryQuery(repository.getConnectorKind(), ""); //$NON-NLS-1$
+ query.setSummary(Messages.BugzillaRepositoryConnector_Query_for_changed_tasks);
query.setUrl(urlQueryString);
performQuery(repository, query, collector, context, monitor);
@@ -313,7 +314,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
monitor = Policy.monitorFor(monitor);
try {
- monitor.beginTask("Running query", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaRepositoryConnector_running_query, IProgressMonitor.UNKNOWN);
BugzillaClient client = getClientManager().getClient(repository, new SubProgressMonitor(monitor, 1));
TaskAttributeMapper mapper = getTaskDataHandler().getAttributeMapper(repository);
boolean hitsReceived = client.getSearchHits(query, resultCollector, mapper, monitor);
@@ -327,10 +328,10 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
return Status.OK_STATUS;
} catch (UnrecognizedReponseException e) {
return new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, IStatus.INFO,
- "Unrecognized response from server", e);
+ Messages.BugzillaRepositoryConnector_Unrecognized_response_from_server, e);
} catch (IOException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, IStatus.ERROR,
- "Check repository configuration: " + e.getMessage(), e);
+ return new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, IStatus.ERROR, MessageFormat.format(
+ Messages.BugzillaRepositoryConnector_Check_repository_configuration, e.getMessage()), e);
} catch (CoreException e) {
return e.getStatus();
} finally {
@@ -352,7 +353,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
if (url == null) {
return null;
}
- int anchorIndex = url.lastIndexOf("#");
+ int anchorIndex = url.lastIndexOf("#"); //$NON-NLS-1$
String bugUrl = url;
if (anchorIndex != -1) {
bugUrl = url.substring(0, anchorIndex);
@@ -368,14 +369,14 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
return BugzillaClient.getBugUrlWithoutLogin(repositoryUrl, taskId);
} catch (Exception e) {
StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Error constructing task url for " + repositoryUrl + " id:" + taskId, e));
+ "Error constructing task url for " + repositoryUrl + " id:" + taskId, e)); //$NON-NLS-1$ //$NON-NLS-2$
}
return null;
}
@Override
public String getTaskIdPrefix() {
- return "bug";
+ return "bug"; //$NON-NLS-1$
}
public BugzillaClientManager getClientManager() {
@@ -384,21 +385,21 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
// TODO: Move this initialization elsewhere
BugzillaCorePlugin.setConnector(this);
enSetting = new BugzillaLanguageSettings(IBugzillaConstants.DEFAULT_LANG);
- enSetting.addLanguageAttribute("error_login", "Login");
- enSetting.addLanguageAttribute("error_login", "log in");
- enSetting.addLanguageAttribute("error_login", "check e-mail");
- enSetting.addLanguageAttribute("error_login", "Invalid Username Or Password");
- enSetting.addLanguageAttribute("error_collision", "Mid-air collision!");
- enSetting.addLanguageAttribute("error_comment_required", "Comment Required");
- enSetting.addLanguageAttribute("error_logged_out", "logged out");
- enSetting.addLanguageAttribute("bad_login", "Login");
- enSetting.addLanguageAttribute("bad_login", "log in");
- enSetting.addLanguageAttribute("bad_login", "check e-mail");
- enSetting.addLanguageAttribute("bad_login", "Invalid Username Or Password");
- enSetting.addLanguageAttribute("bad_login", "error");
- enSetting.addLanguageAttribute("processed", "processed");
- enSetting.addLanguageAttribute("changes_submitted", "Changes submitted");
- enSetting.addLanguageAttribute("changes_submitted", "added to Bug");
+ enSetting.addLanguageAttribute("error_login", "Login"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("error_login", "log in"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("error_login", "check e-mail"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("error_login", "Invalid Username Or Password"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("error_collision", "Mid-air collision!"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("error_comment_required", "Comment Required"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("error_logged_out", "logged out"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("bad_login", "Login"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("bad_login", "log in"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("bad_login", "check e-mail"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("bad_login", "Invalid Username Or Password"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("bad_login", "error"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("processed", "processed"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("changes_submitted", "Changes submitted"); //$NON-NLS-1$ //$NON-NLS-2$
+ enSetting.addLanguageAttribute("changes_submitted", "added to Bug"); //$NON-NLS-1$ //$NON-NLS-2$
languages.add(enSetting);
}
@@ -437,7 +438,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
try {
return Integer.parseInt(taskId);
} catch (NumberFormatException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 0, "Invalid bug id: "
+ throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 0, "Invalid bug id: " //$NON-NLS-1$
+ taskId, e));
}
}
@@ -465,7 +466,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
@Override
public void postSynchronization(ISynchronizationSession event, IProgressMonitor monitor) throws CoreException {
try {
- monitor.beginTask("", 1);
+ monitor.beginTask("", 1); //$NON-NLS-1$
if (event.isFullSynchronization() && event.getStatus() == null) {
event.getTaskRepository().setSynchronizationTimeStamp(getSynchronizationTimestamp(event));
}
@@ -506,7 +507,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
List<TaskRelation> relations = new ArrayList<TaskRelation>();
TaskAttribute attribute = taskData.getRoot().getAttribute(BugzillaAttribute.DEPENDSON.getKey());
if (attribute != null && attribute.getValue().length() > 0) {
- for (String taskId : attribute.getValue().split(",")) {
+ for (String taskId : attribute.getValue().split(",")) { //$NON-NLS-1$
relations.add(TaskRelation.subtask(taskId.trim()));
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java
index 362144728..789f4418c 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java
@@ -22,33 +22,33 @@ public class BugzillaStatus extends Status {
private final String errorMessage;
- private String repositoryUrl = "";
+ private String repositoryUrl = ""; //$NON-NLS-1$
public BugzillaStatus(int severity, String pluginId, int code) {
- super(severity, pluginId, code, "MylynStatus", null);
+ super(severity, pluginId, code, "MylynStatus", null); //$NON-NLS-1$
this.errorMessage = null;
}
public BugzillaStatus(int severity, String pluginId, int code, String errorMessage) {
- super(severity, pluginId, code, "MylynStatus", null);
+ super(severity, pluginId, code, "MylynStatus", null); //$NON-NLS-1$
this.errorMessage = errorMessage;
}
public BugzillaStatus(int severity, String pluginId, int code, String repositoryUrl, Throwable e) {
- super(severity, pluginId, code, "MylynStatus", e);
+ super(severity, pluginId, code, "MylynStatus", e); //$NON-NLS-1$
this.repositoryUrl = repositoryUrl;
this.errorMessage = e.getMessage();
}
public BugzillaStatus(int severity, String pluginId, int code, String repositoryUrl, String errorMessage) {
- super(severity, pluginId, code, "MylynStatus", null);
+ super(severity, pluginId, code, "MylynStatus", null); //$NON-NLS-1$
this.errorMessage = errorMessage;
this.repositoryUrl = repositoryUrl;
}
public BugzillaStatus(int severity, String pluginId, int code, String repositoryUrl, String errorMessage,
Throwable e) {
- super(severity, pluginId, code, "MylynStatus", e);
+ super(severity, pluginId, code, "MylynStatus", e); //$NON-NLS-1$
this.errorMessage = errorMessage;
this.repositoryUrl = repositoryUrl;
}
@@ -67,8 +67,8 @@ public class BugzillaStatus extends Status {
case RepositoryStatus.ERROR_REPOSITORY:
return NLS.bind(BugzillaMessages.errorRepository, this.getRepositoryUrl(), this.errorMessage);
case RepositoryStatus.ERROR_IO:
- String string1 = "Unknown IO error occurred";
- String string2 = "No message provided";
+ String string1 = "Unknown IO error occurred"; //$NON-NLS-1$
+ String string2 = "No message provided"; //$NON-NLS-1$
if (getException() != null) {
string1 = getException().getClass().getSimpleName();
string2 = getException().getMessage();
@@ -98,7 +98,7 @@ public class BugzillaStatus extends Status {
return getException().toString();
}
}
- return "Unknown";
+ return "Unknown"; //$NON-NLS-1$
}
public String getRepositoryUrl() {
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java
index dd471ff01..8c18538b2 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java
@@ -57,7 +57,7 @@ public class BugzillaTaskAttachmentHandler extends AbstractTaskAttachmentHandler
public InputStream getContent(TaskRepository repository, ITask task, TaskAttribute attachmentAttribute,
IProgressMonitor monitor) throws CoreException {
try {
- monitor.beginTask("Getting attachment", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaTaskAttachmentHandler_Getting_attachment, IProgressMonitor.UNKNOWN);
TaskAttachmentMapper attachment = TaskAttachmentMapper.createFrom(attachmentAttribute);
ByteArrayOutputStream out = new ByteArrayOutputStream();
downloadAttachment(repository, task, attachment.getAttachmentId(), out, monitor);
@@ -71,14 +71,14 @@ public class BugzillaTaskAttachmentHandler extends AbstractTaskAttachmentHandler
public void postContent(TaskRepository repository, ITask task, AbstractTaskAttachmentSource source, String comment,
TaskAttribute attachmentAttribute, IProgressMonitor monitor) throws CoreException {
try {
- monitor.beginTask("Sending attachment", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaTaskAttachmentHandler_Sending_attachment, IProgressMonitor.UNKNOWN);
BugzillaClient client = connector.getClientManager().getClient(repository,
new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
client.postAttachment(task.getTaskId(), comment, source, attachmentAttribute, monitor);
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to submit attachment", e));
+ Messages.BugzillaTaskAttachmentHandler_unable_to_submit_attachment, e));
} finally {
monitor.done();
}
@@ -94,7 +94,7 @@ public class BugzillaTaskAttachmentHandler extends AbstractTaskAttachmentHandler
client.getAttachmentData(attachmentId, out, monitor);
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to retrieve attachment", e));
+ "Unable to retrieve attachment", e)); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
index 0246f27ed..4ed667478 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
@@ -222,7 +222,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
@Override
public String toString() {
- return "" + getVersionNum();
+ return "" + getVersionNum(); //$NON-NLS-1$
}
private static void updateAttribute(TaskData data, BugzillaAttribute bugAttribute) {
@@ -258,7 +258,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
if (retrievedData[0] == null) {
throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Task data could not be retrieved. Please re-synchronize task"));
+ "Task data could not be retrieved. Please re-synchronize task")); //$NON-NLS-1$
}
return retrievedData[0];
@@ -288,7 +288,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
monitor = Policy.monitorFor(monitor);
try {
- monitor.beginTask("Receiving tasks", taskIds.size());
+ monitor.beginTask(Messages.BugzillaTaskDataHandler_Receiving_tasks, taskIds.size());
BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
final CoreException[] collectionException = new CoreException[1];
@@ -359,7 +359,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
Set<TaskAttribute> changedAttributes, IProgressMonitor monitor) throws CoreException {
monitor = Policy.monitorFor(monitor);
try {
- monitor.beginTask("Submitting task", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaTaskDataHandler_Submitting_task, IProgressMonitor.UNKNOWN);
BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
try {
return client.postTaskData(taskData, monitor);
@@ -497,10 +497,10 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
}
TaskAttribute attributeAssignedTo = createAttribute(taskData, BugzillaAttribute.ASSIGNED_TO);
- attributeAssignedTo.setValue("");
+ attributeAssignedTo.setValue(""); //$NON-NLS-1$
TaskAttribute attributeBugFileLoc = createAttribute(taskData, BugzillaAttribute.BUG_FILE_LOC);
- attributeBugFileLoc.setValue("http://");
+ attributeBugFileLoc.setValue("http://"); //$NON-NLS-1$
createAttribute(taskData, BugzillaAttribute.DEPENDSON);
createAttribute(taskData, BugzillaAttribute.BLOCKED);
@@ -539,9 +539,9 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
TaskMapper mapper = new TaskMapper(parentTaskData);
initializeTaskData(repository, subTaskData, mapper, monitor);
new TaskMapper(subTaskData).merge(mapper);
- subTaskData.getRoot().getMappedAttribute(BugzillaAttribute.DEPENDSON.getKey()).setValue("");
- subTaskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue("");
- subTaskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue("");
+ subTaskData.getRoot().getMappedAttribute(BugzillaAttribute.DEPENDSON.getKey()).setValue(""); //$NON-NLS-1$
+ subTaskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue(""); //$NON-NLS-1$
+ subTaskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue(""); //$NON-NLS-1$
subTaskData.getRoot().getAttribute(BugzillaAttribute.BLOCKED.getKey()).setValue(parentTaskData.getTaskId());
TaskAttribute parentAttributeAssigned = parentTaskData.getRoot()
.getMappedAttribute(TaskAttribute.USER_ASSIGNED);
@@ -574,7 +574,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
IProgressMonitor monitor) throws CoreException {
monitor = Policy.monitorFor(monitor);
try {
- monitor.beginTask("Updating Attachment", IProgressMonitor.UNKNOWN);
+ monitor.beginTask(Messages.BugzillaTaskDataHandler_updating_attachment, IProgressMonitor.UNKNOWN);
BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
try {
client.postUpdateAttachment(taskAttribute, action, monitor);
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java
index 08c26dca1..5a4c46be5 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java
@@ -50,7 +50,7 @@ public class GzipGetMethod extends GetMethod {
public int execute(HttpState state, HttpConnection conn) throws HttpException, IOException {
// Insert accept-encoding header
if (gzipWanted) {
- this.setRequestHeader("Accept-encoding", IBugzillaConstants.CONTENT_ENCODING_GZIP);
+ this.setRequestHeader("Accept-encoding", IBugzillaConstants.CONTENT_ENCODING_GZIP); //$NON-NLS-1$
}
int result = super.execute(state, conn);
return result;
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java
index 79cc41065..6cd65e00b 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java
@@ -50,7 +50,7 @@ public class GzipPostMethod extends PostMethod {
public int execute(HttpState state, HttpConnection conn) throws HttpException, IOException {
// Insert accept-encoding header
if (gzipWanted) {
- this.setRequestHeader("Accept-encoding", IBugzillaConstants.CONTENT_ENCODING_GZIP);
+ this.setRequestHeader("Accept-encoding", IBugzillaConstants.CONTENT_ENCODING_GZIP); //$NON-NLS-1$
}
int result = super.execute(state, conn);
return result;
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java
index d1dfff357..4768a9fe9 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java
@@ -19,65 +19,65 @@ public interface IBugzillaConstants {
//public static final String POST_ARGS_PASSWORD = "&Bugzilla_password=";
//public static final String POST_ARGS_LOGIN = "GoAheadAndLogIn=1&Bugzilla_login=";
- public static final String PROPERTY_CONFIGTIMESTAMP = "org.eclipse.mylyn.tasklist.repositories.config.timestamp";
+ public static final String PROPERTY_CONFIGTIMESTAMP = "org.eclipse.mylyn.tasklist.repositories.config.timestamp"; //$NON-NLS-1$
- static final String ERROR_MIDAIR_COLLISION = "collision";
+ static final String ERROR_MIDAIR_COLLISION = "collision"; //$NON-NLS-1$
- static final String ERROR_MSG_MIDAIR_COLLISION = "A mid-air collision has occurred. Please synchronize by selecting Synchronize in the task's context menu.";
+ static final String ERROR_MSG_MIDAIR_COLLISION = "A mid-air collision has occurred. Please synchronize by selecting Synchronize in the task's context menu."; //$NON-NLS-1$
- static final String ERROR_COMMENT_REQUIRED = "comment required";
+ static final String ERROR_COMMENT_REQUIRED = "comment required"; //$NON-NLS-1$
- static final String ERROR_MSG_COMMENT_REQUIRED = "You have to specify a new comment when making this change. Please comment on the reason for this change.";
+ static final String ERROR_MSG_COMMENT_REQUIRED = "You have to specify a new comment when making this change. Please comment on the reason for this change."; //$NON-NLS-1$
- static final String ERROR_INVALID_USERNAME_OR_PASSWORD = "Invalid Username or Password";
+ static final String ERROR_INVALID_USERNAME_OR_PASSWORD = "Invalid Username or Password"; //$NON-NLS-1$
- static final String LOGGED_OUT = "logged out";
+ static final String LOGGED_OUT = "logged out"; //$NON-NLS-1$
- static final String MOST_RECENT_QUERY = "org.eclipse.mylyn.bugzilla.query.last";
+ static final String MOST_RECENT_QUERY = "org.eclipse.mylyn.bugzilla.query.last"; //$NON-NLS-1$
- static final String SERVER_VERSION = "org.eclipse.mylyn.bugzilla.server.version";
+ static final String SERVER_VERSION = "org.eclipse.mylyn.bugzilla.server.version"; //$NON-NLS-1$
public static final int RETURN_ALL_HITS = -1;
- public static final String CONTENT_TYPE_RDF = "&ctype=rdf";
+ public static final String CONTENT_TYPE_RDF = "&ctype=rdf"; //$NON-NLS-1$
- public static final String POST_INPUT_BUGZILLA_PASSWORD = "Bugzilla_password";
+ public static final String POST_INPUT_BUGZILLA_PASSWORD = "Bugzilla_password"; //$NON-NLS-1$
- public static final String POST_INPUT_BUGZILLA_LOGIN = "Bugzilla_login";
+ public static final String POST_INPUT_BUGZILLA_LOGIN = "Bugzilla_login"; //$NON-NLS-1$
- public static final String POST_INPUT_BUGID = "bugid";
+ public static final String POST_INPUT_BUGID = "bugid"; //$NON-NLS-1$
- public static final String POST_INPUT_ACTION = "action";
+ public static final String POST_INPUT_ACTION = "action"; //$NON-NLS-1$
- public static final String POST_INPUT_COMMENT = "comment";
+ public static final String POST_INPUT_COMMENT = "comment"; //$NON-NLS-1$
- public static final String POST_INPUT_DESCRIPTION = "description";
+ public static final String POST_INPUT_DESCRIPTION = "description"; //$NON-NLS-1$
- public static final String POST_INPUT_DATA = "data";
+ public static final String POST_INPUT_DATA = "data"; //$NON-NLS-1$
- public static final String URL_POST_LOGIN = "/index.cgi";
+ public static final String URL_POST_LOGIN = "/index.cgi"; //$NON-NLS-1$
- public static final String URL_POST_ATTACHMENT_UPLOAD = "/attachment.cgi";
+ public static final String URL_POST_ATTACHMENT_UPLOAD = "/attachment.cgi"; //$NON-NLS-1$
- public static final String URL_BUGLIST = "/buglist.cgi";
+ public static final String URL_BUGLIST = "/buglist.cgi"; //$NON-NLS-1$
- public static final String URL_GET_ATTACHMENT_DOWNLOAD = "/attachment.cgi?id=";
+ public static final String URL_GET_ATTACHMENT_DOWNLOAD = "/attachment.cgi?id="; //$NON-NLS-1$
- public static final String URL_GET_ATTACHMENT_SUFFIX = "/attachment.cgi?id=";
+ public static final String URL_GET_ATTACHMENT_SUFFIX = "/attachment.cgi?id="; //$NON-NLS-1$
- public static final String URL_BUG_ACTIVITY = "/show_activity.cgi?id=";
+ public static final String URL_BUG_ACTIVITY = "/show_activity.cgi?id="; //$NON-NLS-1$
- public static final String URL_SHOW_VOTES = "/votes.cgi?action=show_bug&bug_id=";
+ public static final String URL_SHOW_VOTES = "/votes.cgi?action=show_bug&bug_id="; //$NON-NLS-1$
- public static final String URL_VOTE = "/votes.cgi?action=show_user&bug_id=";
+ public static final String URL_VOTE = "/votes.cgi?action=show_user&bug_id="; //$NON-NLS-1$
- public static final String URL_DEPENDENCY_TREE = "/showdependencytree.cgi?id=";
+ public static final String URL_DEPENDENCY_TREE = "/showdependencytree.cgi?id="; //$NON-NLS-1$
- public static final String URL_DEPENDENCY_GRAPH = "/showdependencygraph.cgi?id=";
+ public static final String URL_DEPENDENCY_GRAPH = "/showdependencygraph.cgi?id="; //$NON-NLS-1$
- public static final String URL_GET_SHOW_BUG = "/show_bug.cgi?id=";
+ public static final String URL_GET_SHOW_BUG = "/show_bug.cgi?id="; //$NON-NLS-1$
- public static final String URL_GET_CONFIG_RDF = "/config.cgi?ctype=rdf";
+ public static final String URL_GET_CONFIG_RDF = "/config.cgi?ctype=rdf"; //$NON-NLS-1$
//For including fields in the xml (XML Summary mode as they like to call it)
//use &field=fieldname for example to only reveal the product information append &field=product
@@ -86,19 +86,19 @@ public interface IBugzillaConstants {
//If somebody knows where this is officially documented I'd appreciate it if they would post a link here
// and on bug#161321. Thanks -relves
// (see also: https://bugzilla.mozilla.org/show_bug.cgi?id=136603https://bugzilla.mozilla.org/show_bug.cgi?id=136603)
- public static final String URL_GET_SHOW_BUG_XML = "/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id=";
+ public static final String URL_GET_SHOW_BUG_XML = "/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id="; //$NON-NLS-1$
- public static final String URL_GET_SHOW_BUG_XML_NOID = "/show_bug.cgi?ctype=xml&excludefield=attachmentdata";
+ public static final String URL_GET_SHOW_BUG_XML_NOID = "/show_bug.cgi?ctype=xml&excludefield=attachmentdata"; //$NON-NLS-1$
- public static final String URL_POST_SHOW_BUG = "/show_bug.cgi";
+ public static final String URL_POST_SHOW_BUG = "/show_bug.cgi"; //$NON-NLS-1$
- public static final String XML_ERROR_INVALIDBUGID = "invalidbugid";
+ public static final String XML_ERROR_INVALIDBUGID = "invalidbugid"; //$NON-NLS-1$
- public static final String XML_ERROR_NOTFOUND = "notfound";
+ public static final String XML_ERROR_NOTFOUND = "notfound"; //$NON-NLS-1$
- public static final String XML_ERROR_NOTPERMITTED = "notpermitted";
+ public static final String XML_ERROR_NOTPERMITTED = "notpermitted"; //$NON-NLS-1$
- public static final String ENCODING_UTF_8 = "UTF-8";
+ public static final String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
/** Supported bugzilla repository versions */
static public enum BugzillaServerVersion {
@@ -108,15 +108,15 @@ public interface IBugzillaConstants {
public String toString() {
switch (this) {
case SERVER_30:
- return "3.0";
+ return "3.0"; //$NON-NLS-1$
case SERVER_222:
- return "2.22";
+ return "2.22"; //$NON-NLS-1$
case SERVER_220:
- return "2.20";
+ return "2.20"; //$NON-NLS-1$
case SERVER_218:
- return "2.18";
+ return "2.18"; //$NON-NLS-1$
default:
- return "null";
+ return "null"; //$NON-NLS-1$
}
}
@@ -143,60 +143,60 @@ public interface IBugzillaConstants {
*/
public static final BugzillaServerVersion SERVER_VERSION_DEFAULT = BugzillaServerVersion.SERVER_30;
- static final String REFRESH_QUERY = "org.eclipse.mylyn.bugzilla.query.refresh";
+ static final String REFRESH_QUERY = "org.eclipse.mylyn.bugzilla.query.refresh"; //$NON-NLS-1$
- static final String MAX_RESULTS = "org.eclipse.mylyn.bugzilla.search.results.max";
+ static final String MAX_RESULTS = "org.eclipse.mylyn.bugzilla.search.results.max"; //$NON-NLS-1$
// names for the resources used to hold the different attributes of a bug
- static final String VALUES_STATUS = "org.eclipse.mylyn.bugzilla.values.status";
+ static final String VALUES_STATUS = "org.eclipse.mylyn.bugzilla.values.status"; //$NON-NLS-1$
- static final String VALUES_RESOLUTION = "org.eclipse.mylyn.bugzilla.values.resolution";
+ static final String VALUES_RESOLUTION = "org.eclipse.mylyn.bugzilla.values.resolution"; //$NON-NLS-1$
- static final String VALUES_COMPONENT = "org.eclipse.mylyn.bugzilla.values.component";
+ static final String VALUES_COMPONENT = "org.eclipse.mylyn.bugzilla.values.component"; //$NON-NLS-1$
- static final String VALUES_VERSION = "org.eclipse.mylyn.bugzilla.values.version";
+ static final String VALUES_VERSION = "org.eclipse.mylyn.bugzilla.values.version"; //$NON-NLS-1$
- static final String VALUES_TARGET = "org.eclipse.mylyn.bugzilla.values.target";
+ static final String VALUES_TARGET = "org.eclipse.mylyn.bugzilla.values.target"; //$NON-NLS-1$
- static final String ECLIPSE_BUGZILLA_URL = "https://bugs.eclipse.org/bugs";
+ static final String ECLIPSE_BUGZILLA_URL = "https://bugs.eclipse.org/bugs"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_218_URL = "http://mylyn.eclipse.org/bugs218";
+ static final String TEST_BUGZILLA_218_URL = "http://mylyn.eclipse.org/bugs218"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_220_URL = "http://mylyn.eclipse.org/bugs220";
+ static final String TEST_BUGZILLA_220_URL = "http://mylyn.eclipse.org/bugs220"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_2201_URL = "http://mylyn.eclipse.org/bugs2201";
+ static final String TEST_BUGZILLA_2201_URL = "http://mylyn.eclipse.org/bugs2201"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_222_URL = "http://mylyn.eclipse.org/bugs222";
+ static final String TEST_BUGZILLA_222_URL = "http://mylyn.eclipse.org/bugs222"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_30_URL = "http://mylyn.eclipse.org/bugs30";
+ static final String TEST_BUGZILLA_30_URL = "http://mylyn.eclipse.org/bugs30"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_303_URL = "http://mylyn.eclipse.org/bugs303";
+ static final String TEST_BUGZILLA_303_URL = "http://mylyn.eclipse.org/bugs303"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_31_URL = "http://mylyn.eclipse.org/bugs31";
+ static final String TEST_BUGZILLA_31_URL = "http://mylyn.eclipse.org/bugs31"; //$NON-NLS-1$
- static final String TEST_BUGZILLA_32_URL = "http://mylyn.eclipse.org/bugs32";
+ static final String TEST_BUGZILLA_32_URL = "http://mylyn.eclipse.org/bugs32"; //$NON-NLS-1$
// Default values for keys
- static final String[] DEFAULT_STATUS_VALUES = { "Unconfirmed", "New", "Assigned", "Reopened", "Resolved",
- "Verified", "Closed" };
+ static final String[] DEFAULT_STATUS_VALUES = { "Unconfirmed", "New", "Assigned", "Reopened", "Resolved", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$
+ "Verified", "Closed" }; //$NON-NLS-1$//$NON-NLS-2$
- static final String[] DEFAULT_PRESELECTED_STATUS_VALUES = { "New", "Assigned", "Reopened" };
+ static final String[] DEFAULT_PRESELECTED_STATUS_VALUES = { "New", "Assigned", "Reopened" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// static final String[] DEFAULT_RESOLUTION_VALUES = { "Fixed", "Invalid",
// "Wontfix", "Later", "Remind", "Duplicate",
// "Worksforme", "Moved" };
- static final String[] DEFAULT_SEVERITY_VALUES = { "blocker", "critical", "major", "normal", "minor", "trivial",
- "enhancement" };
+ static final String[] DEFAULT_SEVERITY_VALUES = { "blocker", "critical", "major", "normal", "minor", "trivial", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "enhancement" }; //$NON-NLS-1$
- static final String[] DEFAULT_PRIORITY_VALUES = { "P1", "P2", "P3", "P4", "P5" };
+ static final String[] DEFAULT_PRIORITY_VALUES = { "P1", "P2", "P3", "P4", "P5" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- static final String[] DEFAULT_HARDWARE_VALUES = { "All", "Macintosh", "PC", "Power PC", "Sun", "Other" };
+ static final String[] DEFAULT_HARDWARE_VALUES = { "All", "Macintosh", "PC", "Power PC", "Sun", "Other" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- static final String[] DEFAULT_OS_VALUES = { "All", "AIX Motif", "Windows 95", "Windows 98", "Windows CE",
- "Windows ME", "Windows 2000", "Windows NT", "Windows XP", "Windows All", "MacOS X", "Linux", "Linux-GTK",
- "Linux-Motif", "HP-UX", "Neutrino", "QNX-Photon", "Solaris", "Unix All", "other" };
+ static final String[] DEFAULT_OS_VALUES = { "All", "AIX Motif", "Windows 95", "Windows 98", "Windows CE", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$
+ "Windows ME", "Windows 2000", "Windows NT", "Windows XP", "Windows All", "MacOS X", "Linux", "Linux-GTK", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "Linux-Motif", "HP-UX", "Neutrino", "QNX-Photon", "Solaris", "Unix All", "other" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$//$NON-NLS-6$//$NON-NLS-7$
static final String[] DEFAULT_PRODUCT_VALUES = {};
@@ -206,25 +206,25 @@ public interface IBugzillaConstants {
static final String[] DEFAULT_TARGET_VALUES = {};
- public static final String TITLE_MESSAGE_DIALOG = "Mylyn Bugzilla Connector";
+ public static final String TITLE_MESSAGE_DIALOG = Messages.IBugzillaConstants_Mylyn_Bugzilla_Connector;
- public static final String TITLE_NEW_BUG = "New Bugzilla Report";
+ public static final String TITLE_NEW_BUG = Messages.IBugzillaConstants_New_Bugzilla_Report;
- public static final String MESSAGE_LOGIN_FAILURE = "Bugzilla login information or repository version incorrect";
+ public static final String MESSAGE_LOGIN_FAILURE = Messages.IBugzillaConstants_Bugzilla_login_information_or_repository_version_incorrect;
- public static final String INVALID_2201_ATTRIBUTE_IGNORED = "EclipsebugsBugzilla2.20.1";
+ public static final String INVALID_2201_ATTRIBUTE_IGNORED = "EclipsebugsBugzilla2.20.1"; //$NON-NLS-1$
- public static final String VALUE_STATUS_RESOLVED = "RESOLVED";
+ public static final String VALUE_STATUS_RESOLVED = "RESOLVED"; //$NON-NLS-1$
- public static final String VALUE_STATUS_NEW = "NEW";
+ public static final String VALUE_STATUS_NEW = "NEW"; //$NON-NLS-1$
- public static final String VALUE_STATUS_CLOSED = "CLOSED";
+ public static final String VALUE_STATUS_CLOSED = "CLOSED"; //$NON-NLS-1$
- public static final String VALUE_STATUS_ASSIGNED = "ASSIGNED";
+ public static final String VALUE_STATUS_ASSIGNED = "ASSIGNED"; //$NON-NLS-1$
- public static final String VALUE_STATUS_VERIFIED = "VERIFIED";
+ public static final String VALUE_STATUS_VERIFIED = "VERIFIED"; //$NON-NLS-1$
- public static final String VALUE_RESOLUTION_LATER = "LATER";
+ public static final String VALUE_RESOLUTION_LATER = "LATER"; //$NON-NLS-1$
public static enum BUGZILLA_REPORT_STATUS {
UNCONFIRMED, NEW, ASSIGNED, REOPENED, RESOLVED, VERIFIED, CLOSED, SCHEDULED;
@@ -238,54 +238,54 @@ public interface IBugzillaConstants {
FIXED, INVALID, WONTFIX, WORKSFORME;
}
- public static final String ERROR_MSG_OP_NOT_PERMITTED = "The requested operation is not permitted.";
+ public static final String ERROR_MSG_OP_NOT_PERMITTED = Messages.IBugzillaConstants_requested_operation_not_permitted;
- public static final String ERROR_MSG_INVALID_BUG_ID = "Invalid bug id. The requested bug id does not exist.";
+ public static final String ERROR_MSG_INVALID_BUG_ID = Messages.IBugzillaConstants_invalid_bug_id_requested_bug_id_does_not_exist;
- public static final String FORM_PREFIX_BUG_218 = "Bug ";
+ public static final String FORM_PREFIX_BUG_218 = "Bug "; //$NON-NLS-1$
- public static final String FORM_PREFIX_BUG_220 = "Issue ";
+ public static final String FORM_PREFIX_BUG_220 = "Issue "; //$NON-NLS-1$
- public static final String FORM_POSTFIX_216 = " posted";
+ public static final String FORM_POSTFIX_216 = " posted"; //$NON-NLS-1$
- public static final String FORM_POSTFIX_218 = " Submitted";
+ public static final String FORM_POSTFIX_218 = " Submitted"; //$NON-NLS-1$
- public static final String INVALID_CREDENTIALS = "Invalid repository credentials.";
+ public static final String INVALID_CREDENTIALS = Messages.IBugzillaConstants_invalid_repository_credentials;
- public static final String SHOW_ACTIVITY = "/show_activity.cgi?id=";
+ public static final String SHOW_ACTIVITY = "/show_activity.cgi?id="; //$NON-NLS-1$
- public static final String REPOSITORY_SETTING_SHORT_LOGIN = "bugzilla.shortLoginEnabled";
+ public static final String REPOSITORY_SETTING_SHORT_LOGIN = "bugzilla.shortLoginEnabled"; //$NON-NLS-1$
- public static final String BUGZILLA_TASK_KIND = "Bug";
+ public static final String BUGZILLA_TASK_KIND = "Bug"; //$NON-NLS-1$
static final int MAX_URL_LENGTH = 2000;
- public static final String TIMESTAMP_NOT_AVAILABLE = "n/a";
+ public static final String TIMESTAMP_NOT_AVAILABLE = "n/a"; //$NON-NLS-1$
- public static final String BUGZILLA_DEF_OS = "bugzilla.default.os";
+ public static final String BUGZILLA_DEF_OS = "bugzilla.default.os"; //$NON-NLS-1$
- public static final String BUGZILLA_DEF_PLATFORM = "bugzilla.default.platform";
+ public static final String BUGZILLA_DEF_PLATFORM = "bugzilla.default.platform"; //$NON-NLS-1$
- public static final String BUGZILLA_LANGUAGE_SETTING = "bugzilla.languageSetting";
+ public static final String BUGZILLA_LANGUAGE_SETTING = "bugzilla.languageSetting"; //$NON-NLS-1$
- public static final String DEFAULT_LANG = "en (default)";
+ public static final String DEFAULT_LANG = "en (default)"; //$NON-NLS-1$
// Bugzilla Task Attribute Editor Types
- public static final String EDITOR_TYPE_KEYWORDS = "bugzilla.editor.keywords";
+ public static final String EDITOR_TYPE_KEYWORDS = "bugzilla.editor.keywords"; //$NON-NLS-1$
- public static final String EDITOR_TYPE_REMOVECC = "bugzilla.editor.removecc";
+ public static final String EDITOR_TYPE_REMOVECC = "bugzilla.editor.removecc"; //$NON-NLS-1$
- public static final String EDITOR_TYPE_VOTES = "bugzilla.editor.votes";
+ public static final String EDITOR_TYPE_VOTES = "bugzilla.editor.votes"; //$NON-NLS-1$
- public static final String EDITOR_TYPE_FLAG = "bugzilla.editor.flag";
+ public static final String EDITOR_TYPE_FLAG = "bugzilla.editor.flag"; //$NON-NLS-1$
- public static final String ATTRIBUTE_BUGZILLA_QUERY_CUSTOM = "bugzilla.query.custom";
+ public static final String ATTRIBUTE_BUGZILLA_QUERY_CUSTOM = "bugzilla.query.custom"; //$NON-NLS-1$
// Old Tags used for migration
- public static final String TAG_BUGZILLA_QUERY = "BugzillaQuery";
+ public static final String TAG_BUGZILLA_QUERY = "BugzillaQuery"; //$NON-NLS-1$
- public static final String TAG_BUGZILLA_CUSTOM_QUERY = "BugzillaCustomQuery";
+ public static final String TAG_BUGZILLA_CUSTOM_QUERY = "BugzillaCustomQuery"; //$NON-NLS-1$
- public static final String CONTENT_ENCODING_GZIP = "gzip";
+ public static final String CONTENT_ENCODING_GZIP = "gzip"; //$NON-NLS-1$
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java
new file mode 100644
index 000000000..ee88d4c4e
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java
@@ -0,0 +1,7 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Mylyn project committers and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java
new file mode 100644
index 000000000..86ef6cf8c
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.bugzilla.core;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.core.messages"; //$NON-NLS-1$
+
+ static {
+ // load message values from bundle file
+ reloadMessages();
+ }
+
+ public static void reloadMessages() {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ public static String BugzillaAttribute_Add;
+
+ public static String BugzillaAttribute_Add_CC;
+
+ public static String BugzillaAttribute_Add_self_to_CC;
+
+ public static String BugzillaAttribute_Additional_Comments;
+
+ public static String BugzillaAttribute_Assigned_to;
+
+ public static String BugzillaAttribute_Assigned_to_NAME;
+
+ public static String BugzillaAttribute_ATTACH_ID;
+
+ public static String BugzillaAttribute_attachment;
+
+ public static String BugzillaAttribute_Blocks;
+
+ public static String BugzillaAttribute_bug;
+
+ public static String BugzillaAttribute_Bug_ID;
+
+ public static String BugzillaAttribute_bug_when;
+
+ public static String BugzillaAttribute_bugzilla;
+
+ public static String BugzillaAttribute_CC;
+
+ public static String BugzillaAttribute_CC_List;
+
+ public static String BugzillaAttribute_Classification;
+
+ public static String BugzillaAttribute_Classification_ID;
+
+ public static String BugzillaAttribute_Component;
+
+ public static String BugzillaAttribute_Content_Type;
+
+ public static String BugzillaAttribute_data;
+
+ public static String BugzillaAttribute_Date;
+
+ public static String BugzillaAttribute_Depends_on__Subtasks_;
+
+ public static String BugzillaAttribute_desc;
+
+ public static String BugzillaAttribute_Description;
+
+ public static String BugzillaAttribute_Due;
+
+ public static String BugzillaAttribute_Estimated_Time;
+
+ public static String BugzillaAttribute_everconfirmed;
+
+ public static String BugzillaAttribute_filename;
+
+ public static String BugzillaAttribute_flag;
+
+ public static String BugzillaAttribute_Group;
+
+ public static String BugzillaAttribute_Keywords;
+
+ public static String BugzillaAttribute_Modified;
+
+ public static String BugzillaAttribute_new_comment;
+
+ public static String BugzillaAttribute_Number_of_comments;
+
+ public static String BugzillaAttribute_Obsolete;
+
+ public static String BugzillaAttribute_open_status_values;
+
+ public static String BugzillaAttribute_Opened;
+
+ public static String BugzillaAttribute_OS;
+
+ public static String BugzillaAttribute_Patch;
+
+ public static String BugzillaAttribute_Platform;
+
+ public static String BugzillaAttribute_Priority;
+
+ public static String BugzillaAttribute_Product;
+
+ public static String BugzillaAttribute_QA_Contact;
+
+ public static String BugzillaAttribute_QA_Contact_NAME;
+
+ public static String BugzillaAttribute_Reassign_to_default_assignee;
+
+ public static String BugzillaAttribute_Remaining;
+
+ public static String BugzillaAttribute_Remove_CC;
+
+ public static String BugzillaAttribute_REPORT_ACCESSIBLE;
+
+ public static String BugzillaAttribute_REPORT_NAME;
+
+ public static String BugzillaAttribute_Reporter;
+
+ public static String BugzillaAttribute_Resolution;
+
+ public static String BugzillaAttribute_Severity;
+
+ public static String BugzillaAttribute_Size;
+
+ public static String BugzillaAttribute_Status;
+
+ public static String BugzillaAttribute_Status_Whiteboard;
+
+ public static String BugzillaAttribute_Summary;
+
+ public static String BugzillaAttribute_Target_milestone;
+
+ public static String BugzillaAttribute_thetext;
+
+ public static String BugzillaAttribute_type;
+
+ public static String BugzillaAttribute_UNKNOWN;
+
+ public static String BugzillaAttribute_URL;
+
+ public static String BugzillaAttribute_used_by_search_engine_bugs;
+
+ public static String BugzillaAttribute_used_by_search_engine_desc;
+
+ public static String BugzillaAttribute_used_by_search_engine_id;
+
+ public static String BugzillaAttribute_used_by_search_engine_installation;
+
+ public static String BugzillaAttribute_used_by_search_engine_li;
+
+ public static String BugzillaAttribute_used_by_search_engine_rdf;
+
+ public static String BugzillaAttribute_used_by_search_engine_result;
+
+ public static String BugzillaAttribute_used_by_search_engine_seq;
+
+ public static String BugzillaAttribute_Version;
+
+ public static String BugzillaAttribute_version_of_bugzilla_installed;
+
+ public static String BugzillaAttribute_Votes;
+
+ public static String BugzillaAttribute_who;
+
+ public static String BugzillaAttribute_who_name;
+
+ public static String BugzillaAttribute_Worked;
+
+ public static String BugzillaClient_could_not_post_form_null_returned;
+
+ public static String BugzillaClient_description_required_when_submitting_attachments;
+
+ public static String BugzillaClient_unable_to_parse_resonse_from;
+
+ public static String BugzillaClient_unable_to_submit_attachment_update;
+
+ public static String BugzillaOperation_Accept_to_ASSIGNED;
+
+ public static String BugzillaOperation_Duplicate_of;
+
+ public static String BugzillaOperation_Leave_as_X_X;
+
+ public static String BugzillaOperation_Mark_as_CLOSED;
+
+ public static String BugzillaOperation_Mark_as_VERIFIED;
+
+ public static String BugzillaOperation_Reassign_to;
+
+ public static String BugzillaOperation_Reopen_bug;
+
+ public static String BugzillaOperation_Resolve_as;
+
+ public static String BugzillaOperation_Reassign_to_default_assignee;
+
+ public static String BugzillaRepositoryConnector_BUGZILLA_SUPPORTS_2_18_TO_3_0;
+
+ public static String BugzillaRepositoryConnector_Check_repository_configuration;
+
+ public static String BugzillaRepositoryConnector_checking_for_changed_tasks;
+
+ public static String BugzillaRepositoryConnector_Checking_for_changed_tasks;
+
+ public static String BugzillaRepositoryConnector_Query_for_changed_tasks;
+
+ public static String BugzillaRepositoryConnector_running_query;
+
+ public static String BugzillaRepositoryConnector_Running_query;
+
+ public static String BugzillaRepositoryConnector_Unrecognized_response_from_server;
+
+ public static String BugzillaTaskAttachmentHandler_Getting_attachment;
+
+ public static String BugzillaTaskAttachmentHandler_Sending_attachment;
+
+ public static String BugzillaTaskAttachmentHandler_unable_to_submit_attachment;
+
+ public static String BugzillaTaskDataHandler_Receiving_task;
+
+ public static String BugzillaTaskDataHandler_Receiving_tasks;
+
+ public static String BugzillaTaskDataHandler_Submitting_task;
+
+ public static String BugzillaTaskDataHandler_updating_attachment;
+
+ public static String IBugzillaConstants_Bugzilla_login_information_or_repository_version_incorrect;
+
+ public static String IBugzillaConstants_invalid_bug_id_requested_bug_id_does_not_exist;
+
+ public static String IBugzillaConstants_invalid_repository_credentials;
+
+ public static String IBugzillaConstants_Mylyn_Bugzilla_Connector;
+
+ public static String IBugzillaConstants_New_Bugzilla_Report;
+
+ public static String IBugzillaConstants_requested_operation_not_permitted;
+
+ public static String SaxMultiBugReportContentHandler_Bug_id_from_server_did_not_match_requested_id;
+
+ public static String SaxMultiBugReportContentHandler_CREATED_AN_ATTACHEMENT_ID;
+
+ public static String SaxMultiBugReportContentHandler_id_not_found;
+}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java
index d0aba1c62..604d54f53 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java
@@ -47,7 +47,7 @@ public class MultiBugReportFactory extends AbstractReportFactory {
if (errorResponse.equals(IBugzillaConstants.XML_ERROR_NOTFOUND)
|| errorResponse.equals(IBugzillaConstants.XML_ERROR_INVALIDBUGID)) {
throw new CoreException(new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY, "", IBugzillaConstants.ERROR_MSG_INVALID_BUG_ID));
+ RepositoryStatus.ERROR_REPOSITORY, "", IBugzillaConstants.ERROR_MSG_INVALID_BUG_ID)); //$NON-NLS-1$
} else if (errorResponse.equals(IBugzillaConstants.XML_ERROR_NOTPERMITTED)) {
BugzillaStatus status = new BugzillaStatus(IStatus.INFO, BugzillaCorePlugin.ID_PLUGIN,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, mapper.getTaskRepository().getRepositoryUrl(),
@@ -55,7 +55,7 @@ public class MultiBugReportFactory extends AbstractReportFactory {
throw new CoreException(status);
} else {
throw new CoreException(new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY, "", "Unexpected error occurred: " + errorResponse));
+ RepositoryStatus.ERROR_REPOSITORY, "", "Unexpected error occurred: " + errorResponse)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
index ae77183ed..a0bacede9 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
@@ -35,9 +35,9 @@ public class RepositoryConfiguration implements Serializable {
// old private static final long serialVersionUID = 575019225495659016L;
private static final long serialVersionUID = -782630475741754124L;
- private static final String VERSION_UNKNOWN = "unknown";
+ private static final String VERSION_UNKNOWN = "unknown"; //$NON-NLS-1$
- private String repositoryUrl = "<unknown>";
+ private String repositoryUrl = "<unknown>"; //$NON-NLS-1$
private final Map<String, ProductEntry> products = new HashMap<String, ProductEntry>();
@@ -378,8 +378,8 @@ public class RepositoryConfiguration implements Serializable {
private void addMissingFlags(TaskData taskData) {
List<String> existingFlags = new ArrayList<String>();
for (TaskAttribute attribute : new HashSet<TaskAttribute>(taskData.getRoot().getAttributes().values())) {
- if (attribute.getId().startsWith("task.common.kind.flag")) {
- TaskAttribute state = attribute.getAttribute("state");
+ if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
+ TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
if (state != null) {
String nameValue = state.getMetaData().getLabel();
if (!existingFlags.contains(nameValue)) {
@@ -392,7 +392,7 @@ public class RepositoryConfiguration implements Serializable {
TaskAttribute componentAttribute = taskData.getRoot().getMappedAttribute(BugzillaAttribute.COMPONENT.getKey());
List<BugzillaFlag> flags = getFlags();
for (BugzillaFlag bugzillaFlag : flags) {
- if (bugzillaFlag.getType().equals("attachment")) {
+ if (bugzillaFlag.getType().equals("attachment")) { //$NON-NLS-1$
continue;
}
if (!bugzillaFlag.isUsedIn(productAttribute.getValue(), componentAttribute.getValue())) {
@@ -402,13 +402,13 @@ public class RepositoryConfiguration implements Serializable {
continue;
}
BugzillaFlagMapper mapper = new BugzillaFlagMapper();
- mapper.setRequestee("");
- mapper.setSetter("");
- mapper.setState(" ");
+ mapper.setRequestee(""); //$NON-NLS-1$
+ mapper.setSetter(""); //$NON-NLS-1$
+ mapper.setState(" "); //$NON-NLS-1$
mapper.setFlagId(bugzillaFlag.getName());
mapper.setNumber(0);
TaskAttribute attribute = taskData.getRoot().createAttribute(
- "task.common.kind.flag_type" + bugzillaFlag.getFlagId());
+ "task.common.kind.flag_type" + bugzillaFlag.getFlagId()); //$NON-NLS-1$
mapper.applyTo(attribute);
}
setFlagsRequestee(taskData);
@@ -416,17 +416,17 @@ public class RepositoryConfiguration implements Serializable {
private void setFlagsRequestee(TaskData taskData) {
for (TaskAttribute attribute : new HashSet<TaskAttribute>(taskData.getRoot().getAttributes().values())) {
- if (attribute.getId().startsWith("task.common.kind.flag")) {
- TaskAttribute state = attribute.getAttribute("state");
+ if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
+ TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
if (state != null) {
String nameValue = state.getMetaData().getLabel();
for (BugzillaFlag bugzillaFlag : flags) {
if (nameValue.equals(bugzillaFlag.getName())) {
- TaskAttribute requestee = attribute.getAttribute("requestee");
+ TaskAttribute requestee = attribute.getAttribute("requestee"); //$NON-NLS-1$
if (requestee == null) {
- requestee = attribute.createMappedAttribute("requestee");
+ requestee = attribute.createMappedAttribute("requestee"); //$NON-NLS-1$
requestee.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- requestee.setValue("");
+ requestee.setValue(""); //$NON-NLS-1$
}
requestee.getMetaData().setReadOnly(!bugzillaFlag.isSpecifically_requestable());
}
@@ -452,8 +452,8 @@ public class RepositoryConfiguration implements Serializable {
continue;
}
- if (attribute.getId().startsWith("task.common.kind.flag")) {
- attribute = attribute.getAttribute("state");
+ if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
+ attribute = attribute.getAttribute("state"); //$NON-NLS-1$
}
attribute.clearOptions();
@@ -475,35 +475,35 @@ public class RepositoryConfiguration implements Serializable {
}
}
- } else if (attribute.getId().startsWith("task.common.kind.flag")) {
+ } else if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
- TaskAttribute state = attribute.getAttribute("state");
+ TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
if (state != null) {
String nameValue = state.getMetaData().getLabel();
- options.add("");
+ options.add(""); //$NON-NLS-1$
for (BugzillaFlag bugzillaFlag : flags) {
if (nameValue.equals(bugzillaFlag.getName())) {
if (nameValue.equals(bugzillaFlag.getName())) {
if (bugzillaFlag.isRequestable()) {
- options.add("?");
+ options.add("?"); //$NON-NLS-1$
}
break;
}
}
}
- options.add("+");
- options.add("-");
+ options.add("+"); //$NON-NLS-1$
+ options.add("-"); //$NON-NLS-1$
}
}
else {
String kind = attribute.getMetaData().getKind();
- if (kind != null && kind.equals("task.common.kind.flag")) {
- options.add("");
- options.add("?");
- options.add("+");
- options.add("-");
+ if (kind != null && kind.equals("task.common.kind.flag")) { //$NON-NLS-1$
+ options.add(""); //$NON-NLS-1$
+ options.add("?"); //$NON-NLS-1$
+ options.add("+"); //$NON-NLS-1$
+ options.add("-"); //$NON-NLS-1$
} else {
BugzillaAttribute element;
@@ -572,11 +572,11 @@ public class RepositoryConfiguration implements Serializable {
}
String bugzillaVersion = getInstallVersion();
if (bugzillaVersion == null) {
- bugzillaVersion = "2.18";
+ bugzillaVersion = "2.18"; //$NON-NLS-1$
}
if (status == BUGZILLA_REPORT_STATUS.NEW || status == BUGZILLA_REPORT_STATUS.ASSIGNED
|| status == BUGZILLA_REPORT_STATUS.REOPENED || status == BUGZILLA_REPORT_STATUS.UNCONFIRMED) {
- if (bugzillaVersion.compareTo("3.1") < 0) {
+ if (bugzillaVersion.compareTo("3.1") < 0) { //$NON-NLS-1$
// old bugzilla workflow is used
addOperation(bugReport, BugzillaOperation.reassign);
addOperation(bugReport, BugzillaOperation.reassignbycomponent);
@@ -591,7 +591,7 @@ public class RepositoryConfiguration implements Serializable {
.setKind(key.getKind())
.setLabel(key.toString())
.setType(key.getType());
- operationAttribute.setValue("0");
+ operationAttribute.setValue("0"); //$NON-NLS-1$
}
operationAttribute = bugReport.getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED);
if (operationAttribute != null) {
@@ -611,7 +611,7 @@ public class RepositoryConfiguration implements Serializable {
switch (opcode) {
case none:
attribute = bugReport.getRoot().createAttribute(TaskAttribute.PREFIX_OPERATION + opcode.toString());
- String label = "Leave";
+ String label = "Leave"; //$NON-NLS-1$
TaskAttribute attributeStatus = bugReport.getRoot().getMappedAttribute(TaskAttribute.STATUS);
TaskAttribute attributeResolution = bugReport.getRoot().getMappedAttribute(TaskAttribute.RESOLUTION);
if (attributeStatus != null && attributeResolution != null) {
@@ -630,7 +630,7 @@ public class RepositoryConfiguration implements Serializable {
attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, opcode.getInputId());
for (String resolution : getResolutions()) {
// DUPLICATE and MOVED have special meanings so do not show as resolution
- if (resolution.compareTo("DUPLICATE") != 0 && resolution.compareTo("MOVED") != 0) {
+ if (resolution.compareTo("DUPLICATE") != 0 && resolution.compareTo("MOVED") != 0) { //$NON-NLS-1$ //$NON-NLS-2$
attrResolvedInput.putOption(resolution, resolution);
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java
index 2a4c3326d..8e1d7910c 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java
@@ -33,69 +33,69 @@ import org.xml.sax.helpers.DefaultHandler;
*/
public class SaxConfigurationContentHandler extends DefaultHandler {
- private static final String ELEMENT_RESOLUTION = "resolution";
+ private static final String ELEMENT_RESOLUTION = "resolution"; //$NON-NLS-1$
- private static final String ELEMENT_STATUS_OPEN = "status_open";
+ private static final String ELEMENT_STATUS_OPEN = "status_open"; //$NON-NLS-1$
- private static final String ELEMENT_TARGET_MILESTONE = "target_milestone";
+ private static final String ELEMENT_TARGET_MILESTONE = "target_milestone"; //$NON-NLS-1$
- private static final String ELEMENT_TARGET_MILESTONES = "target_milestones";
+ private static final String ELEMENT_TARGET_MILESTONES = "target_milestones"; //$NON-NLS-1$
- private static final String ELEMENT_INSTALL_VERSION = "install_version";
+ private static final String ELEMENT_INSTALL_VERSION = "install_version"; //$NON-NLS-1$
- private static final String ATTRIBUTE_RDF_ABOUT = "rdf:about";
+ private static final String ATTRIBUTE_RDF_ABOUT = "rdf:about"; //$NON-NLS-1$
- private static final String ATTRIBUTE_RESOURCE = "resource";
+ private static final String ATTRIBUTE_RESOURCE = "resource"; //$NON-NLS-1$
- private static final String ELEMENT_VERSION = "version";
+ private static final String ELEMENT_VERSION = "version"; //$NON-NLS-1$
- private static final String ELEMENT_VERSIONS = "versions";
+ private static final String ELEMENT_VERSIONS = "versions"; //$NON-NLS-1$
- private static final String ELEMENT_COMPONENT = "component";
+ private static final String ELEMENT_COMPONENT = "component"; //$NON-NLS-1$
- private static final String ELEMENT_COMPONENTS = "components";
+ private static final String ELEMENT_COMPONENTS = "components"; //$NON-NLS-1$
- private static final String ELEMENT_NAME = "name";
+ private static final String ELEMENT_NAME = "name"; //$NON-NLS-1$
- private static final String ELEMENT_PRODUCTS = "products";
+ private static final String ELEMENT_PRODUCTS = "products"; //$NON-NLS-1$
- private static final String ELEMENT_DESCRIPTION = "description";
+ private static final String ELEMENT_DESCRIPTION = "description"; //$NON-NLS-1$
- private static final String ELEMENT_FIELDS = "fields";
+ private static final String ELEMENT_FIELDS = "fields"; //$NON-NLS-1$
- private static final String ELEMENT_FIELD = "field";
+ private static final String ELEMENT_FIELD = "field"; //$NON-NLS-1$
- private static final String ELEMENT_FLAG_TYPES = "flag_types";
+ private static final String ELEMENT_FLAG_TYPES = "flag_types"; //$NON-NLS-1$
- private static final String ELEMENT_FLAG_TYPE = "flag_type";
+ private static final String ELEMENT_FLAG_TYPE = "flag_type"; //$NON-NLS-1$
- private static final String ELEMENT_SEVERITY = "severity";
+ private static final String ELEMENT_SEVERITY = "severity"; //$NON-NLS-1$
- private static final String ELEMENT_PRIORITY = "priority";
+ private static final String ELEMENT_PRIORITY = "priority"; //$NON-NLS-1$
- private static final String ELEMENT_KEYWORD = "keyword";
+ private static final String ELEMENT_KEYWORD = "keyword"; //$NON-NLS-1$
- private static final String ELEMENT_OP_SYS = "op_sys";
+ private static final String ELEMENT_OP_SYS = "op_sys"; //$NON-NLS-1$
- private static final String ELEMENT_PLATFORM = "platform";
+ private static final String ELEMENT_PLATFORM = "platform"; //$NON-NLS-1$
- private static final String ELEMENT_LI = "li";
+ private static final String ELEMENT_LI = "li"; //$NON-NLS-1$
- private static final String ELEMENT_STATUS = "status";
+ private static final String ELEMENT_STATUS = "status"; //$NON-NLS-1$
- private static final String ELEMENT_TYPE = "type";
+ private static final String ELEMENT_TYPE = "type"; //$NON-NLS-1$
- private static final String ELEMENT_TYPE_DESC = "type_desc";
+ private static final String ELEMENT_TYPE_DESC = "type_desc"; //$NON-NLS-1$
- private static final String ELEMENT_ENTER_BUG = "enter_bug";
+ private static final String ELEMENT_ENTER_BUG = "enter_bug"; //$NON-NLS-1$
- private static final String ELEMENT_REQUESTABLE = "requestable";
+ private static final String ELEMENT_REQUESTABLE = "requestable"; //$NON-NLS-1$
- private static final String ELEMENT_SPECIFICALLY_REQUESTABLE = "specifically_requestable";
+ private static final String ELEMENT_SPECIFICALLY_REQUESTABLE = "specifically_requestable"; //$NON-NLS-1$
- private static final String ELEMENT_ID = "id";
+ private static final String ELEMENT_ID = "id"; //$NON-NLS-1$
- private static final String ELEMENT_MULTIPLICABLE = "multiplicable";
+ private static final String ELEMENT_MULTIPLICABLE = "multiplicable"; //$NON-NLS-1$
private static final int EXPECTING_ROOT = 0;
@@ -151,11 +151,11 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
private int state = EXPECTING_ROOT;
- private String currentProduct = "";
+ private String currentProduct = ""; //$NON-NLS-1$
- private String currentName = "";
+ private String currentName = ""; //$NON-NLS-1$
- private String currentDescription = "";
+ private String currentDescription = ""; //$NON-NLS-1$
private String currentType;
@@ -167,9 +167,9 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
private int currentId;
- private String currentTypeDesc = "";
+ private String currentTypeDesc = ""; //$NON-NLS-1$
- private String currentEnterBug = "";
+ private String currentEnterBug = ""; //$NON-NLS-1$
private StringBuffer characters = new StringBuffer();
@@ -195,9 +195,9 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
private final Map<String, Integer> flagIds = new HashMap<String, Integer>();
- private String currentComponent = "";
+ private String currentComponent = ""; //$NON-NLS-1$
- private String currentCustomOptionName = "";
+ private String currentCustomOptionName = ""; //$NON-NLS-1$
public RepositoryConfiguration getConfiguration() {
return configuration;
@@ -260,11 +260,11 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
} else if (localName.equals(ELEMENT_FIELD)) {
state = state | IN_FIELD;
parseResource(attributes);
- currentName = "";
- currentDescription = "";
- currentType = "";
- currentTypeDesc = "";
- currentEnterBug = "";
+ currentName = ""; //$NON-NLS-1$
+ currentDescription = ""; //$NON-NLS-1$
+ currentType = ""; //$NON-NLS-1$
+ currentTypeDesc = ""; //$NON-NLS-1$
+ currentEnterBug = ""; //$NON-NLS-1$
currentId = -1;
} else if (localName.equals(ELEMENT_FLAG_TYPES)) {
state = state | IN_FLAG_TYPES;
@@ -430,7 +430,7 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
state = state & ~IN_FLAG_TYPE;
} else if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
state = state & ~IN_CUSTOM_OPTION;
- currentCustomOptionName = "";
+ currentCustomOptionName = ""; //$NON-NLS-1$
}
}
@@ -492,7 +492,7 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
flagsForComponent = new ArrayList<String>();
flagComponentList.put(currentComponent, flagsForComponent);
}
- flagsForComponent.add(compURI.replace("flags.cgi?id=", "flag.cgi?id="));
+ flagsForComponent.add(compURI.replace("flags.cgi?id=", "flag.cgi?id=")); //$NON-NLS-1$ //$NON-NLS-2$
int i = 0;
i++;
}
@@ -501,7 +501,7 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
case IN_COMPONENTS | IN_LI | IN_COMPONENT:
if (attributes != null) {
about = attributes.getValue(ATTRIBUTE_RDF_ABOUT);
- int idx = about.indexOf("&product=");
+ int idx = about.indexOf("&product="); //$NON-NLS-1$
if (idx != -1) {
currentProduct = about.substring(idx + 9);
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
index 04970451e..7cfcbf4fe 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
@@ -35,9 +35,9 @@ import org.xml.sax.helpers.DefaultHandler;
*/
public class SaxMultiBugReportContentHandler extends DefaultHandler {
- private static final String ATTRIBUTE_NAME = "name";
+ private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
- private static final String COMMENT_ATTACHMENT_STRING = "Created an attachment (id=";
+ private static final String COMMENT_ATTACHMENT_STRING = Messages.SaxMultiBugReportContentHandler_CREATED_AN_ATTACHEMENT_ID;
private StringBuffer characters;
@@ -109,8 +109,8 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
// Note: here we can get the bugzilla version if necessary
break;
case BUG:
- if (attributes != null && (attributes.getValue("error") != null)) {
- errorMessage = attributes.getValue("error");
+ if (attributes != null && (attributes.getValue("error") != null)) { //$NON-NLS-1$
+ errorMessage = attributes.getValue("error"); //$NON-NLS-1$
}
attachIdToComment = new HashMap<String, TaskCommentMapper>();
commentNum = 0;
@@ -159,8 +159,8 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
break;
case ATTACHMENT:
if (attributes != null) {
- isDeprecated = "1".equals(attributes.getValue(BugzillaAttribute.IS_OBSOLETE.getKey()));
- isPatch = "1".equals(attributes.getValue(BugzillaAttribute.IS_PATCH.getKey()));
+ isDeprecated = "1".equals(attributes.getValue(BugzillaAttribute.IS_OBSOLETE.getKey())); //$NON-NLS-1$
+ isPatch = "1".equals(attributes.getValue(BugzillaAttribute.IS_PATCH.getKey())); //$NON-NLS-1$
}
break;
case FLAG:
@@ -168,17 +168,17 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
String name = attributes.getValue(ATTRIBUTE_NAME);
if (name != null) {
BugzillaFlagMapper mapper = new BugzillaFlagMapper();
- String requestee = attributes.getValue("requestee");
+ String requestee = attributes.getValue("requestee"); //$NON-NLS-1$
mapper.setRequestee(requestee);
- String setter = attributes.getValue("setter");
+ String setter = attributes.getValue("setter"); //$NON-NLS-1$
mapper.setSetter(setter);
- String status = attributes.getValue("status");
+ String status = attributes.getValue("status"); //$NON-NLS-1$
mapper.setState(status);
mapper.setFlagId(name);
- String id = attributes.getValue("id");
+ String id = attributes.getValue("id"); //$NON-NLS-1$
mapper.setNumber(Integer.valueOf(id));
TaskAttribute attribute = repositoryTaskData.getRoot()
- .createAttribute("task.common.kind.flag" + id);
+ .createAttribute("task.common.kind.flag" + id); //$NON-NLS-1$
mapper.applyTo(attribute);
}
}
@@ -200,7 +200,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
TaskAttribute endAttribute = repositoryTaskData.getRoot().getAttribute(localName);
if (endAttribute == null) {
- String desc = "???";
+ String desc = "???"; //$NON-NLS-1$
BugzillaCustomField customField = null;
for (BugzillaCustomField bugzillaCustomField : customFields) {
if (localName.equals(bugzillaCustomField.getName())) {
@@ -262,10 +262,10 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
try {
repositoryTaskData = taskDataMap.get(parsedText.trim());
if (repositoryTaskData == null) {
- errorMessage = parsedText + " id not found.";
+ errorMessage = parsedText + Messages.SaxMultiBugReportContentHandler_id_not_found;
}
} catch (Exception e) {
- errorMessage = "Bug id from server did not match requested id.";
+ errorMessage = Messages.SaxMultiBugReportContentHandler_Bug_id_from_server_did_not_match_requested_id;
}
TaskAttribute attr = repositoryTaskData.getRoot().getMappedAttribute(tag.getKey());
@@ -367,7 +367,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
BugzillaAttribute.LONGDESCLENGTH);
}
- numCommentsAttribute.setValue("" + commentNum);
+ numCommentsAttribute.setValue("" + commentNum); //$NON-NLS-1$
updateAttachmentMetaData();
TaskAttribute attrCreation = repositoryTaskData.getRoot().getAttribute(
@@ -376,7 +376,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
updateCustomFields(repositoryTaskData);
// Guard against empty data sets
- if (attrCreation != null && !attrCreation.equals("")) {
+ if (attrCreation != null && !attrCreation.equals("")) { //$NON-NLS-1$
collector.accept(repositoryTaskData);
}
break;
@@ -387,10 +387,10 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
if (blockOrDepends == null) {
BugzillaTaskDataHandler.createAttribute(repositoryTaskData, tag).setValue(parsedText);
} else {
- if (blockOrDepends.getValue().equals("")) {
+ if (blockOrDepends.getValue().equals("")) { //$NON-NLS-1$
blockOrDepends.setValue(parsedText);
} else {
- blockOrDepends.setValue(blockOrDepends.getValue() + ", " + parsedText);
+ blockOrDepends.setValue(blockOrDepends.getValue() + ", " + parsedText); //$NON-NLS-1$
}
}
break;
@@ -531,7 +531,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
TaskAttribute attribute = repositoryTaskData.getRoot().createAttribute(
TaskAttribute.PREFIX_COMMENT + commentNum);
TaskCommentMapper taskComment = TaskCommentMapper.createFrom(attribute);
- taskComment.setCommentId(commentNum + "");
+ taskComment.setCommentId(commentNum + ""); //$NON-NLS-1$
taskComment.setNumber(commentNum);
IRepositoryPerson author = repositoryTaskData.getAttributeMapper().getTaskRepository().createPerson(
comment.author);
@@ -555,13 +555,13 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
/** determines attachment id from comment */
private void parseAttachment(TaskCommentMapper comment) {
- String attachmentID = "";
+ String attachmentID = ""; //$NON-NLS-1$
String commentText = comment.getText();
if (commentText.startsWith(COMMENT_ATTACHMENT_STRING)) {
- int endIndex = commentText.indexOf(")");
+ int endIndex = commentText.indexOf(")"); //$NON-NLS-1$
if (endIndex > 0 && endIndex < commentText.length()) {
attachmentID = commentText.substring(COMMENT_ATTACHMENT_STRING.length(), endIndex);
- if (!attachmentID.equals("")) {
+ if (!attachmentID.equals("")) { //$NON-NLS-1$
attachIdToComment.put(attachmentID, comment);
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java
index 9f0671376..e68d290f2 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java
@@ -39,21 +39,21 @@ public class XmlCleaner {
try {
BufferedWriter content = new BufferedWriter(new FileWriter(tempFile));
// Hack since HtmlStreamTokenizer not familiar with xml tag.
- content.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ content.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
if (token.getType() == Token.TAG) {
HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getAttribute("resource") != null) {
- String resourceID = tag.getAttribute("resource");
- tag.setAttribute("resource", resourceID.replace("&", "&amp;"));
+ if (tag.getAttribute("resource") != null) { //$NON-NLS-1$
+ String resourceID = tag.getAttribute("resource"); //$NON-NLS-1$
+ tag.setAttribute("resource", resourceID.replace("&", "&amp;")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- if (tag.getAttribute("rdf:about") != null) {
- String resourceID = tag.getAttribute("rdf:about");
- tag.setAttribute("rdf:about", resourceID.replace("&", "&amp;"));
+ if (tag.getAttribute("rdf:about") != null) { //$NON-NLS-1$
+ String resourceID = tag.getAttribute("rdf:about"); //$NON-NLS-1$
+ tag.setAttribute("rdf:about", resourceID.replace("&", "&amp;")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
- if (!token.toString().startsWith("<?xml")) {
+ if (!token.toString().startsWith("<?xml")) { //$NON-NLS-1$
content.append(token.toString());
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java
index 080200c2e..cd4ea3d32 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java
@@ -32,7 +32,7 @@ public class AssignmentEvent extends TaskRevision {
@Override
public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | "
+ return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ this.getAssigned();
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java
index d070424c2..39c790872 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java
@@ -23,7 +23,7 @@ public class AttachmentEvent extends TaskRevision {
private static final long serialVersionUID = 3258693199936631348L;
- private static final Pattern id = Pattern.compile("\\d+");
+ private static final Pattern id = Pattern.compile("\\d+"); //$NON-NLS-1$
private final int attachmentId;
@@ -36,9 +36,9 @@ public class AttachmentEvent extends TaskRevision {
}
public String getFlagsString() {
- String flagString = "";
+ String flagString = ""; //$NON-NLS-1$
for (AttachmentFlag flag : this.flags) {
- flagString += flag + " ";
+ flagString += flag + " "; //$NON-NLS-1$
}
return flagString;
}
@@ -50,7 +50,7 @@ public class AttachmentEvent extends TaskRevision {
}
// Error situation
- System.err.println("WARNING: Cannot find attachment id in " + attachment);
+ System.err.println("WARNING: Cannot find attachment id in " + attachment); //$NON-NLS-1$
return -1;
}
@@ -59,16 +59,16 @@ public class AttachmentEvent extends TaskRevision {
AttachmentFlagStatus flagStatus = AttachmentFlagStatus.UNKNOWN;
AttachmentFlagState flagState = AttachmentFlagState.UNKNOWN;
- String[] flagToken = attachmentFlags.split(", ");
+ String[] flagToken = attachmentFlags.split(", "); //$NON-NLS-1$
for (String token : flagToken) {
- if (token.indexOf("(") != -1) {
- int end = token.indexOf("(");
+ if (token.indexOf("(") != -1) { //$NON-NLS-1$
+ int end = token.indexOf("("); //$NON-NLS-1$
String substr = token.substring(0, end);
token = substr;
}
/* Handle the case of the obsolete status 'needs-work' */
- if (token.startsWith("needs-work")) {
+ if (token.startsWith("needs-work")) { //$NON-NLS-1$
/*
* Since we don't know if 'needs-work' applies to 'review' or
* 'superreview', deny both
@@ -80,7 +80,7 @@ public class AttachmentEvent extends TaskRevision {
AttachmentFlagStatus.REVIEW.name().toLowerCase());
boolean firstOrSecondReview = token.toLowerCase().contains(
AttachmentFlagStatus.REVIEW.name().toLowerCase())
- && (token.toLowerCase().startsWith("first-") || token.toLowerCase().startsWith("second-"));
+ && (token.toLowerCase().startsWith("first-") || token.toLowerCase().startsWith("second-")); //$NON-NLS-1$ //$NON-NLS-2$
/*
* if(firstOrSecondReview){ System.err.println("First/second
* activated"); }
@@ -105,14 +105,14 @@ public class AttachmentEvent extends TaskRevision {
flagStatus = AttachmentFlagStatus.NONE;
} else if (token.toLowerCase().startsWith(AttachmentFlagStatus.REJECTED.name().toLowerCase())) {
flagStatus = AttachmentFlagStatus.REJECTED;
- } else if (token.equals("1")
+ } else if (token.equals("1") //$NON-NLS-1$
|| token.toLowerCase().startsWith(AttachmentFlagStatus.OBSOLETE.name().toLowerCase())) {
flagStatus = AttachmentFlagStatus.OBSOLETE;
}
// Assure that flag was set to something meaningful
- if (flagStatus.equals(AttachmentFlagStatus.UNKNOWN) && token.equals("") == false) {
- System.err.println("WARNING: Attachment flag status unknown: " + token);
+ if (flagStatus.equals(AttachmentFlagStatus.UNKNOWN) && token.equals("") == false) { //$NON-NLS-1$
+ System.err.println("WARNING: Attachment flag status unknown: " + token); //$NON-NLS-1$
}
if (token.length() > 0) {
@@ -133,8 +133,8 @@ public class AttachmentEvent extends TaskRevision {
}
}
// Assure that flag state was set to something meaningful
- if (flagState.equals(AttachmentFlagState.UNKNOWN) && token.equals("") == false) {
- System.err.println("WARNING: Attachment flag state unknown: " + token);
+ if (flagState.equals(AttachmentFlagState.UNKNOWN) && token.equals("") == false) { //$NON-NLS-1$
+ System.err.println("WARNING: Attachment flag state unknown: " + token); //$NON-NLS-1$
}
flags.add(new AttachmentFlag(flagStatus, flagState));
@@ -145,7 +145,7 @@ public class AttachmentEvent extends TaskRevision {
@Override
public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.attachmentId + " | "
+ return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.attachmentId + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ this.getFlagsString();
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java
index ab2cb1e92..65a5fa52a 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java
@@ -42,7 +42,7 @@ public class AttachmentFlag implements Serializable {
@Override
public String toString() {
- return this.status.name() + "[" + (this.state.equals(AttachmentFlagState.UNKNOWN) ? "" : this.state.name())
- + "]";
+ return this.status.name() + "[" + (this.state.equals(AttachmentFlagState.UNKNOWN) ? "" : this.state.name()) //$NON-NLS-1$ //$NON-NLS-2$
+ + "]"; //$NON-NLS-1$
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java
index 8f3c956a2..6c6e44c3c 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java
@@ -61,7 +61,7 @@ public class BugzillaTaskHistoryParser {
boolean isTitle = false;
boolean possibleBadLogin = false;
- String title = "";
+ String title = ""; //$NON-NLS-1$
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
// make sure that bugzilla doesn't want us to login
@@ -74,7 +74,7 @@ public class BugzillaTaskHistoryParser {
if (isTitle) {
// get all of the data from inside of the title tag
if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase() + " ";
+ title += ((StringBuffer) token.getValue()).toString().toLowerCase() + " "; //$NON-NLS-1$
continue;
} else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
&& ((HtmlTag) token.getValue()).isEndTag()) {
@@ -91,7 +91,7 @@ public class BugzillaTaskHistoryParser {
possibleBadLogin = true;
}
isTitle = false;
- title = "";
+ title = ""; //$NON-NLS-1$
}
continue;
}
@@ -118,7 +118,7 @@ public class BugzillaTaskHistoryParser {
// if we don't have any keywords and suspect that there was a login
// problem, assume we had a login problem
if (activity.size() == 0 && possibleBadLogin) {
- throw new LoginException("Bugzilla login information incorrect");
+ throw new LoginException("Bugzilla login information incorrect"); //$NON-NLS-1$
}
return activity;
}
@@ -168,8 +168,8 @@ public class BugzillaTaskHistoryParser {
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
if (token.getType() == Token.TAG) {
tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.TD && tag.hasAttribute("rowspan")) {
- numChanges = tag.getIntAttribute("rowspan");
+ if (tag.getTagType() == Tag.TD && tag.hasAttribute("rowspan")) { //$NON-NLS-1$
+ numChanges = tag.getIntAttribute("rowspan"); //$NON-NLS-1$
break;
}
}
@@ -213,8 +213,8 @@ public class BugzillaTaskHistoryParser {
tag = (HtmlTag) token.getValue();
if (tag.getTagType() == Tag.TD && tag.isEndTag()) {
String data = StringEscapeUtils.unescapeHtml(sb.toString());
- if (data.startsWith("\n") && (data.contains("Attachment") == false)) {
- data = ""; // empty field
+ if (data.startsWith("\n") && (data.contains("Attachment") == false)) { //$NON-NLS-1$ //$NON-NLS-2$
+ data = ""; // empty field //$NON-NLS-1$
}
return data;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java
new file mode 100644
index 000000000..ba94cbc5d
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.bugzilla.core.history;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.core.history.messages"; //$NON-NLS-1$
+
+ static {
+ // load message values from bundle file
+ reloadMessages();
+ }
+
+ public static void reloadMessages() {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ public static String ResolutionType_Unknown_resolution_type_X;
+
+ public static String StatusType_Unknown_status_type_X;
+}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java
index 147cb3bd5..bc21d146a 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java
@@ -35,8 +35,8 @@ public class ResolutionEvent extends TaskRevision {
@Override
public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | "
- + (this.getType().equals(ResolutionType.UNKNOWN) ? "" : this.getType());
+ return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ + (this.getType().equals(ResolutionType.UNKNOWN) ? "" : this.getType()); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java
index 27610d264..33ff708ad 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java
@@ -11,6 +11,8 @@
package org.eclipse.mylyn.internal.bugzilla.core.history;
+import java.text.MessageFormat;
+
/**
* @author John Anvik
*/
@@ -19,77 +21,77 @@ public enum ResolutionType {
FIXED, DUPLICATE, WONTFIX, INVALID, WORKSFORME, REOPENED, LATER, REMIND, MOVED, UNKNOWN, NOTABUG, NOTGNOME, INCOMPLETE, OBSOLETE, EXPIRED, NOTXIMIAN, NEXTRELEASE, ERRATA, RAWHIDE, UPSTREAM, CANTFIX, CURRENTRELEASE, INSUFFICIENT_DATA, DEFERRED;
public static ResolutionType convert(String change) {
- if (change.equals("FIXED")) {
+ if (change.equals("FIXED")) { //$NON-NLS-1$
return ResolutionType.FIXED;
}
- if (change.contains("DUPLICATE")) {
+ if (change.contains("DUPLICATE")) { //$NON-NLS-1$
return ResolutionType.DUPLICATE;
}
- if (change.equals("INVALID")) {
+ if (change.equals("INVALID")) { //$NON-NLS-1$
return ResolutionType.INVALID;
}
- if (change.equals("LATER")) {
+ if (change.equals("LATER")) { //$NON-NLS-1$
return ResolutionType.LATER;
}
- if (change.equals("WORKSFORME")) {
+ if (change.equals("WORKSFORME")) { //$NON-NLS-1$
return ResolutionType.WORKSFORME;
}
- if (change.equals("REOPENED")) {
+ if (change.equals("REOPENED")) { //$NON-NLS-1$
return ResolutionType.REOPENED;
}
- if (change.equals("WONTFIX")) {
+ if (change.equals("WONTFIX")) { //$NON-NLS-1$
return ResolutionType.WONTFIX;
}
- if (change.equals("REMIND")) {
+ if (change.equals("REMIND")) { //$NON-NLS-1$
return ResolutionType.REMIND;
}
- if (change.equals("MOVED")) {
+ if (change.equals("MOVED")) { //$NON-NLS-1$
return ResolutionType.MOVED;
}
- if (change.equals("EXPIRED")) {
+ if (change.equals("EXPIRED")) { //$NON-NLS-1$
return ResolutionType.EXPIRED;
}
- if (change.equals("NOTABUG")) { // Gnome
+ if (change.equals("NOTABUG")) { // Gnome //$NON-NLS-1$
return ResolutionType.NOTABUG;
}
- if (change.equals("NOTGNOME")) { // Gnome
+ if (change.equals("NOTGNOME")) { // Gnome //$NON-NLS-1$
return ResolutionType.NOTGNOME;
}
- if (change.equals("INCOMPLETE")) { // Gnome
+ if (change.equals("INCOMPLETE")) { // Gnome //$NON-NLS-1$
return ResolutionType.INCOMPLETE;
}
- if (change.equals("OBSOLETE")) { // Gnome
+ if (change.equals("OBSOLETE")) { // Gnome //$NON-NLS-1$
return ResolutionType.OBSOLETE;
}
- if (change.equals("NOTXIMIAN")) { // Gnome
+ if (change.equals("NOTXIMIAN")) { // Gnome //$NON-NLS-1$
return ResolutionType.NOTXIMIAN;
}
- if (change.equals("NEXTRELEASE")) { // Redhat
+ if (change.equals("NEXTRELEASE")) { // Redhat //$NON-NLS-1$
return ResolutionType.NEXTRELEASE;
}
- if (change.equals("ERRATA")) {// Redhat
+ if (change.equals("ERRATA")) {// Redhat //$NON-NLS-1$
return ResolutionType.ERRATA;
}
- if (change.equals("RAWHIDE")) {// Redhat
+ if (change.equals("RAWHIDE")) {// Redhat //$NON-NLS-1$
return ResolutionType.RAWHIDE;
}
- if (change.equals("UPSTREAM")) {// Redhat
+ if (change.equals("UPSTREAM")) {// Redhat //$NON-NLS-1$
return ResolutionType.UPSTREAM;
}
- if (change.equals("CANTFIX")) {// Redhat
+ if (change.equals("CANTFIX")) {// Redhat //$NON-NLS-1$
return ResolutionType.CANTFIX;
}
- if (change.equals("CURRENTRELEASE")) {// Redhat
+ if (change.equals("CURRENTRELEASE")) {// Redhat //$NON-NLS-1$
return ResolutionType.CURRENTRELEASE;
}
- if (change.equals("INSUFFICIENT_DATA")) {// Redhat
+ if (change.equals("INSUFFICIENT_DATA")) {// Redhat //$NON-NLS-1$
return ResolutionType.INSUFFICIENT_DATA;
}
- if (change.equals("DEFERRED")) {// Redhat
+ if (change.equals("DEFERRED")) {// Redhat //$NON-NLS-1$
return ResolutionType.DEFERRED;
}
- if (change.equals("") == false) {
- System.err.println("Unknown resolution type: " + change);
+ if (change.equals("") == false) { //$NON-NLS-1$
+ System.err.println(MessageFormat.format(Messages.ResolutionType_Unknown_resolution_type_X, change));
}
return ResolutionType.UNKNOWN;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java
index 3d3080183..42090350a 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java
@@ -31,7 +31,7 @@ public class StatusEvent extends TaskRevision {
@Override
public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | "
+ return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ this.getType();
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java
index 08591af16..922e642e2 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java
@@ -11,6 +11,8 @@
package org.eclipse.mylyn.internal.bugzilla.core.history;
+import java.text.MessageFormat;
+
/**
* @author John Anvik
*/
@@ -31,68 +33,68 @@ public enum StatusType {
UNKNOWN;
public static StatusType convert(String change) {
- if (change.equals("RESOLVED")) {
+ if (change.equals("RESOLVED")) { //$NON-NLS-1$
return RESOLVED;
}
- if (change.equals("ASSIGNED")) {
+ if (change.equals("ASSIGNED")) { //$NON-NLS-1$
return ASSIGNED;
}
- if (change.equals("NEW")) {
+ if (change.equals("NEW")) { //$NON-NLS-1$
return NEW;
}
- if (change.equals("REOPENED")) {
+ if (change.equals("REOPENED")) { //$NON-NLS-1$
return REOPENED;
}
- if (change.equals("CLOSED")) {
+ if (change.equals("CLOSED")) { //$NON-NLS-1$
return CLOSED;
}
- if (change.equals("VERIFIED")) {
+ if (change.equals("VERIFIED")) { //$NON-NLS-1$
return VERIFIED;
}
- if (change.equals("UNCONFIRMED")) {
+ if (change.equals("UNCONFIRMED")) { //$NON-NLS-1$
return UNCONFIRMED;
}
- if (change.startsWith("NEEDINFO")) {
+ if (change.startsWith("NEEDINFO")) { //$NON-NLS-1$
return NEEDINFO;
}
- if (change.equals("WAITING")) {
+ if (change.equals("WAITING")) { //$NON-NLS-1$
return WAITING;
}
- if (change.equals("SUSPENDED")) {
+ if (change.equals("SUSPENDED")) { //$NON-NLS-1$
return SUSPENDED;
}
- if (change.equals("MODIFIED")) {
+ if (change.equals("MODIFIED")) { //$NON-NLS-1$
return MODIFIED;
}
- if (change.equals("POST")) {
+ if (change.equals("POST")) { //$NON-NLS-1$
return POST;
}
- if (change.equals("INVESTIGATE")) {
+ if (change.equals("INVESTIGATE")) { //$NON-NLS-1$
return INVESTIGATE;
}
- if (change.equals("PASSES_QA")) {
+ if (change.equals("PASSES_QA")) { //$NON-NLS-1$
return PASSES_QA;
}
- if (change.equals("PROD_READY")) {
+ if (change.equals("PROD_READY")) { //$NON-NLS-1$
return PROD_READY;
}
- if (change.equals("RELEASE_PENDING")) {
+ if (change.equals("RELEASE_PENDING")) { //$NON-NLS-1$
return RELEASE_PENDING;
}
- if (change.equals("ON_QA")) {
+ if (change.equals("ON_QA")) { //$NON-NLS-1$
return ON_QA;
}
- if (change.equals("QA_READY")) {
+ if (change.equals("QA_READY")) { //$NON-NLS-1$
return QA_READY;
}
- if (change.equals("FAILS_QA")) {
+ if (change.equals("FAILS_QA")) { //$NON-NLS-1$
return FAILS_QA;
}
- if (change.equals("SPEC")) {
+ if (change.equals("SPEC")) { //$NON-NLS-1$
return SPEC;
}
- if (change.equals("") == false) {
- System.err.println("Unknown status type: " + change);
+ if (change.equals("") == false) { //$NON-NLS-1$
+ System.err.println(MessageFormat.format(Messages.StatusType_Unknown_status_type_X, change));
}
return UNKNOWN;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java
index 2b0f1a131..71edf7e81 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java
@@ -90,7 +90,7 @@ public class TaskHistory implements Iterable<TaskRevision>, Serializable {
StringBuffer sb = new StringBuffer();
for (Object event : this) {
sb.append(event);
- sb.append("\n");
+ sb.append("\n"); //$NON-NLS-1$
}
return sb.toString();
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java
index 19d476f9a..54ab0c4c0 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java
@@ -20,13 +20,13 @@ public class TaskRevision implements Comparable<TaskRevision>, Serializable {
private static final long serialVersionUID = 7739060501945994522L;
- protected final static String STATUS = "Status";
+ protected final static String STATUS = "Status"; //$NON-NLS-1$
- protected final static String RESOLUTION = "Resolution";
+ protected final static String RESOLUTION = "Resolution"; //$NON-NLS-1$
- protected final static String ASSIGNMENT = "AssignedTo";
+ protected final static String ASSIGNMENT = "AssignedTo"; //$NON-NLS-1$
- protected final static String ATTACHMENT = "Attachment";
+ protected final static String ATTACHMENT = "Attachment"; //$NON-NLS-1$
protected String name;
@@ -39,7 +39,7 @@ public class TaskRevision implements Comparable<TaskRevision>, Serializable {
protected String added;
protected TaskRevision() {
- this.added = "";
+ this.added = ""; //$NON-NLS-1$
}
public static TaskRevision createEvent(String type, String change) {
@@ -59,7 +59,7 @@ public class TaskRevision implements Comparable<TaskRevision>, Serializable {
event = new AssignmentEvent(change);
}
- if (type.contains(ATTACHMENT) && type.contains("Flag")) {
+ if (type.contains(ATTACHMENT) && type.contains("Flag")) { //$NON-NLS-1$
event = new AttachmentEvent(AttachmentEvent.parseId(type), AttachmentEvent.parseFlags(change));
}
@@ -109,7 +109,7 @@ public class TaskRevision implements Comparable<TaskRevision>, Serializable {
@Override
public String toString() {
- return this.name + " | " + this.date + " | " + this.what + " | " + this.removed + " | " + this.added;
+ return this.name + " | " + this.date + " | " + this.what + " | " + this.removed + " | " + this.added; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
public int compareTo(TaskRevision o) {
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties
new file mode 100644
index 000000000..120c88ae9
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties
@@ -0,0 +1,2 @@
+ResolutionType_Unknown_resolution_type_X=Unknown resolution type: {0}
+StatusType_Unknown_status_type_X=Unknown status type: {0}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties
new file mode 100644
index 000000000..eb98b433d
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties
@@ -0,0 +1,118 @@
+BugzillaAttribute_Add=Add:
+BugzillaAttribute_Add_CC=Add CC:
+BugzillaAttribute_Add_self_to_CC=Add self to CC
+BugzillaAttribute_Additional_Comments=Additional Comments:
+BugzillaAttribute_Assigned_to=Assigned to:
+BugzillaAttribute_Assigned_to_NAME=Assigned to:
+BugzillaAttribute_ATTACH_ID=attachid
+BugzillaAttribute_attachment=attachment
+BugzillaAttribute_Blocks=Blocks:
+BugzillaAttribute_bug=bug
+BugzillaAttribute_Bug_ID=Bug:
+BugzillaAttribute_bug_when=bug_when
+BugzillaAttribute_bugzilla=bugzilla
+BugzillaAttribute_CC=CC:
+BugzillaAttribute_CC_List=CC List
+BugzillaAttribute_Classification=Classification:
+BugzillaAttribute_Classification_ID=Classification ID:
+BugzillaAttribute_Component=Component:
+BugzillaAttribute_Content_Type=Content Type
+BugzillaAttribute_data=data
+BugzillaAttribute_Date=Date
+BugzillaAttribute_Depends_on__Subtasks_=Depends on (Subtasks):
+BugzillaAttribute_desc=desc
+BugzillaAttribute_Description=Description:
+BugzillaAttribute_Due=Due:
+BugzillaAttribute_Estimated_Time=Estimated Time:
+BugzillaAttribute_everconfirmed=everconfirmed
+BugzillaAttribute_filename=filename
+BugzillaAttribute_flag=Flag:
+BugzillaAttribute_Group=Group
+BugzillaAttribute_Keywords=Keywords:
+BugzillaAttribute_Modified=Modified:
+BugzillaAttribute_new_comment=new comment
+BugzillaAttribute_Number_of_comments=Number of comments
+BugzillaAttribute_Obsolete=Obsolete
+BugzillaAttribute_open_status_values=open status values
+BugzillaAttribute_Opened=Opened:
+BugzillaAttribute_OS=OS:
+BugzillaAttribute_Patch=Patch
+BugzillaAttribute_Platform=Platform:
+BugzillaAttribute_Priority=Priority:
+BugzillaAttribute_Product=Product:
+BugzillaAttribute_QA_Contact=QA Contact
+BugzillaAttribute_QA_Contact_NAME=QA Contact
+BugzillaAttribute_Reassign_to_default_assignee=Reassign to default assignee
+BugzillaAttribute_Remaining=Remaining:
+BugzillaAttribute_Remove_CC=Remove CC
+BugzillaAttribute_REPORT_ACCESSIBLE=Reporter
+BugzillaAttribute_REPORT_NAME=Reporter:
+BugzillaAttribute_Reporter=Reporter:
+BugzillaAttribute_Resolution=Resolution:
+BugzillaAttribute_Severity=Severity:
+BugzillaAttribute_Size=Size:
+BugzillaAttribute_Status=Status:
+BugzillaAttribute_Status_Whiteboard=Status Whiteboard:
+BugzillaAttribute_Summary=Summary:
+BugzillaAttribute_Target_milestone=Target milestone:
+BugzillaAttribute_thetext=thetext
+BugzillaAttribute_type=type
+BugzillaAttribute_UNKNOWN=UNKNOWN
+BugzillaAttribute_URL=URL:
+BugzillaAttribute_used_by_search_engine_bugs=used by search engine
+BugzillaAttribute_used_by_search_engine_desc=used by search engine
+BugzillaAttribute_used_by_search_engine_id=used by search engine
+BugzillaAttribute_used_by_search_engine_installation=used by search engine
+BugzillaAttribute_used_by_search_engine_li=used by search engine
+BugzillaAttribute_used_by_search_engine_rdf=used by search engine
+BugzillaAttribute_used_by_search_engine_result=used by search engine
+BugzillaAttribute_used_by_search_engine_seq=used by search engine
+BugzillaAttribute_Version=Version:
+BugzillaAttribute_version_of_bugzilla_installed=version of bugzilla installed
+BugzillaAttribute_Votes=Votes:
+BugzillaAttribute_who=who
+BugzillaAttribute_who_name=who_name
+BugzillaAttribute_Worked=Worked:
+BugzillaClient_could_not_post_form_null_returned=Could not post form, client returned null method.
+BugzillaClient_description_required_when_submitting_attachments=A description is required when submitting attachments.
+BugzillaClient_unable_to_parse_resonse_from=Unable to parse response from
+BugzillaClient_unable_to_submit_attachment_update=Unable to submit update of Attachment
+
+BugzillaOperation_Accept_to_ASSIGNED=Accept (change status to ASSIGNED)
+BugzillaOperation_Duplicate_of=Duplicate of
+BugzillaOperation_Leave_as_X_X=Leave as %s %s
+BugzillaOperation_Mark_as_CLOSED=Mark as CLOSED
+BugzillaOperation_Mark_as_VERIFIED=Mark as VERIFIED
+BugzillaOperation_Reassign_to=Reassign to
+BugzillaOperation_Reopen_bug=Reopen bug
+BugzillaOperation_Resolve_as=Resolve as
+BugzillaOperation_Reassign_to_default_assignee=Reassign to default assignee
+
+BugzillaRepositoryConnector_BUGZILLA_SUPPORTS_2_18_TO_3_0=Bugzilla (supports uncustomized 2.18-3.0)
+BugzillaRepositoryConnector_Check_repository_configuration=Check repository configuration: {0}
+BugzillaRepositoryConnector_checking_for_changed_tasks=Checking for changed tasks
+BugzillaRepositoryConnector_Checking_for_changed_tasks=Checking for changed tasks
+BugzillaRepositoryConnector_Query_for_changed_tasks=Query for changed tasks
+BugzillaRepositoryConnector_running_query=Running query
+BugzillaRepositoryConnector_Running_query=Running query
+BugzillaRepositoryConnector_Unrecognized_response_from_server=Unrecognized response from server
+
+BugzillaTaskAttachmentHandler_Getting_attachment=Getting attachment
+BugzillaTaskAttachmentHandler_Sending_attachment=Sending attachment
+BugzillaTaskAttachmentHandler_unable_to_submit_attachment=Unable to submit attachment
+
+BugzillaTaskDataHandler_Receiving_task=Receiving task
+BugzillaTaskDataHandler_Receiving_tasks=Receiving tasks
+BugzillaTaskDataHandler_Submitting_task=Submitting task
+BugzillaTaskDataHandler_updating_attachment=Updating Attachment
+
+IBugzillaConstants_Bugzilla_login_information_or_repository_version_incorrect=Bugzilla login information or repository version incorrect
+IBugzillaConstants_invalid_bug_id_requested_bug_id_does_not_exist=Invalid bug id. The requested bug id does not exist.
+IBugzillaConstants_invalid_repository_credentials=Invalid repository credentials.
+IBugzillaConstants_Mylyn_Bugzilla_Connector=Mylyn Bugzilla Connector
+IBugzillaConstants_New_Bugzilla_Report=New Bugzilla Report
+IBugzillaConstants_requested_operation_not_permitted=The requested operation is not permitted.
+
+SaxMultiBugReportContentHandler_Bug_id_from_server_did_not_match_requested_id=Bug id from server did not match requested id.
+SaxMultiBugReportContentHandler_CREATED_AN_ATTACHEMENT_ID=Created an attachment (id=
+SaxMultiBugReportContentHandler_id_not_found=\ id not found.
diff --git a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs
index e0bcb64af..17d771d48 100644
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Apr 24 21:03:23 PDT 2008
+#Mon Dec 15 14:23:32 PST 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -41,7 +41,7 @@ org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.nullReference=error
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore

Back to the top