Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs53
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java7
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java76
-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.java6
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java24
-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/BugzillaLanguageSettings.java17
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java64
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java40
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java17
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java16
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java14
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java14
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java22
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java63
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java28
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java24
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java55
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/StackTraceDuplicateDetector.java4
-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.java7
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java28
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java2
-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/TaskHistory.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs53
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java12
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java54
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java20
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java14
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java3
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java66
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java35
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs53
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java15
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java3
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java12
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java47
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java20
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java6
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java159
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java13
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java9
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java26
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java17
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java37
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java3
66 files changed, 793 insertions, 551 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs
index d4ede30a6..5e70d0848 100644
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs
@@ -1,6 +1,7 @@
-#Sat Mar 01 13:22:41 PST 2008
+#Sat Mar 01 03:38:47 PST 2008
cleanup_settings_version=2
eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Mylyn based on Eclipse
formatter_settings_version=11
internal.default.compliance=default
@@ -10,3 +11,53 @@ org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
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 b3f908797..cbb1084f2 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
@@ -34,9 +34,9 @@ public class AbstractReportFactory {
public static final int RETURN_ALL_HITS = -1;
- private InputStream inStream;
+ private final InputStream inStream;
- private String characterEncoding;
+ private final String characterEncoding;
public AbstractReportFactory(InputStream inStream, String encoding) {
this.inStream = inStream;
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java
index 43b0b343c..3eaeba88d 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AttachmentPartSource.java
@@ -19,7 +19,7 @@ import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
*/
public class AttachmentPartSource implements PartSource {
- private ITaskAttachment attachment;
+ private final ITaskAttachment attachment;
public AttachmentPartSource(ITaskAttachment attachment) {
this.attachment = attachment;
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java
index 512b9a5a3..9ecb79ace 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentHandler.java
@@ -13,6 +13,7 @@ import java.io.InputStream;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.internal.tasks.core.deprecated.AbstractAttachmentHandler;
import org.eclipse.mylyn.internal.tasks.core.deprecated.ITaskAttachment;
@@ -27,7 +28,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
*/
public class BugzillaAttachmentHandler extends AbstractAttachmentHandler {
- private BugzillaRepositoryConnector connector;
+ private final BugzillaRepositoryConnector connector;
public BugzillaAttachmentHandler(BugzillaRepositoryConnector connector) {
this.connector = connector;
@@ -40,7 +41,7 @@ public class BugzillaAttachmentHandler extends AbstractAttachmentHandler {
BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
return client.getAttachmentData(attachment.getId(), monitor);
} catch (IOException e) {
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
+ throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
}
}
@@ -53,7 +54,7 @@ public class BugzillaAttachmentHandler extends AbstractAttachmentHandler {
BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
client.postAttachment(bugId, comment, attachment, monitor);
} catch (IOException e) {
- throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
+ throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
}
}
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 beca15e34..892c5f091 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
@@ -73,7 +73,7 @@ import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
* @author Steffen Pingel
*/
public class BugzillaClient {
-
+
protected static final String USER_AGENT = "BugzillaConnector";
private static final int MAX_RETRIEVED_PER_QUERY = 100;
@@ -133,7 +133,7 @@ public class BugzillaClient {
private static final String CONTENT_TYPE_TEXT_XML = "text/xml";
private static final String[] VALID_CONFIG_CONTENT_TYPES = { CONTENT_TYPE_APP_RDF_XML, CONTENT_TYPE_APP_XML,
- CONTENT_TYPE_TEXT_XML };
+ CONTENT_TYPE_TEXT_XML };
private static final String ATTR_CHARSET = "charset";
@@ -151,19 +151,19 @@ public class BugzillaClient {
private boolean authenticated;
- private Map<String, String> configParameters;
+ private final Map<String, String> configParameters;
- private HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
+ private final HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
private boolean lastModifiedSupported = true;
- private BugzillaLanguageSettings bugzillaLanguageSettings;
+ private final BugzillaLanguageSettings bugzillaLanguageSettings;
private RepositoryConfiguration repositoryConfiguration;
private HostConfiguration hostConfiguration;
- private AbstractWebLocation location;
+ private final AbstractWebLocation location;
public BugzillaClient(AbstractWebLocation location, String characterEncoding, Map<String, String> configParameters,
BugzillaLanguageSettings languageSettings) throws MalformedURLException {
@@ -223,7 +223,7 @@ public class BugzillaClient {
}
private GzipGetMethod connectInternal(String requestURL, boolean gzip, IProgressMonitor monitor)
- throws IOException, CoreException {
+ throws IOException, CoreException {
monitor = Policy.monitorFor(monitor);
hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
@@ -283,7 +283,7 @@ public class BugzillaClient {
getMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
+ "Proxy authentication required"));
} else {
getMethod.getResponseBodyNoop();
getMethod.releaseConnection();
@@ -296,7 +296,7 @@ public class BugzillaClient {
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString()
- + " failed. Please verify connection and authentication information."));
+ + " failed. Please verify connection and authentication information."));
}
public void logout(IProgressMonitor monitor) throws IOException, CoreException {
@@ -350,7 +350,7 @@ public class BugzillaClient {
authenticated = false;
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Authentication credentials missing."));
+ "Authentication credentials missing."));
}
GzipPostMethod postMethod = null;
@@ -384,7 +384,7 @@ public class BugzillaClient {
postMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "HTTP authentication failed."));
+ "HTTP authentication failed."));
} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
authenticated = false;
@@ -392,7 +392,7 @@ public class BugzillaClient {
postMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
+ "Proxy authentication required"));
} else if (code != HttpURLConnection.HTTP_OK) {
authenticated = false;
@@ -446,7 +446,7 @@ public class BugzillaClient {
final String idString = String.valueOf(id);
Set<String> data = new HashSet<String>();
data.add(idString);
-
+
LegacyTaskDataCollector collector = new LegacyTaskDataCollector() {
@Override
public void accept(RepositoryTaskData taskData) {
@@ -605,7 +605,7 @@ public class BugzillaClient {
}
public RepositoryConfiguration getRepositoryConfiguration(IProgressMonitor monitor) throws IOException,
- CoreException {
+ CoreException {
GzipGetMethod method = null;
try {
method = getConnectGzip(repositoryUrl + IBugzillaConstants.URL_GET_CONFIG_RDF, monitor);
@@ -648,7 +648,7 @@ public class BugzillaClient {
}
public InputStream getAttachmentData(String attachmentId, IProgressMonitor monitor) throws IOException,
- CoreException {
+ CoreException {
String url = repositoryUrl + IBugzillaConstants.URL_GET_ATTACHMENT_DOWNLOAD + attachmentId;
GzipGetMethod method = getConnectGzip(url, monitor);
try {
@@ -660,7 +660,7 @@ public class BugzillaClient {
}
public void postAttachment(String bugReportID, String comment, ITaskAttachment attachment, IProgressMonitor monitor)
- throws HttpException, IOException, CoreException {
+ throws HttpException, IOException, CoreException {
monitor = Policy.monitorFor(monitor);
if (bugReportID == null || comment == null || attachment == null) {
throw new IllegalArgumentException("Must not pass in a null parameter");
@@ -718,7 +718,7 @@ public class BugzillaClient {
postMethod.getResponseBodyNoop();
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_NETWORK, repositoryUrl.toString(), "Http error: "
- + HttpStatus.getStatusText(status)));
+ + HttpStatus.getStatusText(status)));
// throw new IOException("Communication error occurred during
// upload. \n\n"
// + HttpStatus.getStatusText(status));
@@ -736,7 +736,7 @@ public class BugzillaClient {
* @throws CoreException
*/
private GzipPostMethod postFormData(String formUrl, NameValuePair[] formData, IProgressMonitor monitor)
- throws IOException, CoreException {
+ throws IOException, CoreException {
GzipPostMethod postMethod = null;
monitor = Policy.monitorFor(monitor);
@@ -850,9 +850,10 @@ public class BugzillaClient {
}
int stopIndex = title.toLowerCase(Locale.ENGLISH).indexOf(
postfix.toLowerCase(Locale.ENGLISH), startIndex);
- if (stopIndex == -1)
+ if (stopIndex == -1) {
stopIndex = title.toLowerCase(Locale.ENGLISH).indexOf(
postfix2.toLowerCase(Locale.ENGLISH), startIndex);
+ }
if (stopIndex > -1) {
result = (title.substring(startIndex, stopIndex)).trim();
}
@@ -896,8 +897,9 @@ public class BugzillaClient {
if (a != null && a.getId() != null && a.getId().compareTo("") != 0) {
String value = null;
value = a.getValue();
- if (value == null)
+ if (value == null) {
continue;
+ }
if (a.getId().equals(BugzillaReportElement.NEWCC.getKeyString())) {
RepositoryTaskAttribute b = new RepositoryTaskAttribute(BugzillaReportElement.CC.getKeyString(),
BugzillaReportElement.CC.toString(), false);
@@ -946,9 +948,8 @@ public class BugzillaClient {
Map<String, NameValuePair> fields = new HashMap<String, NameValuePair>();
fields.put(KEY_FORM_NAME, new NameValuePair(KEY_FORM_NAME, VAL_PROCESS_BUG));
// go through all of the attributes and add them to the bug post
- for (Iterator<RepositoryTaskAttribute> it = model.getAttributes().iterator(); it.hasNext();) {
+ for (RepositoryTaskAttribute a : model.getAttributes()) {
- RepositoryTaskAttribute a = it.next();
if (a == null) {
continue;
} else if (a.getId().equals(BugzillaReportElement.QA_CONTACT.getKeyString())
@@ -976,9 +977,9 @@ public class BugzillaClient {
// add the operation to the bug post
RepositoryOperation o = model.getSelectedOperation();
- if (o == null)
+ if (o == null) {
fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, VAL_NONE));
- else {
+ } else {
fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, o.getKnobName()));
if (o.hasOptions()) {
String sel = o.getOptionValue(o.getOptionSelection());
@@ -1108,7 +1109,7 @@ public class BugzillaClient {
// BugzillaException(IBugzillaConstants.LOGGED_OUT);
throw new CoreException(new BugzillaStatus(Status.INFO, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.REPOSITORY_LOGGED_OUT,
- "You have been logged out. Please retry operation."));
+ "You have been logged out. Please retry operation."));
}
found = false;
for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
@@ -1162,7 +1163,7 @@ public class BugzillaClient {
authenticated = false;
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from "
- + repositoryUrl.toString() + "."));
+ + repositoryUrl.toString() + "."));
}
} finally {
in.close();
@@ -1178,7 +1179,7 @@ public class BugzillaClient {
}
public Map<String, RepositoryTaskData> getTaskData(Set<String> taskIds, final TaskDataCollector collector, final IProgressMonitor monitor)
- throws IOException, CoreException {
+ throws IOException, CoreException {
GzipPostMethod method = null;
HashMap<String, RepositoryTaskData> taskDataMap = new HashMap<String, RepositoryTaskData>();
// make a copy to modify set
@@ -1195,8 +1196,9 @@ public class BugzillaClient {
NameValuePair[] formData = new NameValuePair[idsToRetrieve.size() + 2];
- if (idsToRetrieve.size() == 0)
+ if (idsToRetrieve.size() == 0) {
return taskDataMap;
+ }
itr = idsToRetrieve.iterator();
int x = 0;
@@ -1223,7 +1225,7 @@ public class BugzillaClient {
if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
MultiBugReportFactory factory = new MultiBugReportFactory(
method.getResponseBodyAsStream(), characterEncoding);
-
+
LegacyTaskDataCollector collector2 = new LegacyTaskDataCollector() {
@Override
@@ -1231,12 +1233,12 @@ public class BugzillaClient {
getRepositoryConfiguration().configureTaskData(taskData);
((LegacyTaskDataCollector)collector).accept(taskData);
monitor.worked(1);
- }};
-
- factory.populateReport(taskDataMap, collector2, customFields);
- taskIds.removeAll(idsToRetrieve);
- parseable = true;
- break;
+ }};
+
+ factory.populateReport(taskDataMap, collector2, customFields);
+ taskIds.removeAll(idsToRetrieve);
+ parseable = true;
+ break;
}
}
}
@@ -1335,7 +1337,7 @@ public class BugzillaClient {
headMethod.releaseConnection();
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required"));
+ "Proxy authentication required"));
} else {
headMethod.getResponseBody();
headMethod.releaseConnection();
@@ -1348,7 +1350,7 @@ public class BugzillaClient {
throw new CoreException(new BugzillaStatus(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString()
- + " failed. Please verify connection and authentication information."));
+ + " failed. Please verify connection and authentication information."));
}
public void setRepositoryConfiguration(RepositoryConfiguration repositoryConfiguration) {
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 f46531813..b4702d1a8 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
@@ -18,7 +18,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
* @author Robert Elves (adaption for Bugzilla)
*/
public class BugzillaClientFactory {
-
+
private static TaskRepositoryLocationFactory taskRepositoryLocationFactory = new TaskRepositoryLocationFactory();
public static BugzillaClient createClient(TaskRepository taskRepository) throws MalformedURLException {
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 066c5d4cd..1445005c2 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
@@ -23,7 +23,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepositoryAdapter;
*/
public class BugzillaClientManager extends TaskRepositoryAdapter {
- private Map<String, BugzillaClient> clientByUrl = new HashMap<String, BugzillaClient>();
+ private final Map<String, BugzillaClient> clientByUrl = new HashMap<String, BugzillaClient>();
public BugzillaClientManager() {
}
@@ -43,19 +43,23 @@ public class BugzillaClientManager extends TaskRepositoryAdapter {
return client;
}
+ @Override
public void repositoriesRead() {
// ignore
}
+ @Override
public synchronized void repositoryAdded(TaskRepository repository) {
// make sure there is no stale client still in the cache, bug #149939
clientByUrl.remove(repository.getRepositoryUrl());
}
+ @Override
public synchronized void repositoryRemoved(TaskRepository repository) {
clientByUrl.remove(repository.getRepositoryUrl());
}
+ @Override
public synchronized void repositorySettingsChanged(TaskRepository repository) {
clientByUrl.remove(repository.getRepositoryUrl());
}
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 a399d055f..df442b8f9 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
@@ -57,7 +57,7 @@ public class BugzillaCorePlugin extends Plugin {
private static final String OPTION_ALL = "All";
// A Map from Java's Platform to Buzilla's
- private Map<String, String> java2buzillaPlatformMap = new HashMap<String, String>();
+ private final Map<String, String> java2buzillaPlatformMap = new HashMap<String, String>();
/** Product configuration for the current server */
private static Map<String, RepositoryConfiguration> repositoryConfigurations = new HashMap<String, RepositoryConfiguration>();
@@ -121,7 +121,7 @@ public class BugzillaCorePlugin extends Plugin {
* Retrieves the latest repository configuration from the server
*/
public static RepositoryConfiguration getRepositoryConfiguration(TaskRepository repository, boolean forceRefresh, IProgressMonitor monitor)
- throws CoreException {
+ throws CoreException {
monitor = Policy.monitorFor(monitor);
try {
if (!cacheFileRead) {
@@ -138,7 +138,7 @@ public class BugzillaCorePlugin extends Plugin {
}
return repositoryConfigurations.get(repository.getRepositoryUrl());
} catch (IOException e) {
- throw new CoreException(new Status(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, 1,
+ throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 1,
"Error updating attributes.\n\n" + e.getMessage(), e));
}
}
@@ -167,8 +167,9 @@ public class BugzillaCorePlugin extends Plugin {
/** public for testing */
public static void readRepositoryConfigurationFile() {
// IPath configFile = getProductConfigurationCachePath();
- if (repositoryConfigurationFile == null || !repositoryConfigurationFile.exists())
+ if (repositoryConfigurationFile == null || !repositoryConfigurationFile.exists()) {
return;
+ }
ObjectInputStream in = null;
try {
in = new ObjectInputStream(new FileInputStream(repositoryConfigurationFile));
@@ -189,12 +190,12 @@ public class BugzillaCorePlugin extends Plugin {
if (repositoryConfigurationFile.delete()) {
// successfully deleted
} else {
- log(new Status(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, ERROR_DELETING_CONFIGURATION, e));
+ log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, ERROR_DELETING_CONFIGURATION, e));
}
}
} catch (Exception ex) {
- log(new Status(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, ERROR_DELETING_CONFIGURATION, e));
+ log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, ERROR_DELETING_CONFIGURATION, e));
}
} finally {
if (in != null) {
@@ -256,7 +257,7 @@ public class BugzillaCorePlugin extends Plugin {
if (e.getMessage() == null) {
message = e.getClass().toString();
}
- log(new Status(Status.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, message, e));
+ log(new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, 0, message, e));
}
/**
@@ -318,14 +319,15 @@ public class BugzillaCorePlugin extends Plugin {
if (opSysAttribute != null) {
while (bugzillaOS != null && opSysAttribute.getOptionParameter(bugzillaOS) == null) {
int dotindex = bugzillaOS.lastIndexOf('.');
- if (dotindex > 0)
+ if (dotindex > 0) {
bugzillaOS = bugzillaOS.substring(0, dotindex);
- else {
+ } else {
int spaceindex = bugzillaOS.lastIndexOf(' ');
- if (spaceindex > 0)
+ if (spaceindex > 0) {
bugzillaOS = bugzillaOS.substring(0, spaceindex);
- else
+ } else {
bugzillaOS = null;
+ }
}
}
} else {
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 596e5482b..cfe2bdebb 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
@@ -24,9 +24,9 @@ public class BugzillaCustomField implements Serializable {
public static final String CUSTOM_FIELD_PREFIX = "cf_";
- private String name;
+ private final String name;
- private String description;
+ private final String description;
private List<String> options = new ArrayList<String>();
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 9ec6b510b..0f3e4f12a 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
@@ -38,7 +38,7 @@ public class BugzillaLanguageSettings {
public static final String COMMAND_CHANGES_SUBMITTED = "changes_submitted";
- private Map<String, List<String>> languageAttributes = new LinkedHashMap<String, List<String>>();
+ private final Map<String, List<String>> languageAttributes = new LinkedHashMap<String, List<String>>();
public BugzillaLanguageSettings(String languageName) {
super();
@@ -59,18 +59,23 @@ public class BugzillaLanguageSettings {
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
BugzillaLanguageSettings other = (BugzillaLanguageSettings) obj;
if (languageName == null) {
- if (other.languageName != null)
+ if (other.languageName != null) {
return false;
- } else if (!languageName.equals(other.languageName))
+ }
+ } else if (!languageName.equals(other.languageName)) {
return false;
+ }
return true;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java
index d4d24920e..8438ad7b1 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java
@@ -15,40 +15,40 @@ package org.eclipse.mylyn.internal.bugzilla.core;
*/
public enum BugzillaReportElement {
// Format: ENUM ( "pretty name", "xml key", <hidden: true/false>, <readonly: true/false>)
- // Hidden elements are not automatically displayed in ui
+ // Hidden elements are not automatically displayed in ui
STATUS_WHITEBOARD("Status Whiteboard:", "status_whiteboard", true, false), ACTUAL_TIME("Hours Worked:",
"actual_time", true), ADD_COMMENT("Additional Comments:", "comment", true, false), ASSIGNED_TO(
- "Assigned to:", "assigned_to", true, true), ASSIGNED_TO_NAME("Assigned to:", "assigned_to_name", true, true), ATTACHID(
- "attachid", "attachid"), ATTACHMENT("attachment", "attachment"), BLOCKED("Blocks:", "blocked", true, false), BUG(
- "bug", "bug", true), BUG_FILE_LOC("URL:", "bug_file_loc", true, false), BUG_ID("Bug:", "bug_id", true), BUG_SEVERITY(
- "Severity:", "bug_severity", false), BUG_STATUS("Status:", "bug_status", true, true), BUG_WHEN("bug_when",
- "bug_when", true, true), BUGZILLA("bugzilla", "bugzilla", true), CC("CC:", "cc", true, true), CCLIST_ACCESSIBLE(
- "CC List", "cclist_accessible", true), CLASSIFICATION("Classification:", "classification", true), CLASSIFICATION_ID(
- "Classification ID:", "classification_id", true), COMPONENT("Component:", "component", false), CREATION_TS(
- "Opened:", "creation_ts", true), CTYPE("Content Type", "ctype"), DATA("data", "data"), DATE("Date", "date"), DEADLINE(
- "Deadline:", "deadline", true, true), DELTA_TS("Modified:", "delta_ts", true), DEPENDSON(
- "Depends on (Subtasks):", "dependson", true, false), DESC("desc", "desc", true, true), EVERCONFIRMED(
- "everconfirmed", "everconfirmed", true), ESTIMATED_TIME("Estimated Time:", "estimated_time", true), FILENAME(
- "filename", "filename"), GROUP("Group", "group", true, true), IS_OBSOLETE("Obsolete", "isobsolete", true), IS_PATCH(
- "Patch", "ispatch", true), KEYWORDS("Keywords:", "keywords", true), LONG_DESC("Description:", "long_desc"), LONGDESCLENGTH(
- "Number of comments", "longdesclength", true), NEWCC("Add CC:", "newcc", true), OP_SYS("OS:", "op_sys",
- false), PRIORITY("Priority:", "priority", false, false), PRODUCT("Product:", "product", false), REP_PLATFORM(
- "Platform:", "rep_platform", false), REPORTER("Reporter:", "reporter", true, true), REPORTER_NAME(
- "Reporter:", "reporter_name", true, true), REPORTER_ACCESSIBLE("Reporter", "reporter_accessible", true), RESOLUTION(
- "Resolution:", "resolution", false, true), // Exiting bug field, new cc
- REMAINING_TIME("Hours Left:", "remaining_time", true), SET_DEFAULT_ASSIGNEE("Reassign to default assignee",
- "set_default_assignee", false), SHORT_DESC("Summary:", "short_desc", true), SIZE("Size:", "size"), TARGET_MILESTONE(
- "Target milestone:", "target_milestone", false), THETEXT("thetext", "thetext", false, true), TYPE("type",
- "type"), UNKNOWN("UNKNOWN", "UNKNOWN"), VERSION("Version:", "version", false), INSTALL_VERSION(
- "version of bugzilla installed", "install_version", true), VOTES("Votes:", "votes", true, true), WORK_TIME(
- "Add Time:", "work_time", true, false), WHO("who", "who"), WHO_NAME("who_name", "who_name", true, true), QA_CONTACT(
- "QA Contact", "qa_contact", true, false),QA_CONTACT_NAME("QA Contact", "qa_contact_name", true, true), ADDSELFCC("Add self to CC", "addselfcc", true, false),
- // Used by search engine
- LI("used by search engine", "li", true), ID("used by search engine", "id", true), SHORT_SHORT_DESC(
- "used by search engine", "short_short_desc", false), SEQ("used by search engine", "seq", false), RESULT(
- "used by search engine", "result", false), RDF("used by search engine", "rdf", false), INSTALLATION(
- "used by search engine", "installation", false), BUGS("used by search engine", "bugs", false), STATUS_OPEN(
- "open status values", "status_open", true, true), NEW_COMMENT("new comment", "new_comment", true, false);
+ "Assigned to:", "assigned_to", true, true), ASSIGNED_TO_NAME("Assigned to:", "assigned_to_name", true, true), ATTACHID(
+ "attachid", "attachid"), ATTACHMENT("attachment", "attachment"), BLOCKED("Blocks:", "blocked", true, false), BUG(
+ "bug", "bug", true), BUG_FILE_LOC("URL:", "bug_file_loc", true, false), BUG_ID("Bug:", "bug_id", true), BUG_SEVERITY(
+ "Severity:", "bug_severity", false), BUG_STATUS("Status:", "bug_status", true, true), BUG_WHEN("bug_when",
+ "bug_when", true, true), BUGZILLA("bugzilla", "bugzilla", true), CC("CC:", "cc", true, true), CCLIST_ACCESSIBLE(
+ "CC List", "cclist_accessible", true), CLASSIFICATION("Classification:", "classification", true), CLASSIFICATION_ID(
+ "Classification ID:", "classification_id", true), COMPONENT("Component:", "component", false), CREATION_TS(
+ "Opened:", "creation_ts", true), CTYPE("Content Type", "ctype"), DATA("data", "data"), DATE("Date", "date"), DEADLINE(
+ "Deadline:", "deadline", true, true), DELTA_TS("Modified:", "delta_ts", true), DEPENDSON(
+ "Depends on (Subtasks):", "dependson", true, false), DESC("desc", "desc", true, true), EVERCONFIRMED(
+ "everconfirmed", "everconfirmed", true), ESTIMATED_TIME("Estimated Time:", "estimated_time", true), FILENAME(
+ "filename", "filename"), GROUP("Group", "group", true, true), IS_OBSOLETE("Obsolete", "isobsolete", true), IS_PATCH(
+ "Patch", "ispatch", true), KEYWORDS("Keywords:", "keywords", true), LONG_DESC("Description:", "long_desc"), LONGDESCLENGTH(
+ "Number of comments", "longdesclength", true), NEWCC("Add CC:", "newcc", true), OP_SYS("OS:", "op_sys",
+ false), PRIORITY("Priority:", "priority", false, false), PRODUCT("Product:", "product", false), REP_PLATFORM(
+ "Platform:", "rep_platform", false), REPORTER("Reporter:", "reporter", true, true), REPORTER_NAME(
+ "Reporter:", "reporter_name", true, true), REPORTER_ACCESSIBLE("Reporter", "reporter_accessible", true), RESOLUTION(
+ "Resolution:", "resolution", false, true), // Exiting bug field, new cc
+ REMAINING_TIME("Hours Left:", "remaining_time", true), SET_DEFAULT_ASSIGNEE("Reassign to default assignee",
+ "set_default_assignee", false), SHORT_DESC("Summary:", "short_desc", true), SIZE("Size:", "size"), TARGET_MILESTONE(
+ "Target milestone:", "target_milestone", false), THETEXT("thetext", "thetext", false, true), TYPE("type",
+ "type"), UNKNOWN("UNKNOWN", "UNKNOWN"), VERSION("Version:", "version", false), INSTALL_VERSION(
+ "version of bugzilla installed", "install_version", true), VOTES("Votes:", "votes", true, true), WORK_TIME(
+ "Add Time:", "work_time", true, false), WHO("who", "who"), WHO_NAME("who_name", "who_name", true, true), QA_CONTACT(
+ "QA Contact", "qa_contact", true, false),QA_CONTACT_NAME("QA Contact", "qa_contact_name", true, true), ADDSELFCC("Add self to CC", "addselfcc", true, false),
+ // Used by search engine
+ LI("used by search engine", "li", true), ID("used by search engine", "id", true), SHORT_SHORT_DESC(
+ "used by search engine", "short_short_desc", false), SEQ("used by search engine", "seq", false), RESULT(
+ "used by search engine", "result", false), RDF("used by search engine", "rdf", false), INSTALLATION(
+ "used by search engine", "installation", false), BUGS("used by search engine", "bugs", false), STATUS_OPEN(
+ "open status values", "status_open", true, true), NEW_COMMENT("new comment", "new_comment", true, false);
private final boolean isHidden;
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 2917c4cf7..f590bd701 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
@@ -68,7 +68,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
private BugzillaClientManager clientManager;
- private Set<BugzillaLanguageSettings> languages = new LinkedHashSet<BugzillaLanguageSettings>();
+ private final Set<BugzillaLanguageSettings> languages = new LinkedHashSet<BugzillaLanguageSettings>();
@Override
public void init(ITaskList taskList) {
@@ -132,7 +132,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
bugzillaTask.setOwner(taskData.getAttributeValue(RepositoryTaskAttribute.USER_OWNER));
return false;
}
-
+
//// // subtasks
// repositoryTask.dropSubTasks();
// Set<String> subTaskIds = taskDataHandler.getSubTaskIds(taskData);
@@ -180,8 +180,8 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
// states are
if (taskData.getStatus() != null) {
isComplete = taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_RESOLVED)
- || taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_CLOSED)
- || taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_VERIFIED);
+ || taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_CLOSED)
+ || taskData.getStatus().equals(IBugzillaConstants.VALUE_STATUS_VERIFIED);
}
bugzillaTask.setCompleted(isComplete);
@@ -263,7 +263,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
// newTask.setCompleted(existingTask.isCompleted());
// // newTask.setCompletionDate(existingTask.getCompletionDate());
//
-// // Owner attribute not previously
+// // Owner attribute not previously
// if (hasTaskPropertyChanged(existingTask.getOwner(), newTask.getOwner())) {
// existingTask.setOwner(newTask.getOwner());
// }
@@ -288,12 +288,12 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
@Override
public void preSynchronization(SynchronizationContext event, IProgressMonitor monitor)
- throws CoreException {
- TaskRepository repository = event.taskRepository;
+ throws CoreException {
+ TaskRepository repository = event.taskRepository;
if (event.tasks.isEmpty()) {
return;
}
-
+
monitor = Policy.monitorFor(monitor);
try {
monitor.beginTask("Checking for changed tasks", IProgressMonitor.UNKNOWN);
@@ -311,7 +311,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
}
String urlQueryBase = repository.getRepositoryUrl() + CHANGED_BUGS_CGI_QUERY
- + URLEncoder.encode(dateString, repository.getCharacterEncoding()) + CHANGED_BUGS_CGI_ENDDATE;
+ + URLEncoder.encode(dateString, repository.getCharacterEncoding()) + CHANGED_BUGS_CGI_ENDDATE;
String urlQueryString = urlQueryBase + BUG_ID;
@@ -328,7 +328,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
// }
// System.err.println(">>>> markStale "+tasks.size());
// queryForChanged(repository, changedTasks, urlQueryString);
-
+
Set<ITask> changedTasks = new HashSet<ITask>();
Iterator<ITask> itr = event.tasks.iterator();
int queryCounter = 0;
@@ -341,17 +341,17 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
urlQueryString += newurlQueryString;
if (queryCounter >= 1000) {
queryForChanged(repository, changedTasks, urlQueryString);
-
+
queryCounter = 0;
urlQueryString = urlQueryBase + BUG_ID;
newurlQueryString = "";
}
-
+
if (!itr.hasNext() && queryCounter != 0) {
queryForChanged(repository, changedTasks, urlQueryString);
}
}
-
+
for (ITask task : event.tasks) {
if (changedTasks.contains(task)) {
task.setStale(true);
@@ -368,9 +368,9 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
monitor.done();
}
}
-
+
private void queryForChanged(final TaskRepository repository, Set<ITask> changedTasks, String urlQueryString)
- throws UnsupportedEncodingException, CoreException {
+ throws UnsupportedEncodingException, CoreException {
QueryHitCollector collector = new QueryHitCollector(new ITaskFactory() {
public AbstractTask createTask(RepositoryTaskData taskData, IProgressMonitor monitor) {
@@ -381,7 +381,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
BugzillaRepositoryQuery query = new BugzillaRepositoryQuery(repository.getRepositoryUrl(), urlQueryString, "");
performQuery(repository, query, collector, null, new NullProgressMonitor());
-
+
changedTasks.addAll(collector.getTasks());
}
@@ -411,10 +411,10 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
return Status.OK_STATUS;
} catch (UnrecognizedReponseException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, Status.INFO,
+ return new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, IStatus.INFO,
"Unrecognized response from server", e);
} catch (IOException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, Status.ERROR,
+ return new Status(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, IStatus.ERROR,
"Check repository configuration: " + e.getMessage(), e);
} catch (CoreException e) {
return e.getStatus();
@@ -476,6 +476,7 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
}
}
+ @Override
public boolean isRepositoryConfigurationStale(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
if (super.isRepositoryConfigurationStale(repository, monitor)) {
boolean result = true;
@@ -531,10 +532,11 @@ public class BugzillaRepositoryConnector extends AbstractLegacyRepositoryConnect
@Override
public RepositoryTaskData getLegacyTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
+ throws CoreException {
return getLegacyTaskDataHandler().getTaskData(repository, taskId, monitor);
}
+ @Override
public void postSynchronization(SynchronizationContext event, IProgressMonitor monitor) throws CoreException {
try {
monitor.beginTask("", 1);
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 d23ef3975..1099c8f67 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
@@ -10,13 +10,14 @@ package org.eclipse.mylyn.internal.bugzilla.core;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
+import org.eclipse.osgi.util.NLS;
/**
* @author Rob Elves
*/
public class BugzillaStatus extends Status {
- private String errorMessage;
+ private final String errorMessage;
private String repositoryUrl = "";
@@ -57,12 +58,12 @@ public class BugzillaStatus extends Status {
switch (getCode()) {
case RepositoryStatus.ERROR_REPOSITORY_LOGIN:
- return BugzillaMessages.bind(BugzillaMessages.repositoryLoginFailure, this.getRepositoryUrl(),
+ return NLS.bind(BugzillaMessages.repositoryLoginFailure, this.getRepositoryUrl(),
this.errorMessage);
case RepositoryStatus.ERROR_REPOSITORY_NOT_FOUND:
- return BugzillaMessages.bind(BugzillaMessages.repositoryNotFound, this.errorMessage);
+ return NLS.bind(BugzillaMessages.repositoryNotFound, this.errorMessage);
case RepositoryStatus.ERROR_REPOSITORY:
- return BugzillaMessages.bind(BugzillaMessages.errorRepository, this.getRepositoryUrl(), this.errorMessage);
+ return NLS.bind(BugzillaMessages.errorRepository, this.getRepositoryUrl(), this.errorMessage);
case RepositoryStatus.ERROR_IO:
String string1 = "Unknown IO error occurred";
String string2 = "No message provided";
@@ -71,13 +72,13 @@ public class BugzillaStatus extends Status {
string2 = getException().getMessage();
}
Object[] strings = { getRepositoryUrl(), string1, string2 };
- return BugzillaMessages.bind(BugzillaMessages.errorIo, strings);
+ return NLS.bind(BugzillaMessages.errorIo, strings);
case RepositoryStatus.ERROR_INTERNAL:
- return BugzillaMessages.bind(BugzillaMessages.errorInternal, this.errorMessage);
+ return NLS.bind(BugzillaMessages.errorInternal, this.errorMessage);
case RepositoryStatus.OPERATION_CANCELLED:
- return BugzillaMessages.bind(BugzillaMessages.operationCancelled, this.errorMessage);
+ return NLS.bind(BugzillaMessages.operationCancelled, this.errorMessage);
case RepositoryStatus.REPOSITORY_COLLISION:
- return BugzillaMessages.bind(BugzillaMessages.repositoryCollision, this.errorMessage);
+ return NLS.bind(BugzillaMessages.repositoryCollision, this.errorMessage);
case RepositoryStatus.REPOSITORY_COMMENT_REQUIRED:
if (errorMessage == null) {
return BugzillaMessages.repositoryCommentRequired;
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 6950ecd51..c7469dccd 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
@@ -33,9 +33,9 @@ import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
*/
public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
- private AbstractAttributeFactory attributeFactory = new BugzillaAttributeFactory();
+ private final AbstractAttributeFactory attributeFactory = new BugzillaAttributeFactory();
- private BugzillaRepositoryConnector connector;
+ private final BugzillaRepositoryConnector connector;
public BugzillaTaskDataHandler(BugzillaRepositoryConnector connector) {
this.connector = connector;
@@ -43,7 +43,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
@Override
public RepositoryTaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
+ throws CoreException {
try {
BugzillaClient client = connector.getClientManager().getClient(repository,
new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
@@ -76,7 +76,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
@Override
public String postTaskData(TaskRepository repository, RepositoryTaskData taskData, IProgressMonitor monitor)
- throws CoreException {
+ throws CoreException {
try {
BugzillaClient client = connector.getClientManager().getClient(repository,
new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
@@ -111,10 +111,11 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
@Override
public boolean initializeTaskData(TaskRepository repository, RepositoryTaskData data, IProgressMonitor monitor)
- throws CoreException {
+ throws CoreException {
- if (data == null)
+ if (data == null) {
return false;
+ }
String product = data.getProduct();
if (product.equals("")) {
// Bugzilla needs a product to create task data
@@ -252,8 +253,9 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
String[] ids = attribute.getValue().split(",");
for (String id : ids) {
id = id.trim();
- if (id.length() == 0)
+ if (id.length() == 0) {
continue;
+ }
result.add(id);
}
}
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 04f3beebb..d746f1161 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
@@ -57,12 +57,12 @@ public class GzipGetMethod extends GetMethod {
private boolean isZippedReply() {
// content-encoding:gzip can be set by a dedicated perl script or mod_gzip
boolean zipped = (null != this.getResponseHeader("Content-encoding") && this.getResponseHeader(
- "Content-encoding").getValue().equals(WebClientUtil.CONTENT_ENCODING_GZIP))
- ||
- // content-type: application/x-gzip can be set by any apache after 302 redirect, based on .gz suffix
- (null != this.getResponseHeader("Content-Type") && this.getResponseHeader("Content-Type")
- .getValue()
- .equals("application/x-gzip"));
+ "Content-encoding").getValue().equals(WebClientUtil.CONTENT_ENCODING_GZIP))
+ ||
+ // content-type: application/x-gzip can be set by any apache after 302 redirect, based on .gz suffix
+ (null != this.getResponseHeader("Content-Type") && this.getResponseHeader("Content-Type")
+ .getValue()
+ .equals("application/x-gzip"));
return zipped;
}
@@ -92,7 +92,7 @@ public class GzipGetMethod extends GetMethod {
public InputStream getResponseBodyAsStream() throws IOException {
InputStream input = super.getResponseBodyAsStream();
if (gzipReceived) {
- return new java.util.zip.GZIPInputStream(input);
+ return new java.util.zip.GZIPInputStream(input);
}
return input;
}
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 3b98eb726..1955ad2a4 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
@@ -57,12 +57,12 @@ public class GzipPostMethod extends PostMethod {
private boolean isZippedReply() {
// content-encoding:gzip can be set by a dedicated perl script or mod_gzip
boolean zipped = (null != this.getResponseHeader("Content-encoding") && this.getResponseHeader(
- "Content-encoding").getValue().equals(WebClientUtil.CONTENT_ENCODING_GZIP))
- ||
- // content-type: application/x-gzip can be set by any apache after 302 redirect, based on .gz suffix
- (null != this.getResponseHeader("Content-Type") && this.getResponseHeader("Content-Type")
- .getValue()
- .equals("application/x-gzip"));
+ "Content-encoding").getValue().equals(WebClientUtil.CONTENT_ENCODING_GZIP))
+ ||
+ // content-type: application/x-gzip can be set by any apache after 302 redirect, based on .gz suffix
+ (null != this.getResponseHeader("Content-Type") && this.getResponseHeader("Content-Type")
+ .getValue()
+ .equals("application/x-gzip"));
return zipped;
}
@@ -96,5 +96,5 @@ public class GzipPostMethod extends PostMethod {
}
return input;
}
-
+
}
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 5e96b7554..33b617c2c 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
@@ -54,7 +54,7 @@ public interface IBugzillaConstants {
public static final String URL_POST_LOGIN = "/index.cgi";
public static final String URL_POST_ATTACHMENT_UPLOAD = "/attachment.cgi";
-
+
public static final String URL_BUGLIST = "/buglist.cgi";
public static final String URL_GET_ATTACHMENT_DOWNLOAD = "/attachment.cgi?id=";
@@ -118,14 +118,18 @@ public interface IBugzillaConstants {
/** returns null if version string unknown* */
static public BugzillaServerVersion fromString(String version) {
- if (version.equals(SERVER_30.toString()))
+ if (version.equals(SERVER_30.toString())) {
return SERVER_30;
- if (version.equals(SERVER_222.toString()))
+ }
+ if (version.equals(SERVER_222.toString())) {
return SERVER_222;
- if (version.equals(SERVER_220.toString()))
+ }
+ if (version.equals(SERVER_220.toString())) {
return SERVER_220;
- if (version.equals(SERVER_218.toString()))
+ }
+ if (version.equals(SERVER_218.toString())) {
return SERVER_218;
+ }
return null;
}
}
@@ -170,7 +174,7 @@ public interface IBugzillaConstants {
// Default values for keys
static final String[] DEFAULT_STATUS_VALUES = { "Unconfirmed", "New", "Assigned", "Reopened", "Resolved",
- "Verified", "Closed" };
+ "Verified", "Closed" };
static final String[] DEFAULT_PRESELECTED_STATUS_VALUES = { "New", "Assigned", "Reopened" };
@@ -179,15 +183,15 @@ public interface IBugzillaConstants {
// "Worksforme", "Moved" };
static final String[] DEFAULT_SEVERITY_VALUES = { "blocker", "critical", "major", "normal", "minor", "trivial",
- "enhancement" };
+ "enhancement" };
static final String[] DEFAULT_PRIORITY_VALUES = { "P1", "P2", "P3", "P4", "P5" };
static final String[] DEFAULT_HARDWARE_VALUES = { "All", "Macintosh", "PC", "Power PC", "Sun", "Other" };
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" };
+ "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_PRODUCT_VALUES = {};
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 c99987c34..c17f663eb 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
@@ -35,7 +35,7 @@ public class MultiBugReportFactory extends AbstractReportFactory {
public void populateReport(Map<String, RepositoryTaskData> bugMap, LegacyTaskDataCollector collector, List<BugzillaCustomField> customFields) throws IOException, CoreException {
- SaxMultiBugReportContentHandler contentHandler = new SaxMultiBugReportContentHandler(bugzillaAttributeFactory, collector,
+ SaxMultiBugReportContentHandler contentHandler = new SaxMultiBugReportContentHandler(bugzillaAttributeFactory, collector,
bugMap, customFields);
collectResults(contentHandler, false);
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 ec486e8c3..e79df9f3e 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
@@ -31,7 +31,7 @@ import org.eclipse.mylyn.internal.tasks.core.deprecated.RepositoryTaskData;
* @author Rob Elves
*/
public class RepositoryConfiguration implements Serializable {
-
+
private static final String OPERATION_INPUT_ASSIGNED_TO = "assigned_to";
private static final String OPERATION_INPUT_DUP_ID = "dup_id";
@@ -60,34 +60,34 @@ public class RepositoryConfiguration implements Serializable {
private String repositoryUrl = "<unknown>";
- private Map<String, ProductEntry> products = new HashMap<String, ProductEntry>();
+ private final Map<String, ProductEntry> products = new HashMap<String, ProductEntry>();
- private List<String> platforms = new ArrayList<String>();
+ private final List<String> platforms = new ArrayList<String>();
- private List<String> operatingSystems = new ArrayList<String>();
+ private final List<String> operatingSystems = new ArrayList<String>();
- private List<String> priorities = new ArrayList<String>();
+ private final List<String> priorities = new ArrayList<String>();
- private List<String> severities = new ArrayList<String>();
+ private final List<String> severities = new ArrayList<String>();
- private List<String> bugStatus = new ArrayList<String>();
+ private final List<String> bugStatus = new ArrayList<String>();
- private List<String> openStatusValues = new ArrayList<String>();
+ private final List<String> openStatusValues = new ArrayList<String>();
- private List<String> resolutionValues = new ArrayList<String>();
+ private final List<String> resolutionValues = new ArrayList<String>();
- private List<String> keywords = new ArrayList<String>();
+ private final List<String> keywords = new ArrayList<String>();
// master lists
- private List<String> versions = new ArrayList<String>();
+ private final List<String> versions = new ArrayList<String>();
+
+ private final List<String> components = new ArrayList<String>();
- private List<String> components = new ArrayList<String>();
+ private final List<String> milestones = new ArrayList<String>();
- private List<String> milestones = new ArrayList<String>();
+ private final List<BugzillaCustomField> customFields = new ArrayList<BugzillaCustomField>();
- private List<BugzillaCustomField> customFields = new ArrayList<BugzillaCustomField>();
-
private String version = VERSION_UNKNOWN;
public RepositoryConfiguration() {
@@ -138,8 +138,9 @@ public class RepositoryConfiguration implements Serializable {
ProductEntry entry = products.get(product);
if (entry != null) {
return entry.getComponents();
- } else
+ } else {
return Collections.emptyList();
+ }
}
/**
@@ -150,8 +151,9 @@ public class RepositoryConfiguration implements Serializable {
ProductEntry entry = products.get(product);
if (entry != null) {
return entry.getVersions();
- } else
+ } else {
return Collections.emptyList();
+ }
}
/**
@@ -190,8 +192,9 @@ public class RepositoryConfiguration implements Serializable {
* Adds a component to the given product.
*/
public void addComponent(String product, String component) {
- if (!components.contains(component))
+ if (!components.contains(component)) {
components.add(component);
+ }
ProductEntry entry = products.get(product);
if (entry == null) {
entry = new ProductEntry(product);
@@ -228,8 +231,9 @@ public class RepositoryConfiguration implements Serializable {
// }
public void addVersion(String product, String version) {
- if (!versions.contains(version))
+ if (!versions.contains(version)) {
versions.add(version);
+ }
ProductEntry entry = products.get(product);
if (entry == null) {
entry = new ProductEntry(product);
@@ -282,8 +286,9 @@ public class RepositoryConfiguration implements Serializable {
}
public void addTargetMilestone(String product, String target) {
- if (!milestones.contains(target))
+ if (!milestones.contains(target)) {
milestones.add(target);
+ }
ProductEntry entry = products.get(product);
if (entry == null) {
entry = new ProductEntry(product);
@@ -298,8 +303,9 @@ public class RepositoryConfiguration implements Serializable {
ProductEntry entry = products.get(product);
if (entry != null) {
return entry.getTargetMilestones();
- } else
+ } else {
return Collections.emptyList();
+ }
}
/**
@@ -424,14 +430,14 @@ public class RepositoryConfiguration implements Serializable {
return customFields;
}
-
+
public void configureTaskData(RepositoryTaskData taskData) {
updateAttributeOptions(taskData);
addValidOperations(taskData);
}
public void updateAttributeOptions(RepositoryTaskData existingReport)
- {
+ {
String product = existingReport.getAttributeValue(BugzillaReportElement.PRODUCT.getKeyString());
for (RepositoryTaskAttribute attribute : existingReport.getAttributes()) {
if (attribute.getId().startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
@@ -479,7 +485,7 @@ public class RepositoryConfiguration implements Serializable {
}
private void addValidOperations(RepositoryTaskData bugReport)
- {
+ {
BUGZILLA_REPORT_STATUS status;
try {
status = BUGZILLA_REPORT_STATUS.valueOf(bugReport.getStatus());
@@ -544,11 +550,12 @@ public class RepositoryConfiguration implements Serializable {
case resolve:
newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_RESOLVE);
newOperation.setUpOptions(OPERATION_OPTION_RESOLUTION);
- 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)
- newOperation.addOption(resolution, resolution);
+ 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) {
+ newOperation.addOption(resolution, resolution);
}
+ }
break;
case duplicate:
newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_DUPLICATE);
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
index 00f090b02..0f5aab90a 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
@@ -35,12 +35,12 @@ public class SaxBugzillaQueryContentHandler extends DefaultHandler {
private String priority = PriorityLevel.getDefault().toString();
private String owner = "";
-
+
private StringBuffer characters;
- private LegacyTaskDataCollector collector;
+ private final LegacyTaskDataCollector collector;
- private String repositoryUrl;
+ private final String repositoryUrl;
private int resultCount;
@@ -87,15 +87,15 @@ public class SaxBugzillaQueryContentHandler extends DefaultHandler {
case ID:
id = parsedText;
break;
- // case BUG_SEVERITY:
- // severity = parsedText;
- // break;
+ // case BUG_SEVERITY:
+ // severity = parsedText;
+ // break;
case PRIORITY:
priority = parsedText;
break;
- // case REP_PLATFORM:
- // platform = parsedText;
- // break;
+ // case REP_PLATFORM:
+ // platform = parsedText;
+ // break;
case ASSIGNED_TO:
//hit.setOwner(parsedText);
owner = parsedText;
@@ -103,9 +103,9 @@ public class SaxBugzillaQueryContentHandler extends DefaultHandler {
case BUG_STATUS:
// state = parsedText;
break;
- // case RESOLUTION:
- // resolution = parsedText;
- // break;
+ // case RESOLUTION:
+ // resolution = parsedText;
+ // break;
case SHORT_DESC:
description = parsedText;
break;
@@ -131,9 +131,9 @@ public class SaxBugzillaQueryContentHandler extends DefaultHandler {
}
}
-
+
public int getResultCount() {
return resultCount;
}
-
+
}
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 1ff8aabfb..85c25cf66 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
@@ -127,28 +127,28 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
private int state = EXPECTING_ROOT;
private String currentProduct = "";
-
+
private String currentName = "";
private StringBuffer characters = new StringBuffer();
private String about;
- private RepositoryConfiguration configuration = new RepositoryConfiguration();
+ private final RepositoryConfiguration configuration = new RepositoryConfiguration();
- private Map<String, List<String>> components = new HashMap<String, List<String>>();
+ private final Map<String, List<String>> components = new HashMap<String, List<String>>();
- private Map<String, List<String>> versions = new HashMap<String, List<String>>();
+ private final Map<String, List<String>> versions = new HashMap<String, List<String>>();
- private Map<String, List<String>> milestones = new HashMap<String, List<String>>();
+ private final Map<String, List<String>> milestones = new HashMap<String, List<String>>();
- private Map<String, String> componentNames = new HashMap<String, String>();
+ private final Map<String, String> componentNames = new HashMap<String, String>();
- private Map<String, String> versionNames = new HashMap<String, String>();
+ private final Map<String, String> versionNames = new HashMap<String, String>();
- private Map<String, String> milestoneNames = new HashMap<String, String>();
+ private final Map<String, String> milestoneNames = new HashMap<String, String>();
- private Map<String, List<String>> customOption = new HashMap<String, List<String>>();
+ private final Map<String, List<String>> customOption = new HashMap<String, List<String>>();
private String currentCustomOptionName = "";
@@ -230,8 +230,9 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
state = state & ~IN_LI_LI;
} else if (localName.equals(ELEMENT_LI) && ((state & IN_LI_LI) != IN_LI_LI)) {
state = state & ~IN_LI;
- if (characters.length() == 0)
+ if (characters.length() == 0) {
return;
+ }
if (state == (IN_STATUS)) {
configuration.addStatus(characters.toString());
} else if (state == (IN_STATUS_OPEN)) {
@@ -335,8 +336,9 @@ public class SaxConfigurationContentHandler extends DefaultHandler {
if (currentName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
BugzillaCustomField newField = new BugzillaCustomField(characters.toString(), currentName);
List<String> customOptionList = customOption.get(currentName);
- if (customOptionList != null && !customOptionList.isEmpty())
+ if (customOptionList != null && !customOptionList.isEmpty()) {
newField.setOptions(customOptionList);
+ }
configuration.addCustomField(newField);
}
} else if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
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 f2a977439..d41e7e880 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
@@ -45,7 +45,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
private RepositoryAttachment attachment;
- private Map<String, RepositoryTaskData> taskDataMap;
+ private final Map<String, RepositoryTaskData> taskDataMap;
private RepositoryTaskData repositoryTaskData;
@@ -53,13 +53,13 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
private String errorMessage = null;
- private AbstractAttributeFactory attributeFactory;
+ private final AbstractAttributeFactory attributeFactory;
+
+ private final List<BugzillaCustomField> customFields;
+
+ private final LegacyTaskDataCollector collector;
- private List<BugzillaCustomField> customFields;
- private LegacyTaskDataCollector collector;
-
-
//private int retrieved = 1;
public SaxMultiBugReportContentHandler(AbstractAttributeFactory factory, LegacyTaskDataCollector collector, Map<String, RepositoryTaskData> taskDataMap, List<BugzillaCustomField> customFields) {
@@ -94,8 +94,9 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
characters = new StringBuffer();
BugzillaReportElement tag = BugzillaReportElement.UNKNOWN;
- if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX))
- return;
+ if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
+ return;
+ }
try {
tag = BugzillaReportElement.valueOf(localName.trim().toUpperCase(Locale.ENGLISH));
} catch (RuntimeException e) {
@@ -221,7 +222,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
break;
}
- // Comment attributes
+ // Comment attributes
case WHO:
if (taskComment != null) {
RepositoryTaskAttribute attr = attributeFactory.createAttribute(tag.getKeyString());
@@ -252,7 +253,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
}
break;
- // Attachment attributes
+ // Attachment attributes
case ATTACHID:
case DATE:
case DESC:
@@ -274,15 +275,15 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
}
break;
- // IGNORED ELEMENTS
- // case REPORTER_ACCESSIBLE:
- // case CLASSIFICATION_ID:
- // case CLASSIFICATION:
- // case CCLIST_ACCESSIBLE:
- // case EVERCONFIRMED:
+ // IGNORED ELEMENTS
+ // case REPORTER_ACCESSIBLE:
+ // case CLASSIFICATION_ID:
+ // case CLASSIFICATION:
+ // case CCLIST_ACCESSIBLE:
+ // case EVERCONFIRMED:
case BUGZILLA:
break;
-// Considering solution for bug#198714
+// Considering solution for bug#198714
// case DELTA_TS:
// RepositoryTaskAttribute delta_ts_attribute = repositoryTaskData.getAttribute(tag.getKeyString());
// if (delta_ts_attribute == null) {
@@ -365,7 +366,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
}
attachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_URL,
repositoryTaskData.getRepositoryUrl() + IBugzillaConstants.URL_GET_ATTACHMENT_SUFFIX
- + attachment.getId());
+ + attachment.getId());
attachment.setRepositoryKind(repositoryTaskData.getConnectorKind());
attachment.setRepositoryUrl(repositoryTaskData.getRepositoryUrl());
attachment.setTaskId(repositoryTaskData.getTaskId());
@@ -388,17 +389,17 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
}
}
break;
- // All others added as report attribute
+ // All others added as report attribute
default:
RepositoryTaskAttribute attribute = repositoryTaskData.getAttribute(tag.getKeyString());
- if (attribute == null) {
- attribute = attributeFactory.createAttribute(tag.getKeyString());
- attribute.setValue(parsedText);
- repositoryTaskData.addAttribute(tag.getKeyString(), attribute);
- } else {
- attribute.addValue(parsedText);
- }
- break;
+ if (attribute == null) {
+ attribute = attributeFactory.createAttribute(tag.getKeyString());
+ attribute.setValue(parsedText);
+ repositoryTaskData.addAttribute(tag.getKeyString(), attribute);
+ } else {
+ attribute.addValue(parsedText);
+ }
+ break;
}
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/StackTraceDuplicateDetector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/StackTraceDuplicateDetector.java
index 8fe5657c0..587946c47 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/StackTraceDuplicateDetector.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/StackTraceDuplicateDetector.java
@@ -22,7 +22,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
* @author Meghan Allen
*/
public class StackTraceDuplicateDetector extends AbstractDuplicateDetector {
-
+
private static final int DESCRIPTION_MAX_CHARS = 6000;
//private static final String NO_STACK_MESSAGE = "Unable to locate a stack trace in the description text.";
@@ -42,7 +42,7 @@ public class StackTraceDuplicateDetector extends AbstractDuplicateDetector {
try {
queryUrl = repository.getRepositoryUrl() + "/buglist.cgi?long_desc_type=allwordssubstr&long_desc="
- + URLEncoder.encode(searchString, repository.getCharacterEncoding());
+ + URLEncoder.encode(searchString, repository.getCharacterEncoding());
} catch (UnsupportedEncodingException e) {
StatusHandler.log(new Status(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID, "Error during duplicate detection", e));
return null;
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 be051ae5b..d301b3f09 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
@@ -29,6 +29,6 @@ public class AssignmentEvent extends TaskRevision {
@Override
public String toString() {
return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | "
- + this.getAssigned();
+ + 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 ba93c8dd2..7d3e23e0e 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 final int attachmentId;
- private List<AttachmentFlag> flags;
+ private final List<AttachmentFlag> flags;
public AttachmentEvent(int id, List<AttachmentFlag> flags) {
this.what = TaskRevision.ATTACHMENT;
@@ -56,8 +56,7 @@ public class AttachmentEvent extends TaskRevision {
AttachmentFlagState flagState = AttachmentFlagState.UNKNOWN;
String[] flagToken = attachmentFlags.split(", ");
- for (int i = 0; i < flagToken.length; i++) {
- String token = flagToken[i];
+ for (String token : flagToken) {
if (token.indexOf("(") != -1) {
int end = token.indexOf("(");
String substr = token.substring(0, end);
@@ -143,7 +142,7 @@ public class AttachmentEvent extends TaskRevision {
@Override
public String toString() {
return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.attachmentId + " | "
- + this.getFlagsString();
+ + this.getFlagsString();
}
public List<AttachmentFlag> getFlags() {
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 56920b359..e09f00c45 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
@@ -39,6 +39,6 @@ public class AttachmentFlag implements Serializable {
@Override
public String toString() {
return this.status.name() + "[" + (this.state.equals(AttachmentFlagState.UNKNOWN) ? "" : this.state.name())
- + "]";
+ + "]";
}
}
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 a702e324b..c3eca1275 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
@@ -19,6 +19,7 @@ import java.util.Iterator;
import java.util.Locale;
import javax.security.auth.login.LoginException;
+import javax.swing.text.html.HTML.Tag;
import org.apache.commons.lang.StringEscapeUtils;
import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer;
@@ -34,9 +35,9 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaLanguageSettings;
public class BugzillaTaskHistoryParser {
- private InputStream inStream;
+ private final InputStream inStream;
- private String characterEncoding;
+ private final String characterEncoding;
public BugzillaTaskHistoryParser(InputStream inStream, String characterEncoding) {
this.inStream = inStream;
@@ -49,7 +50,7 @@ public class BugzillaTaskHistoryParser {
* @return A BugActivity object containing the activity history
*/
public TaskHistory retrieveHistory(BugzillaLanguageSettings bugzillaLanguageSettings) throws IOException,
- ParseException, LoginException {
+ ParseException, LoginException {
TaskHistory activity = new TaskHistory();
HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(new BufferedReader(new InputStreamReader(inStream,
characterEncoding)), null);
@@ -60,7 +61,7 @@ public class BugzillaTaskHistoryParser {
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
// make sure that bugzilla doesn't want us to login
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == HtmlTag.Type.TITLE
+ if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.TITLE
&& !((HtmlTag) (token.getValue())).isEndTag()) {
isTitle = true;
continue;
@@ -72,7 +73,7 @@ public class BugzillaTaskHistoryParser {
title += ((StringBuffer) token.getValue()).toString().toLowerCase() + " ";
continue;
} else if (token.getType() == Token.TAG
- && ((HtmlTag) token.getValue()).getTagType() == HtmlTag.Type.TITLE
+ && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
&& ((HtmlTag) token.getValue()).isEndTag()) {
// check if we may have a problem with login by looking
// at
@@ -95,15 +96,16 @@ public class BugzillaTaskHistoryParser {
if (token.getType() == Token.TAG) {
HtmlTag tag = (HtmlTag) token.getValue();
// Skip till find <br> - "there can be only one"
- if (tag.getTagType() == HtmlTag.Type.BR && !tag.isEndTag()) {
+ if (tag.getTagType() == Tag.BR && !tag.isEndTag()) {
// skip tags until start of real data
while (true) {
token = tokenizer.nextToken();
if (token.getType() == Token.TAG) {
tag = (HtmlTag) token.getValue();
- if ((tag.isEndTag() && tag.getTagType() == HtmlTag.Type.TR)
- || tag.getTagType() == HtmlTag.Type.P)
+ if ((tag.isEndTag() && tag.getTagType() == Tag.TR)
+ || tag.getTagType() == Tag.P) {
break;
+ }
}
}
parseActivity(tokenizer, activity);
@@ -113,8 +115,9 @@ 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)
+ if (activity.size() == 0 && possibleBadLogin) {
throw new LoginException("Bugzilla login information incorrect");
+ }
return activity;
}
@@ -135,8 +138,9 @@ public class BugzillaTaskHistoryParser {
tag = (HtmlTag) token.getValue();
// End of events
- if (tag.getTagType() == HtmlTag.Type.TABLE && tag.isEndTag())
+ if (tag.getTagType() == Tag.TABLE && tag.isEndTag()) {
break;
+ }
// Get event entry
this.parseEvent(tokenizer, activity);
@@ -162,7 +166,7 @@ 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() == HtmlTag.Type.TD && tag.hasAttribute("rowspan")) {
+ if (tag.getTagType() == Tag.TD && tag.hasAttribute("rowspan")) {
numChanges = tag.getIntAttribute("rowspan");
break;
}
@@ -205,7 +209,7 @@ public class BugzillaTaskHistoryParser {
for (token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
if (token.getType() == Token.TAG) {
tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == HtmlTag.Type.TD && tag.isEndTag()) {
+ if (tag.getTagType() == Tag.TD && tag.isEndTag()) {
String data = StringEscapeUtils.unescapeHtml(sb.toString());
if (data.startsWith("\n") && (data.contains("Attachment") == false)) {
data = ""; // empty field
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 fc95dbb51..77655c626 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
@@ -32,7 +32,7 @@ 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());
+ + (this.getType().equals(ResolutionType.UNKNOWN) ? "" : this.getType());
}
}
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 bd6cae5d8..20627a33e 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
@@ -28,6 +28,6 @@ public class StatusEvent extends TaskRevision {
@Override
public String toString() {
return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | "
- + this.getType();
+ + this.getType();
}
}
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 af6de2c1b..9e7a9fab7 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
@@ -78,7 +78,7 @@ public class TaskHistory implements Iterable<TaskRevision>, Serializable {
public int size() {
return this.otherEvents.size() + this.statusEvents.size() + this.resolutionEvents.size()
- + this.assignmentEvents.size();
+ + this.assignmentEvents.size();
}
@Override
diff --git a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs
index 17d32793d..5e70d0848 100644
--- a/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -1,6 +1,7 @@
-#Sat Mar 01 13:22:50 PST 2008
+#Sat Mar 01 03:38:47 PST 2008
cleanup_settings_version=2
eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Mylyn based on Eclipse
formatter_settings_version=11
internal.default.compliance=default
@@ -10,3 +11,53 @@ org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
index 2f7c9b82b..9828de528 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java
@@ -39,7 +39,7 @@ import org.xml.sax.helpers.XMLReaderFactory;
public class BugzillaConfigurationTest extends TestCase {
BugzillaClientManager bugzillaClientManager = new BugzillaClientManager();
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -63,7 +63,7 @@ public class BugzillaConfigurationTest extends TestCase {
taskRepository.setCharacterEncoding(encoding);
return bugzillaClientManager.getClient(taskRepository, null);
}
-
+
public void test222RDFProductConfig() throws Exception {
BugzillaClient client = createClient(IBugzillaConstants.TEST_BUGZILLA_222_URL, "", "",
@@ -194,13 +194,13 @@ public class BugzillaConfigurationTest extends TestCase {
// incoming.append("xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
// incoming.append("xmlns:bz=\"http://www.bugzilla.org/rdf#\">");
// incoming.append("<li>");
-// incoming.append("<bz:product
+// incoming.append("<bz:product
// incoming.append("</bz:product>");
// incoming.append("</li>");
// incoming.append("</RDF>");
-//
+//
// StringBuffer result = XmlCleaner.clean(new StringReader(incoming.toString()));
-// System.err.println(result);
+// System.err.println(result);
// }
/**
@@ -245,7 +245,7 @@ public class BugzillaConfigurationTest extends TestCase {
assertNotNull(config);
assertTrue(config.getProducts().contains(
- "Test-Long-Named-Product-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));
+ "Test-Long-Named-Product-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));
// Add your additional checking for valid data here if necessary
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
index 5eb4663f3..61a313f8d 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java
@@ -69,9 +69,9 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
//// connector.performQuery(query, repository, new NullProgressMonitor(), collector);
//// System.err.println(">>> Collector: "+collector.getTasks().size());
//// for (AbstractTask task : collector.getTasks()) {
-//// TasksUiPlugin.getTaskList().addTask(task);
+//// TasksUiPlugin.getTaskList().addTask(task);
//// }
-//
+//
// TasksUiPlugin.getSynchronizationManager().synchronize(connector, query, null, true);
// //System.err.println(">>> initial size: "+query.getChildren().size());
// for (AbstractTask task : query.getChildren()) {
@@ -80,11 +80,11 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
// task.setLastReadTimeStamp("1970-01-01");
// assertTrue(task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED);
// }
-//
+//
// for (AbstractTask task : query.getChildren()) {
// assertTrue(task.getSynchronizationState() == SynchronizationState.SYNCHRONIZED);
// }
-//
+//
// repository.setSynchronizationTimeStamp("1970-01-01");//getSynchronizationTimeStamp();
// //connector.markStaleTasks(repository, query.getChildren(), new NullProgressMonitor());
// TasksUiPlugin.getSynchronizationManager().synchronize(connector, query, null, true);
@@ -92,7 +92,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
// assertTrue(task.getSynchronizationState() == SynchronizationState.INCOMING);
// }
// }
-
+
BugzillaTask fruitTask;
RepositoryTaskData fruitTaskData;
private void setFruitValueTo(String newValue) throws CoreException {
@@ -197,8 +197,8 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
fail("Should have failed due to invalid userid and password.");
}
-// testReassign Bugs
-// Version BugNr assigned reporter
+// testReassign Bugs
+// Version BugNr assigned reporter
// 2.22 92 user@mylar.eclipse.org tests@mylar.eclipse.org
// 3.0 5 tests@mylar.eclipse.org tests2@mylar.eclipse.org
// 3.1 1 rob.elves@eclipse.org tests@mylar.eclipse.org
@@ -260,7 +260,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
private void reassignToDefault31(BugzillaTask task, RepositoryTaskData taskData) throws CoreException {
// Modify it (reassignbycomponent)
String newCommentText = "BugzillaRepositoryClientTest.testReassign31(): reassignbycomponent "
- + (new Date()).toString();
+ + (new Date()).toString();
taskData.setNewComment(newCommentText);
Set<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
@@ -332,14 +332,14 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
private void reassignToDefaultOld(BugzillaTask task, RepositoryTaskData taskData) throws CoreException {
// Modify it (reassignbycomponent)
String newCommentText = "BugzillaRepositoryClientTest.testReassignOld(): reassignbycomponent "
- + (new Date()).toString();
+ + (new Date()).toString();
taskData.setNewComment(newCommentText);
Set<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- for (Iterator<RepositoryOperation> it = taskData.getOperations().iterator(); it.hasNext();) {
- RepositoryOperation o = it.next();
- if (o.isChecked())
+ for (RepositoryOperation o : taskData.getOperations()) {
+ if (o.isChecked()) {
o.setChecked(false);
+ }
if (o.getKnobName().compareTo("reassignbycomponent") == 0) {
o.setChecked(true);
taskData.setSelectedOperation(o);
@@ -357,10 +357,10 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
taskData.setNewComment(newCommentText);
Set<RepositoryTaskAttribute> changed = new HashSet<RepositoryTaskAttribute>();
changed.add(taskData.getAttribute(RepositoryTaskAttribute.COMMENT_NEW));
- for (Iterator<RepositoryOperation> it = taskData.getOperations().iterator(); it.hasNext();) {
- RepositoryOperation o = it.next();
- if (o.isChecked())
+ for (RepositoryOperation o : taskData.getOperations()) {
+ if (o.isChecked()) {
o.setChecked(false);
+ }
if (o.getKnobName().compareTo("reassign") == 0) {
o.setInputValue("tests2@mylyn.eclipse.org");
o.setChecked(true);
@@ -391,7 +391,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
BugzillaRepositoryQuery bugQuery = new BugzillaRepositoryQuery(
IBugzillaConstants.TEST_BUGZILLA_222_URL,
"http://mylyn.eclipse.org/bugs222/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&product=Read+Only+Test+Cases&long_desc_type=allwordssubstr&long_desc=&bug_status=NEW&order=Importance",
- "testFocedQuerySynchronization");
+ "testFocedQuerySynchronization");
taskList.addQuery(bugQuery);
@@ -444,7 +444,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
// repository,
// "http://mylyn.eclipse.org/bugs218/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=",
// null, collector, "-1");
- //
+ //
String queryUrl = "http://mylyn.eclipse.org/bugs218/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
BugzillaRepositoryQuery bugzillaQuery = new BugzillaRepositoryQuery(repository.getRepositoryUrl(), queryUrl, "search");
@@ -815,7 +815,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
priority = "P1";
recentTaskData.setAttributeValue(BugzillaReportElement.PRIORITY.getKeyString(), priority);
}
-
+
// disabled due to TasksUi.synchronizeChanged(connector, repository) being removed
// REMOVE ALL TASK DATA
// TasksUiPlugin.getTaskDataManager().clear();
@@ -881,20 +881,23 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
estimatedTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString()));
remainingTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString()));
actualTime = Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ACTUAL_TIME.getKeyString()));
- if (enableDeadline)
+ if (enableDeadline) {
deadline = bugtaskdata.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString());
+ }
estimatedTime += 2;
remainingTime += 1.5;
addTime = 0.75f;
- if (enableDeadline)
+ if (enableDeadline) {
deadline = generateNewDay();
+ }
bugtaskdata.setAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString(), "" + estimatedTime);
bugtaskdata.setAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString(), "" + remainingTime);
bugtaskdata.setAttributeValue(BugzillaReportElement.WORK_TIME.getKeyString(), "" + addTime);
- if (enableDeadline)
+ if (enableDeadline) {
bugtaskdata.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), deadline);
+ }
// for (AbstractTask task : tasks) {
// RepositoryTaskData taskData = TasksUiPlugin.getTaskDataManager().getNewTaskData(
@@ -907,7 +910,7 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
synchAndAssertState(tasks, SynchronizationState.SYNCHRONIZED);
bugtaskdata = TasksUiPlugin.getTaskDataStorageManager()
- .getNewTaskData(bugtask.getRepositoryUrl(), bugtask.getTaskId());
+ .getNewTaskData(bugtask.getRepositoryUrl(), bugtask.getTaskId());
assertEquals(estimatedTime,
Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ESTIMATED_TIME.getKeyString())));
@@ -915,8 +918,9 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.REMAINING_TIME.getKeyString())));
assertEquals(actualTime + addTime,
Float.parseFloat(bugtaskdata.getAttributeValue(BugzillaReportElement.ACTUAL_TIME.getKeyString())));
- if (enableDeadline)
+ if (enableDeadline) {
assertEquals(deadline, bugtaskdata.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString()));
+ }
}
@@ -980,13 +984,13 @@ public class BugzillaRepositoryConnectorTest extends AbstractBugzillaTest {
// assertEquals(abstractRepositoryConnector.getRepositoryType(), DEFAULT_KIND);
//
// connector = (BugzillaRepositoryConnector) abstractRepositoryConnector;
-//
+//
// long start = System.currentTimeMillis();
// BugzillaTask task = null;
// for(int x = 1; x < 5; x++) {
// if(task != null)
// taskList.deleteTask(task);
-//
+//
// task = this.generateLocalTaskAndDownload("154100");
// assertNotNull(task);
// }
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java
index 6e60ca3d6..04cf5c76c 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java
@@ -49,7 +49,7 @@ public class BugzillaTaskDataHandlerTest extends TestCase {
repository.setAuthenticationCredentials(credentials.username, credentials.password);
return repository;
}
-
+
private void testAttributesFromCloneBug(RepositoryTaskData repositoryTaskData, boolean valueFromBug9) {
assertEquals("Clone Bug 1", repositoryTaskData.getAttribute(BugzillaReportElement.SHORT_DESC.getKeyString())
.getValue());
@@ -154,7 +154,7 @@ public class BugzillaTaskDataHandlerTest extends TestCase {
testAttributesFromCloneBug(report2, false);
}
-
+
public void testCharacterEscaping() throws CoreException {
String bugid = "17";
setRepository(BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_30_URL);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
index de2e61105..4174c458e 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java
@@ -33,23 +33,23 @@ public class BugzillaTaskHyperlinkDetectorTest extends TestCase {
private static final String DUPLICATE = "duplicate of " + DUPLICATE_NUMBER;
- private String TASK_FORMAT_1 = "task#1";
+ private final String TASK_FORMAT_1 = "task#1";
- private String TASK_FORMAT_2 = "task# 1";
+ private final String TASK_FORMAT_2 = "task# 1";
- private String TASK_FORMAT_3 = "task1";
+ private final String TASK_FORMAT_3 = "task1";
- private String TASK_FORMAT_4 = "task #1";
+ private final String TASK_FORMAT_4 = "task #1";
- private String BUG_FORMAT_1 = "bug# 1";
+ private final String BUG_FORMAT_1 = "bug# 1";
- private String BUG_FORMAT_2 = "bug # 1";
+ private final String BUG_FORMAT_2 = "bug # 1";
- private String BUG_FORMAT_3 = "bug1";
+ private final String BUG_FORMAT_3 = "bug1";
- private String BUG_FORMAT_4 = "bug #1";
+ private final String BUG_FORMAT_4 = "bug #1";
- private String BUG_FORMAT_1_2 = "bug# 2";
+ private final String BUG_FORMAT_1_2 = "bug# 2";
//private BugzillaTaskHyperlinkDetector detector = new BugzillaTaskHyperlinkDetector();
private TaskHyperlinkDetector detector;
@@ -91,7 +91,7 @@ public class BugzillaTaskHyperlinkDetectorTest extends TestCase {
detector.dispose();
repositoryManager.clearRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath());
-
+
shell.dispose();
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
index 97b0951ea..8ecae026d 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListManagerTest.java
@@ -98,10 +98,10 @@ public class BugzillaTaskListManagerTest extends TestCase {
.getChildren()
.size());
ITask readTask = manager.getTaskList()
- .getUnmatchedContainer(IBugzillaConstants.ECLIPSE_BUGZILLA_URL)
- .getChildren()
- .iterator()
- .next();
+ .getUnmatchedContainer(IBugzillaConstants.ECLIPSE_BUGZILLA_URL)
+ .getChildren()
+ .iterator()
+ .next();
assertEquals(repositoryTask.getHandleIdentifier(), readTask.getHandleIdentifier());
assertEquals(repositoryTask.getSummary(), readTask.getSummary());
@@ -146,9 +146,9 @@ public class BugzillaTaskListManagerTest extends TestCase {
manager.readExistingOrCreateNewList();
assertEquals(1, manager.getTaskList().getQueries().size());
BugzillaRepositoryQuery readQuery = (BugzillaRepositoryQuery) manager.getTaskList()
- .getQueries()
- .iterator()
- .next();
+ .getQueries()
+ .iterator()
+ .next();
assertTrue(readQuery.isCustomQuery());
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
index 7874d2b46..c3795f278 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskTest.java
@@ -32,7 +32,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
*/
public class BugzillaTaskTest extends TestCase {
- private BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
+ private final BugzillaAttributeFactory attributeFactory = new BugzillaAttributeFactory();
@Override
protected void setUp() throws Exception {
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java
index 0b9aa30cd..76f907d06 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java
@@ -75,8 +75,9 @@ public class BugzillaTestPlugin extends AbstractUIPlugin {
*/
public ResourceBundle getResourceBundle() {
try {
- if (resourceBundle == null)
+ if (resourceBundle == null) {
resourceBundle = ResourceBundle.getBundle("org.eclipse.mylyn.bugzilla.tests.TestsPluginResources");
+ }
} catch (MissingResourceException x) {
resourceBundle = null;
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
index 5bee32fc9..428969f9b 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/DuplicateDetetionTest.java
@@ -44,7 +44,7 @@ public class DuplicateDetetionTest extends TestCase {
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
@@ -63,7 +63,7 @@ public class DuplicateDetetionTest extends TestCase {
String fakeStackTrace = "this is not really a stacktrace";
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(fakeStackTrace);
model.setNew(true);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
@@ -85,7 +85,7 @@ public class DuplicateDetetionTest extends TestCase {
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(extraText + "\n" + stackTrace + "\n");
model.setNew(true);
@@ -105,17 +105,17 @@ public class DuplicateDetetionTest extends TestCase {
public void testStackTraceMisaligned() throws Exception {
String stackTrace = "java.lang.IllegalStateException: zip file closed\n"
- + " at java.util.zip.ZipFile.ensureOpen (ZipFile.java:518)\n"
- + "at java.util.zip.ZipFile.getEntry (ZipFile.java:251)\n"
- + " at java.util.jar.JarFile.getEntry(JarFile.java:200)\n"
- + "at sun.net.www.protocol.jar.URLJarFile.getEntry\n" + " (URLJarFile.java:90)\n"
- + "at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)\n"
- + "at sun.net.www.protocol.jar.JarURLConnection.getInputStream\n" + "(JarURLConnection.java:124)\n"
- + "at org.eclipse.jdt.internal.core.JavaElement\n.getURLContents(JavaElement.java:734)";
+ + " at java.util.zip.ZipFile.ensureOpen (ZipFile.java:518)\n"
+ + "at java.util.zip.ZipFile.getEntry (ZipFile.java:251)\n"
+ + " at java.util.jar.JarFile.getEntry(JarFile.java:200)\n"
+ + "at sun.net.www.protocol.jar.URLJarFile.getEntry\n" + " (URLJarFile.java:90)\n"
+ + "at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)\n"
+ + "at sun.net.www.protocol.jar.JarURLConnection.getInputStream\n" + "(JarURLConnection.java:124)\n"
+ + "at org.eclipse.jdt.internal.core.JavaElement\n.getURLContents(JavaElement.java:734)";
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -136,17 +136,17 @@ public class DuplicateDetetionTest extends TestCase {
// SUN, IBM (no space before brackets, one set of brackets)
String stackTrace = "java.lang.IllegalStateException: zip file closed\n"
- + " at java.util.zip.ZipFile.ensureOpen(ZipFile.java:518)\n"
- + " at java.util.zip.ZipFile.getEntry(ZipFile.java:251)\n"
- + " at java.util.jar.JarFile.getEntry(JarFile.java:200)\n"
- + " at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)\n"
- + " at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)\n"
- + " at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)\n"
- + " at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734)";
+ + " at java.util.zip.ZipFile.ensureOpen(ZipFile.java:518)\n"
+ + " at java.util.zip.ZipFile.getEntry(ZipFile.java:251)\n"
+ + " at java.util.jar.JarFile.getEntry(JarFile.java:200)\n"
+ + " at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:90)\n"
+ + " at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:112)\n"
+ + " at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)\n"
+ + " at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734)";
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -167,13 +167,13 @@ public class DuplicateDetetionTest extends TestCase {
// gcj/gij (path and lib names in additional brackets)
String stackTrace = "java.lang.Error: Something bad happened\n"
- + " at testcase.main(java.lang.String[]) (Unknown Source)\n"
- + " at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)\n"
- + " at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)";
+ + " at testcase.main(java.lang.String[]) (Unknown Source)\n"
+ + " at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)\n"
+ + " at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)";
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -194,11 +194,11 @@ public class DuplicateDetetionTest extends TestCase {
// ikvm (no line numbers)
String stackTrace = "java.lang.Error: Something bad happened\n" + " at testcase.main (testcase.java)\n"
- + " at java.lang.reflect.Method.Invoke (Method.java)";
+ + " at java.lang.reflect.Method.Invoke (Method.java)";
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -219,14 +219,14 @@ public class DuplicateDetetionTest extends TestCase {
// jrockit (slash delimiters)
String stackTrace = "java.lang.Error: Something bad happened\n"
- + " at java/io/BufferedReader.readLine(BufferedReader.java:331)\n"
- + " at java/io/BufferedReader.readLine(BufferedReader.java:362)\n"
- + " at java/util/Properties.load(Properties.java:192)\n"
- + " at java/util/logging/LogManager.readConfiguration(L:555)";
+ + " at java/io/BufferedReader.readLine(BufferedReader.java:331)\n"
+ + " at java/io/BufferedReader.readLine(BufferedReader.java:362)\n"
+ + " at java/util/Properties.load(Properties.java:192)\n"
+ + " at java/util/logging/LogManager.readConfiguration(L:555)";
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
@@ -247,12 +247,12 @@ public class DuplicateDetetionTest extends TestCase {
// jamvm, sablevm, kaffe, cacao (space before brackets, one set of brackets)
String stackTrace = "java.lang.Error: Something bad happened\n" + " at testcase.main (testcase.java:3)\n"
- + " at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)\n"
- + " at java.lang.VirtualMachine.main (VirtualMachine.java:108)";
+ + " at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)\n"
+ + " at java.lang.VirtualMachine.main (VirtualMachine.java:108)";
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setDescription(stackTrace);
model.setNew(true);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
index b035be61a..397ebeb45 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java
@@ -54,7 +54,7 @@ public class EncodingTest extends AbstractBugzillaTest {
repository.setCharacterEncoding("ISO-8859-1");
task = (BugzillaTask) TasksUiUtil.createTask(repository, "57", new NullProgressMonitor());
assertNotNull(task);
- //TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
+ //TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
// iso-8859-1 'incorrect' interpretation
assertFalse(task.getSummary().equals("\u00E6"));//"\u05D0"));
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java
index 354117edb..5b14c380b 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java
@@ -43,43 +43,46 @@ public class NewBugWizardTest extends TestCase {
BugzillaCorePlugin.getDefault().setPlatformOptions(newReport);
String os = Platform.getOS();
- if (os.equals("win32"))
+ if (os.equals("win32")) {
assertEquals("Windows", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("solaris"))
+ } else if (os.equals("solaris")) {
assertEquals("Solaris", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("qnx"))
+ } else if (os.equals("qnx")) {
assertEquals("QNX-Photon", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("macosx"))
+ } else if (os.equals("macosx")) {
assertEquals("Mac OS", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("linux"))
+ } else if (os.equals("linux")) {
assertEquals("Linux", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("hpux"))
+ } else if (os.equals("hpux")) {
assertEquals("HP-UX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
- else if (os.equals("aix"))
+ } else if (os.equals("aix")) {
assertEquals("AIX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue());
+ }
String platform = Platform.getOSArch();
if (platform.equals("x86")) {
- if (os.equals("macosx"))
+ if (os.equals("macosx")) {
assertEquals("Macintosh", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString())
.getValue());
- else
+ } else {
assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- } else if (platform.equals("x86_64"))
+ }
+ } else if (platform.equals("x86_64")) {
assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("ia64"))
+ } else if (platform.equals("ia64")) {
assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("ia64_32"))
+ } else if (platform.equals("ia64_32")) {
assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("sparc"))
+ } else if (platform.equals("sparc")) {
assertEquals("Sun", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue());
- else if (platform.equals("ppc")) {
- if (os.equals("macosx"))
+ } else if (platform.equals("ppc")) {
+ if (os.equals("macosx")) {
assertEquals("Macintosh", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString())
.getValue());
- else
+ } else {
assertEquals("Power", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString())
.getValue());
+ }
}
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java
index 89e808c68..0bf872684 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java
@@ -80,7 +80,7 @@ public class RepositoryEditorWizardTest extends TestCase {
try {
BugzillaClient client = createClient(page.getServerUrl(), page.getUserName(),
page.getPassword(), page.getHttpAuthUserId(), page.getHttpAuthPassword(),
- page.getCharacterEncoding());
+ page.getCharacterEncoding());
client.validate(null);
} catch (CoreException e) {
return;
@@ -184,7 +184,7 @@ public class RepositoryEditorWizardTest extends TestCase {
page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
try {
client = createClient(page.getServerUrl(), page.getUserName(), page.getPassword(),
- page.getHttpAuthUserId(), page.getHttpAuthPassword(),
+ page.getHttpAuthUserId(), page.getHttpAuthPassword(),
page.getCharacterEncoding());
client.validate(null);
} catch (CoreException e) {
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
index 68c1ea79a..c3aad8c32 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java
@@ -90,7 +90,7 @@ public class RepositoryReportFactoryTest extends TestCase {
// setRepository(BugzillaCorePlugin.REPOSITORY_KIND,
// IBugzillaConstants.TEST_BUGZILLA_222_URL);
// RepositoryTaskData report = init(bugid);
- //
+ //
// assertNotNull(report);
// assertEquals("search-match-test 1",
// report.getAttribute(BugzillaReportElement.SHORT_DESC.getKeyString())
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
index 9879b4d6b..1c8bc1388 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java
@@ -68,10 +68,10 @@ public class RepositoryTaskHandleTest extends TestCase {
manager.readExistingOrCreateNewList();
BugzillaTask readReport = (BugzillaTask) manager.getTaskList()
- .getUnmatchedContainer(repositoryUrl)
- .getChildren()
- .iterator()
- .next();
+ .getUnmatchedContainer(repositoryUrl)
+ .getChildren()
+ .iterator()
+ .next();
assertEquals(readReport.getSummary(), readReport.getSummary());
assertEquals(readReport.getRepositoryUrl(), readReport.getRepositoryUrl());
TasksUiPlugin.getRepositoryManager().removeRepository(repository,
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
index 41aed0b9b..7615bb4e6 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java
@@ -59,7 +59,7 @@ public class TaskEditorTest extends TestCase {
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setNew(true);
AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
repository.getConnectorKind());
@@ -83,14 +83,14 @@ public class TaskEditorTest extends TestCase {
// editor.doSave(new NullProgressMonitor());
}
- public void testinitializeTaskData() throws Exception {
+ public void testinitializeTaskData() throws Exception {
TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND,
IBugzillaConstants.TEST_BUGZILLA_222_URL);
RepositoryTaskData model = new RepositoryTaskData(new BugzillaAttributeFactory(),
BugzillaCorePlugin.REPOSITORY_KIND, repository.getRepositoryUrl(), TasksUiPlugin.getTaskDataStorageManager()
- .getNewRepositoryTaskId());
+ .getNewRepositoryTaskId());
model.setNew(true);
AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUiPlugin.getRepositoryManager().getRepositoryConnector(
repository.getConnectorKind());
@@ -102,6 +102,6 @@ public class TaskEditorTest extends TestCase {
model.setAttributeValue(RepositoryTaskAttribute.PRODUCT, "TestProduct");
assertEquals("TestProduct", model.getProduct());
assertTrue(taskDataHandler.initializeTaskData(repository, model, null));
-
+
}
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
index 459233447..4c8df296b 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListNotificationManagerTest.java
@@ -92,7 +92,7 @@ public class TaskListNotificationManagerTest extends TestCase {
BugzillaTask hit = new BugzillaTask("https://bugs.eclipse.org/bugs", "1", "summary");
assertFalse(hit.isNotified());
BugzillaRepositoryQuery query = new BugzillaRepositoryQuery("https://bugs.eclipse.org/bugs", "queryUrl",
- "summary");
+ "summary");
TasksUiPlugin.getTaskList().addQuery(query);
TasksUiPlugin.getTaskList().addTask(hit, query);
@@ -112,7 +112,7 @@ public class TaskListNotificationManagerTest extends TestCase {
String hitHandle = hit.getHandleIdentifier();
assertFalse(hit.isNotified());
BugzillaRepositoryQuery query = new BugzillaRepositoryQuery("https://bugs.eclipse.org/bugs", "queryUrl",
- "summary");
+ "summary");
TasksUiPlugin.getTaskList().addQuery(query);
TasksUiPlugin.getTaskList().addTask(hit, query);
TaskListNotificationManager notificationManager = TasksUiPlugin.getTaskListNotificationManager();
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
index 9b9caa848..eae425ad2 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java
@@ -111,11 +111,11 @@ public class BugzillaQueryTest extends TestCase {
// // You can use the getAttributeValue to pull up the information on any
// // part of the bug
// assertEquals("P1", taskData.getAttributeValue(BugzillaReportElement.PRIORITY.getKeyString()));
-//
+//
// taskData = taskDataMap.get("2");
// assertEquals("nhapke@cs.ubc.ca", taskData.getAssignedTo());
// assertEquals("search-match-test 1", taskData.getDescription());
-//
+//
// taskData = taskDataMap.get("4");
// assertEquals("relves@cs.ubc.ca", taskData.getReporter());
// assertEquals("Test", taskData.getDescription());
@@ -130,7 +130,7 @@ public class BugzillaQueryTest extends TestCase {
// taskData.setSummary("New Summary");
// // post this modification back to the repository
// handler.postTaskData(repository, taskData);
- //
+ //
// // You can use the getAttributeValue to pull up the information on any
// // part of the bug
// // assertEquals("P1",
@@ -141,7 +141,7 @@ public class BugzillaQueryTest extends TestCase {
@SuppressWarnings("deprecation")
public void testQueryViaConnector() throws Exception {
String queryUrlString = repository.getRepositoryUrl()
- + "/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
+ + "/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=search-match-test&product=TestProduct&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&deadlinefrom=&deadlineto=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=";
// holds onto actual hit objects
ITaskList taskList = new TaskList();
diff --git a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs
index 062a04e2b..5e70d0848 100644
--- a/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -1,6 +1,7 @@
-#Sat Mar 01 13:22:54 PST 2008
+#Sat Mar 01 03:38:47 PST 2008
cleanup_settings_version=2
eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Mylyn based on Eclipse
formatter_settings_version=11
internal.default.compliance=default
@@ -10,3 +11,53 @@ org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) 2004, 2007 Mylyn project committers and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java
index c7f077711..669131e64 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareNode.java
@@ -11,7 +11,6 @@ package org.eclipse.mylyn.internal.bugzilla.ui;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
-import java.util.Iterator;
import org.eclipse.compare.IStreamContentAccessor;
import org.eclipse.compare.ITypedElement;
@@ -197,8 +196,7 @@ public class BugzillaCompareNode implements IStreamContentAccessor, IStructureCo
}
BugzillaCompareNode comments = new BugzillaCompareNode("Comments", null, defaultImage);
- for (Iterator<TaskComment> iter = bug.getComments().iterator(); iter.hasNext();) {
- TaskComment taskComment = iter.next();
+ for (TaskComment taskComment : bug.getComments()) {
String bodyString = "Comment from " + taskComment.getAuthorName() + ":\n\n" + taskComment.getText();
comments.addChild(new BugzillaCompareNode(
taskComment.getAttributeValue(BugzillaReportElement.BUG_WHEN.getKeyString()), bodyString,
@@ -209,8 +207,7 @@ public class BugzillaCompareNode implements IStreamContentAccessor, IStructureCo
topNode.addChild(new BugzillaCompareNode("New Comment", bug.getNewComment(), defaultImage));
BugzillaCompareNode ccList = new BugzillaCompareNode("CC List", null, defaultImage);
- for (Iterator<String> iter = bug.getCc().iterator(); iter.hasNext();) {
- String cc = iter.next();
+ for (String cc : bug.getCc()) {
ccList.addChild(new BugzillaCompareNode("CC", cc, defaultImage));
}
topNode.addChild(ccList);
@@ -227,7 +224,7 @@ public class BugzillaCompareNode implements IStreamContentAccessor, IStructureCo
// Date creationDate = bug.getCreated();
// if (creationDate == null) {
// // XXX: this could be backwards
-// creationDate = Calendar.getInstance().getTime();
+// creationDate = Calendar.getInstance().getTime();
// }
// BugzillaCompareNode child = new BugzillaCompareNode("Creation Date", creationDate.toString(), defaultImage);
// topNode.addChild(child);
@@ -250,7 +247,7 @@ public class BugzillaCompareNode implements IStreamContentAccessor, IStructureCo
// // Since the bug report may not be saved offline, get the
// // attribute's new
// // value, which is what is in the submit viewer.
-//
+//
// attributes.addChild(new BugzillaCompareNode(attribute.getName(), attribute.getValue(), attributeImage));
// }
// topNode.addChild(attributes);
@@ -258,9 +255,9 @@ public class BugzillaCompareNode implements IStreamContentAccessor, IStructureCo
// topNode.addChild(new BugzillaCompareNode("Description", bug.getDescription(), defaultImage));
//
// BugzillaCompareNode comments = new BugzillaCompareNode("Comments", null, defaultImage);
-// for (Iterator<Comment> iter = bug.getComments().iterator(); iter.hasNext();) {
+// for (Iterator<Comment> iter = bug.getComments().iterator(); iter.hasNext();) {
// Comment comment = iter.next();
-// String bodyString = "Comment from " + comment.getAuthorName() + ":\n\n" + comment.getText();
+// String bodyString = "Comment from " + comment.getAuthorName() + ":\n\n" + comment.getText();
// comments.addChild(new BugzillaCompareNode(comment.getAttributeValue(BugzillaReportElement.CREATION_TS), bodyString, defaultImage));
// }
// topNode.addChild(comments);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java
index 6895050e9..35a8b121f 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaCompareStructureCreator.java
@@ -47,8 +47,9 @@ public class BugzillaCompareStructureCreator implements IStructureCreator {
public String getContents(Object node, boolean ignoreWhitespace) {
if (node instanceof BugzillaCompareNode) {
String s = ((BugzillaCompareNode) node).getValue();
- if (ignoreWhitespace)
+ if (ignoreWhitespace) {
s = s.trim();
+ }
return s;
}
return null;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
index 9ba54c306..64bbc3dac 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java
@@ -51,7 +51,7 @@ public class BugzillaImages {
public static final ImageDescriptor OVERLAY_ENHANCEMENT = create(T_VIEW, "overlay-enhancement.gif");
public static final ImageDescriptor OVERLAY_MINOR = create(T_VIEW, "overlay-minor.gif");
-
+
private static ImageDescriptor create(String prefix, String name) {
try {
return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
@@ -61,12 +61,14 @@ public class BugzillaImages {
}
private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
- if (baseURL == null)
+ if (baseURL == null) {
throw new MalformedURLException();
+ }
StringBuffer buffer = new StringBuffer(prefix);
- if (prefix != "")
+ if (prefix != "") {
buffer.append('/');
+ }
buffer.append(name);
return new URL(baseURL, buffer.toString());
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
index 14222419f..11ee8b703 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java
@@ -56,11 +56,11 @@ public class BugzillaUiExtensionReader {
IExtensionPoint templatesExtensionPoint = registry.getExtensionPoint(EXTENSION_LANGUAGES);
IExtension[] templateExtensions = templatesExtensionPoint.getExtensions();
- for (int i = 0; i < templateExtensions.length; i++) {
- IConfigurationElement[] elements = templateExtensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- if (elements[j].getName().equals(EXTENSION_TMPL_LANGUAGE)) {
- readLanguageTemplate(elements[j]);
+ for (IExtension templateExtension : templateExtensions) {
+ IConfigurationElement[] elements = templateExtension.getConfigurationElements();
+ for (IConfigurationElement element : elements) {
+ if (element.getName().equals(EXTENSION_TMPL_LANGUAGE)) {
+ readLanguageTemplate(element);
}
}
}
@@ -75,7 +75,7 @@ public class BugzillaUiExtensionReader {
if (languageName != null) {
BugzillaRepositoryConnector connector = (BugzillaRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
+ .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
BugzillaLanguageSettings bugzillaLanguageSettings = new BugzillaLanguageSettings(languageName);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
index f72849b63..853fc1cde 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
@@ -87,7 +87,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
}
BugzillaRepositoryConnector bugzillaConnector = (BugzillaRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
+ .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
TasksUi.getRepositoryManager().addListener(bugzillaConnector.getClientManager());
@@ -116,7 +116,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
public void stop(BundleContext context) throws Exception {
BugzillaRepositoryConnector bugzillaConnector = (BugzillaRepositoryConnector) TasksUi.getRepositoryManager()
- .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
+ .getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
TasksUi.getRepositoryManager().removeListener(bugzillaConnector.getClientManager());
@@ -145,27 +145,30 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
public static String[] getQueryOptions(String prefId, String[] selectedProducts, RepositoryConfiguration repositoryConfiguration) {
List<String> options = new ArrayList<String>();
if ((prefId.equals(IBugzillaConstants.VALUES_COMPONENT) || prefId.equals(IBugzillaConstants.VALUES_VERSION) || prefId.equals(IBugzillaConstants.VALUES_TARGET))
- && selectedProducts != null) {
- for (String product : selectedProducts) {
- if (prefId.equals(IBugzillaConstants.VALUES_COMPONENT)) {
- for (String option : repositoryConfiguration.getComponents(product)) {
- if (!options.contains(option))
- options.add(option);
+ && selectedProducts != null) {
+ for (String product : selectedProducts) {
+ if (prefId.equals(IBugzillaConstants.VALUES_COMPONENT)) {
+ for (String option : repositoryConfiguration.getComponents(product)) {
+ if (!options.contains(option)) {
+ options.add(option);
}
- }
- if (prefId.equals(IBugzillaConstants.VALUES_VERSION)) {
- for (String option : repositoryConfiguration.getVersions(product)) {
- if (!options.contains(option))
- options.add(option);
+ }
+ }
+ if (prefId.equals(IBugzillaConstants.VALUES_VERSION)) {
+ for (String option : repositoryConfiguration.getVersions(product)) {
+ if (!options.contains(option)) {
+ options.add(option);
}
}
- if (prefId.equals(IBugzillaConstants.VALUES_TARGET)) {
- for (String option : repositoryConfiguration.getTargetMilestones(product)) {
- if (!options.contains(option))
- options.add(option);
+ }
+ if (prefId.equals(IBugzillaConstants.VALUES_TARGET)) {
+ for (String option : repositoryConfiguration.getTargetMilestones(product)) {
+ if (!options.contains(option)) {
+ options.add(option);
}
}
}
+ }
} else {
if (prefId.equals(IBugzillaConstants.VALUES_COMPONENT)) {
options = repositoryConfiguration.getComponents();
@@ -199,8 +202,9 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
return origText;
} else {
String[] textArray = new String[(origText.length() / WRAP_LENGTH + 1) * 2];
- for (int i = 0; i < textArray.length; i++)
+ for (int i = 0; i < textArray.length; i++) {
textArray[i] = null;
+ }
int j = 0;
while (true) {
int spaceIndex = origText.indexOf(" ", WRAP_LENGTH - 5);
@@ -215,10 +219,11 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
String newText = "";
- for (int i = 0; i < textArray.length; i++) {
- if (textArray[i] == null)
+ for (String element : textArray) {
+ if (element == null) {
break;
- newText += textArray[i] + "\n";
+ }
+ newText += element + "\n";
}
return newText;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
index 778108139..c9858cf6e 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
@@ -8,6 +8,7 @@
package org.eclipse.mylyn.internal.bugzilla.ui.editor;
import java.io.IOException;
+import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
@@ -27,6 +28,7 @@ import org.eclipse.jface.text.ITextListener;
import org.eclipse.jface.text.TextEvent;
import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.window.Window;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCustomField;
@@ -236,7 +238,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
String dependson = taskData.getAttributeValue(BugzillaReportElement.DEPENDSON.getKeyString());
String blocked = taskData.getAttributeValue(BugzillaReportElement.BLOCKED.getKeyString());
boolean addHyperlinks = (dependson != null && dependson.length() > 0)
- || (blocked != null && blocked.length() > 0);
+ || (blocked != null && blocked.length() > 0);
if (addHyperlinks) {
getManagedForm().getToolkit().createLabel(composite, "");
@@ -296,7 +298,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
} catch (IOException e) {
MessageDialog.openInformation(null, "Attribute Display Error",
"Could not retrieve keyword list, ensure proper configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + "\n\nError reported: " + e.getMessage());
+ + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + "\n\nError reported: " + e.getMessage());
}
addVoting(composite);
@@ -306,13 +308,15 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
addRoles(composite);
}
- if (taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null)
+ if (taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null) {
addBugzillaTimeTracker(getManagedForm().getToolkit(), composite);
+ }
}
private boolean hasCustomAttributeChanges() {
- if (taskData == null)
+ if (taskData == null) {
return false;
+ }
String customAttributeKeys[] = { BugzillaReportElement.BUG_FILE_LOC.getKeyString(),
BugzillaReportElement.DEPENDSON.getKeyString(), BugzillaReportElement.BLOCKED.getKeyString(),
BugzillaReportElement.KEYWORDS.getKeyString(), BugzillaReportElement.VOTES.getKeyString(),
@@ -553,7 +557,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
Calendar cal = deadlinePicker.getDate();
if (cal != null) {
Date d = cal.getTime();
- SimpleDateFormat f = (SimpleDateFormat) SimpleDateFormat.getDateInstance();
+ SimpleDateFormat f = (SimpleDateFormat) DateFormat.getDateInstance();
f.applyPattern("yyyy-MM-dd");
taskData.setAttributeValue(BugzillaReportElement.DEADLINE.getKeyString(), f.format(d));
@@ -589,8 +593,9 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
protected void addKeywordsList(Composite attributesComposite) throws IOException {
// newLayout(attributesComposite, 1, "Keywords:", PROPERTY);
final RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.KEYWORDS);
- if (attribute == null)
+ if (attribute == null) {
return;
+ }
Label label = createLabel(attributesComposite, attribute);
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
@@ -634,7 +639,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
int responseCode = keywordsDialog.open();
String newKeywords = keywordsDialog.getSelectedKeywordsString();
- if (responseCode == Dialog.OK && keywords != null) {
+ if (responseCode == Window.OK && keywords != null) {
keywordsText.setText(newKeywords);
attribute.setValue(newKeywords);
attributeChanged(attribute);
@@ -760,6 +765,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
}
}
+ @Override
protected boolean attributeChanged(RepositoryTaskAttribute attribute) {
if (attribute == null) {
return false;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
index 50f7d996d..c7ce4919c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java
@@ -25,9 +25,9 @@ import org.eclipse.swt.widgets.Shell;
*/
public class KeywordsDialog extends Dialog {
- private List<String> selectedKeywords;
+ private final List<String> selectedKeywords;
- private List<String> validKeywords;
+ private final List<String> validKeywords;
private CheckboxTableViewer keyWordsList;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
index 9b2796025..bf5a51a4c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java
@@ -90,12 +90,12 @@ public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor {
public void submitToRepository() {
if (summaryText.getText().equals("")) {
MessageDialog.openInformation(this.getSite().getShell(), "Submit Error",
- "Please provide a brief summary with new reports.");
+ "Please provide a brief summary with new reports.");
summaryText.setFocus();
return;
} else if (descriptionTextViewer.getTextWidget().getText().equals("")) {
MessageDialog.openInformation(this.getSite().getShell(), "Submit Error",
- "Please proved a detailed description with new reports");
+ "Please proved a detailed description with new reports");
descriptionTextViewer.getTextWidget().setFocus();
return;
}
@@ -103,7 +103,7 @@ public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor {
String componentValue = attribute.getValue();
if (componentValue.equals("")) {
MessageDialog.openInformation(this.getSite().getShell(), "Submit Error",
- "Please select a component with new reports");
+ "Please select a component with new reports");
descriptionTextViewer.getTextWidget().setFocus();
return;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
index baccf54b8..5a715797a 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
@@ -119,10 +119,10 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
private static final String[] keywordOperationValues = { "allwords", "anywords", "nowords" };
private static final String[] emailRoleValues = { "emailassigned_to1", "emailreporter1", "emailcc1",
- "emaillongdesc1" };
+ "emaillongdesc1" };
private static final String[] emailRoleValues2 = { "emailassigned_to2", "emailreporter2", "emailcc2",
- "emaillongdesc2" };
+ "emaillongdesc2" };
private BugzillaRepositoryQuery originalQuery = null;
@@ -244,7 +244,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
private RepositoryConfiguration repositoryConfiguration;
- private SelectionAdapter updateActionSelectionAdapter = new SelectionAdapter() {
+ private final SelectionAdapter updateActionSelectionAdapter = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (isControlCreated()) {
@@ -466,7 +466,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
adapter.setLabelProvider(propsalLabelProvider);
}
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
+
Composite emailComposite = new Composite(composite, SWT.NONE);
emailComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
GridLayout emailLayout = new GridLayout();
@@ -838,9 +838,9 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
public void widgetSelected(SelectionEvent e) {
if (getTaskRepository() != null) {
// try {
-
- updateConfiguration(true);
-
+
+ updateConfiguration(true);
+
// } catch (final CoreException e1) {
// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
// public void run() {
@@ -929,12 +929,14 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// }
private void handleWidgetSelected(Combo widget, Combo operation, ArrayList<BugzillaSearchData> history) {
- if (widget.getSelectionIndex() < 0)
+ if (widget.getSelectionIndex() < 0) {
return;
+ }
int index = history.size() - 1 - widget.getSelectionIndex();
BugzillaSearchData patternData = history.get(index);
- if (patternData == null || !widget.getText().equals(patternData.pattern))
+ if (patternData == null || !widget.getText().equals(patternData.pattern)) {
return;
+ }
widget.setText(patternData.pattern);
operation.setText(operation.getItem(patternData.operation));
}
@@ -1036,7 +1038,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
MessageDialog.openError(Display.getDefault().getActiveShell(),
"Bugzilla Search Page",
"Unable to get configuration. Ensure proper repository configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
+ + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
}
});
}
@@ -1083,13 +1085,13 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
private boolean canQuery() {
if (isControlCreated()) {
return product.getSelectionCount() > 0 || component.getSelectionCount() > 0
- || version.getSelectionCount() > 0 || target.getSelectionCount() > 0
- || status.getSelectionCount() > 0 || resolution.getSelectionCount() > 0
- || severity.getSelectionCount() > 0 || priority.getSelectionCount() > 0
- || hardware.getSelectionCount() > 0 || os.getSelectionCount() > 0
- || summaryPattern.getText().length() > 0 || commentPattern.getText().length() > 0
- || emailPattern.getText().length() > 0 || emailPattern2.getText().length() > 0
- || keywords.getText().length() > 0;
+ || version.getSelectionCount() > 0 || target.getSelectionCount() > 0
+ || status.getSelectionCount() > 0 || resolution.getSelectionCount() > 0
+ || severity.getSelectionCount() > 0 || priority.getSelectionCount() > 0
+ || hardware.getSelectionCount() > 0 || os.getSelectionCount() > 0
+ || summaryPattern.getText().length() > 0 || commentPattern.getText().length() > 0
+ || emailPattern.getText().length() > 0 || emailPattern2.getText().length() > 0
+ || keywords.getText().length() > 0;
} else {
return false;
}
@@ -1153,8 +1155,9 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
private String[] getPreviousPatterns(ArrayList<BugzillaSearchData> patternHistory) {
int size = patternHistory.size();
String[] patterns = new String[size];
- for (int i = 0; i < size; i++)
+ for (int i = 0; i < size; i++) {
patterns[i] = (patternHistory.get(size - 1 - i)).pattern;
+ }
return patterns;
}
@@ -1215,27 +1218,27 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
sb.append(URLEncoder.encode(summaryPattern.getText(), getTaskRepository().getCharacterEncoding()));
int[] selected = product.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&product=");
- sb.append(URLEncoder.encode(product.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(product.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = component.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&component=");
- sb.append(URLEncoder.encode(component.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(component.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = version.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&version=");
- sb.append(URLEncoder.encode(version.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(version.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = target.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&target_milestone=");
- sb.append(URLEncoder.encode(target.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(target.getItem(element), getTaskRepository().getCharacterEncoding()));
}
sb.append("&long_desc_type=");
@@ -1244,39 +1247,39 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
sb.append(URLEncoder.encode(commentPattern.getText(), getTaskRepository().getCharacterEncoding()));
selected = status.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&bug_status=");
- sb.append(URLEncoder.encode(status.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(status.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = resolution.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&resolution=");
- sb.append(URLEncoder.encode(resolution.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(resolution.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = severity.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&bug_severity=");
- sb.append(URLEncoder.encode(severity.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(severity.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = priority.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&priority=");
- sb.append(URLEncoder.encode(priority.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(priority.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = hardware.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&ref_platform=");
- sb.append(URLEncoder.encode(hardware.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(hardware.getItem(element), getTaskRepository().getCharacterEncoding()));
}
selected = os.getSelectionIndices();
- for (int i = 0; i < selected.length; i++) {
+ for (int element : selected) {
sb.append("&op_sys=");
- sb.append(URLEncoder.encode(os.getItem(selected[i]), getTaskRepository().getCharacterEncoding()));
+ sb.append(URLEncoder.encode(os.getItem(element), getTaskRepository().getCharacterEncoding()));
}
if (emailPattern.getText() != null && !emailPattern.getText().trim().equals("")) {
@@ -1348,8 +1351,9 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
public IDialogSettings getDialogSettings() {
IDialogSettings settings = BugzillaUiPlugin.getDefault().getDialogSettings();
fDialogSettings = settings.getSection(PAGE_NAME);
- if (fDialogSettings == null)
+ if (fDialogSettings == null) {
fDialogSettings = settings.addNewSection(PAGE_NAME);
+ }
return fDialogSettings;
}
@@ -1379,12 +1383,12 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
version.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_VERSION, selectedProducts,
- repositoryConfiguration));
-
+ repositoryConfiguration));
+
target.setItems(BugzillaUiPlugin.getQueryOptions(IBugzillaConstants.VALUES_TARGET, selectedProducts,
repositoryConfiguration));
-
+
status.setItems(convertStringListToArray(repositoryConfiguration.getStatusValues()));
resolution.setItems(convertStringListToArray(repositoryConfiguration.getResolutions()));
severity.setItems(convertStringListToArray(repositoryConfiguration.getSeverities()));
@@ -1393,7 +1397,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
os.setItems(convertStringListToArray(repositoryConfiguration.getOSs()));
}
}
-
+
public boolean canFlipToNextPage() {
// if (getErrorMessage() != null)
// return false;
@@ -1421,20 +1425,23 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
String key = option.substring(0, option.indexOf("="));
String value = URLDecoder.decode(option.substring(option.indexOf("=") + 1),
getTaskRepository().getCharacterEncoding());
- if (key == null)
+ if (key == null) {
continue;
+ }
if (key.equals("short_desc")) {
summaryPattern.setText(value);
} else if (key.equals("short_desc_type")) {
- if (value.equals("allwordssubstr"))
+ if (value.equals("allwordssubstr")) {
value = "all words";
- else if (value.equals("anywordssubstr"))
+ } else if (value.equals("anywordssubstr")) {
value = "any word";
+ }
int index = 0;
for (String item : summaryOperation.getItems()) {
- if (item.compareTo(value) == 0)
+ if (item.compareTo(value) == 0) {
break;
+ }
index++;
}
if (index < summaryOperation.getItemCount()) {
@@ -1477,14 +1484,16 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
sel = new String[selList.size()];
version.setSelection(selList.toArray(sel));
} else if (key.equals("long_desc_type")) {
- if (value.equals("allwordssubstr"))
+ if (value.equals("allwordssubstr")) {
value = "all words";
- else if (value.equals("anywordssubstr"))
+ } else if (value.equals("anywordssubstr")) {
value = "any word";
+ }
int index = 0;
for (String item : commentOperation.getItems()) {
- if (item.compareTo(value) == 0)
+ if (item.compareTo(value) == 0) {
break;
+ }
index++;
}
if (index < commentOperation.getItemCount()) {
@@ -1539,38 +1548,43 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// assumed to be
// in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons[0].setSelection(true);
- else
+ } else {
emailButtons[0].setSelection(false);
+ }
} else if (key.equals("emailreporter1")) { // HACK: email
// buttons assumed
// to be in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons[1].setSelection(true);
- else
+ } else {
emailButtons[1].setSelection(false);
+ }
} else if (key.equals("emailcc1")) { // HACK: email buttons
// assumed to be in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons[2].setSelection(true);
- else
+ } else {
emailButtons[2].setSelection(false);
+ }
} else if (key.equals("emaillongdesc1")) { // HACK: email
// buttons assumed
// to be in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons[3].setSelection(true);
- else
+ } else {
emailButtons[3].setSelection(false);
+ }
} else if (key.equals("emailtype1")) {
int index = 0;
for (String item : emailOperation.getItems()) {
- if (item.compareTo(value) == 0)
+ if (item.compareTo(value) == 0) {
break;
+ }
index++;
}
if (index < emailOperation.getItemCount()) {
@@ -1583,38 +1597,43 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
// assumed to be
// in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons2[0].setSelection(true);
- else
+ } else {
emailButtons2[0].setSelection(false);
+ }
} else if (key.equals("emailreporter2")) { // HACK: email
// buttons assumed
// to be in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons2[1].setSelection(true);
- else
+ } else {
emailButtons2[1].setSelection(false);
+ }
} else if (key.equals("emailcc2")) { // HACK: email buttons
// assumed to be in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons2[2].setSelection(true);
- else
+ } else {
emailButtons2[2].setSelection(false);
+ }
} else if (key.equals("emaillongdesc2")) { // HACK: email
// buttons assumed
// to be in same
// position
- if (value.equals("1"))
+ if (value.equals("1")) {
emailButtons2[3].setSelection(true);
- else
+ } else {
emailButtons2[3].setSelection(false);
+ }
} else if (key.equals("emailtype2")) {
int index = 0;
for (String item : emailOperation2.getItems()) {
- if (item.compareTo(value) == 0)
+ if (item.compareTo(value) == 0) {
break;
+ }
index++;
}
if (index < emailOperation2.getItemCount()) {
@@ -1844,7 +1863,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
IProgressService service = PlatformUI.getWorkbench().getProgressService();
service.busyCursorWhile(updateRunnable);
}
-
+
} catch (InvocationTargetException ex) {
Shell shell = null;
@@ -1880,7 +1899,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
StatusHandler.log(new Status(IStatus.ERROR, BugzillaUiPlugin.PLUGIN_ID, cause.getMessage(),
cause));
}
- }
+ }
if(ex.getCause() instanceof OperationCanceledException) {
return;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
index 767a43ec8..ca5770cd5 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java
@@ -59,7 +59,7 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
public String getTaskHistoryUrl(TaskRepository taskRepository, ITask task) {
return taskRepository.getRepositoryUrl() + IBugzillaConstants.URL_BUG_ACTIVITY + task.getTaskId();
}
-
+
@Override
public List<AbstractTaskContainer> getLegendItems() {
List<AbstractTaskContainer> legendItems = new ArrayList<AbstractTaskContainer>();
@@ -121,8 +121,9 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
while (m.find()) {
if (lineOffset >= m.start() && lineOffset <= m.end()) {
IHyperlink link = extractHyperlink(repository, regionOffset, m);
- if (link != null)
+ if (link != null) {
hyperlinksFound.add(link);
+ }
}
}
@@ -144,8 +145,9 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
int end = m.end();
- if (end == -1)
+ if (end == -1) {
end = m.group().length();
+ }
try {
@@ -180,7 +182,7 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
public IWizard getNewTaskWizard(TaskRepository taskRepository, TaskSelection selection) {
return new NewBugzillaTaskWizard(taskRepository, selection);
}
-
+
@Override
public IWizard getQueryWizard(TaskRepository repository, AbstractRepositoryQuery query) {
if (query instanceof BugzillaRepositoryQuery) {
@@ -208,8 +210,9 @@ public class BugzillaConnectorUi extends AbstractRepositoryConnectorUi {
// we wouldn't have to get the task data this way from here
RepositoryTaskData taskData = TasksUiPlugin.getTaskDataStorageManager().getNewTaskData(task.getRepositoryUrl(),
task.getTaskId());
- if (taskData != null && taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null)
+ if (taskData != null && taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null) {
return true;
+ }
}
return super.supportsDueDates(task);
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
index acee94b59..54b4f44cd 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java
@@ -66,8 +66,9 @@ public class BugzillaCustomQueryDialog extends Dialog {
l.setText("Bugzilla Query Category Name");
nameText = new Text(custom, SWT.BORDER | SWT.SINGLE);
- if (name != null)
+ if (name != null) {
nameText.setText(name);
+ }
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 300;
nameText.setLayoutData(gd);
@@ -76,8 +77,9 @@ public class BugzillaCustomQueryDialog extends Dialog {
l.setText("Max Hits Returned (-1 means all)");
maxHitsText = new Text(custom, SWT.BORDER | SWT.SINGLE);
- if (maxHits != null)
+ if (maxHits != null) {
maxHitsText.setText(maxHits);
+ }
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 300;
maxHitsText.setLayoutData(gd);
@@ -86,8 +88,9 @@ public class BugzillaCustomQueryDialog extends Dialog {
l.setText("Query URL");
queryText = new Text(custom, SWT.BORDER | SWT.SINGLE);
- if (startingUrl != null)
+ if (startingUrl != null) {
queryText.setText(startingUrl);
+ }
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 300;
queryText.setLayoutData(gd);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
index 60159dedb..6c071e279 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
@@ -75,7 +75,7 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
queryTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
queryTitle.addModifyListener(modifyListener);
queryTitle.setFocus();
-
+
final Label queryUrlLabel = new Label(composite, SWT.NONE);
queryUrlLabel.setText(LABEL_CUSTOM_QUERY);
@@ -95,7 +95,7 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
public String getQueryTitle() {
return queryTitle.getText();
}
-
+
@Override
public boolean canFlipToNextPage() {
return false;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
index 6d94ff58e..3d115cb00 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
@@ -38,9 +38,9 @@ public class BugzillaQueryTypeWizardPage extends WizardPage {
private Composite composite;
- private BugzillaCustomQueryWizardPage customPage;
+ private final BugzillaCustomQueryWizardPage customPage;
- private BugzillaSearchPage searchPage;
+ private final BugzillaSearchPage searchPage;
public BugzillaQueryTypeWizardPage(TaskRepository repository) {
super(TITLE);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
index 4ec799e8a..09aa24d0c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
@@ -107,7 +107,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
setEncoding(template.characterEncoding);
}
getContainer().updateButtons();
-
+
}
@Override
protected void createAdditionalControls(Composite parent) {
@@ -187,10 +187,11 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
Label defaultPlatformLabel = new Label(parent, SWT.NONE);
defaultPlatformLabel.setText("Autodetect platform and os");
- if (null == repository)
+ if (null == repository) {
defaultPlatformLabel.setToolTipText(TOOLTIP_AUTODETECTION_DISABLED);
- else
+ } else {
defaultPlatformLabel.setToolTipText(TOOLTIP_AUTODETECTION_ENABLED);
+ }
Composite platformOSContainer = new Composite(parent, SWT.NONE);
GridLayout gridLayout = new GridLayout(3, false);
@@ -209,7 +210,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
getWizard().getContainer().run(true, false, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
+ InterruptedException {
try {
monitor.beginTask("Retrieving repository configuration", IProgressMonitor.UNKNOWN);
repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository,
@@ -248,10 +249,11 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
});
autodetectPlatformOS.setEnabled(null != repository);
- if (null == repository)
+ if (null == repository) {
autodetectPlatformOS.setToolTipText(TOOLTIP_AUTODETECTION_DISABLED);
- else
+ } else {
autodetectPlatformOS.setToolTipText(TOOLTIP_AUTODETECTION_ENABLED);
+ }
autodetectPlatformOS.setSelection(null == platform && null == os);
defaultPlatformCombo = new Combo(platformOSContainer, SWT.READ_ONLY);
@@ -438,10 +440,10 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
// final String httpAuthPass;
//
// final Proxy proxy;
-
+
final TaskRepository repository;
- private String[] versions = new String[1];;
+ private final String[] versions = new String[1];;
public BugzillaValidator(TaskRepository repository, String version) {
// serverUrl = getServerUrl();
@@ -468,15 +470,15 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
private void displayError(final String serverUrl, Throwable e) {
IStatus status;
if (e instanceof MalformedURLException) {
- status = new BugzillaStatus(Status.WARNING, BugzillaCorePlugin.PLUGIN_ID,
+ status = new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_NETWORK, "Server URL is invalid.");
} else if (e instanceof CoreException) {
status = ((CoreException) e).getStatus();
} else if (e instanceof IOException) {
- status = new BugzillaStatus(Status.WARNING, BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_IO,
+ status = new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_IO,
serverUrl, e.getMessage());
} else {
- status = new BugzillaStatus(Status.WARNING, BugzillaCorePlugin.PLUGIN_ID,
+ status = new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.PLUGIN_ID,
RepositoryStatus.ERROR_NETWORK, serverUrl, e.getMessage());
}
TasksUiInternal.displayStatus("Validation failed", status);
@@ -506,7 +508,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
// client = BugzillaClientFactory.createClient(serverUrl, newUserId, newPassword, httpAuthUser,
// httpAuthPass, proxy, newEncoding);
// client.logout();
-// } else
+// } else
if (versions != null) {
client = BugzillaClientFactory.createClient(repository);
client.validate(monitor);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
index 25e76fe2d..070bdc26a 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
@@ -28,7 +28,7 @@ public class BugzillaTaskEditorInput extends RepositoryTaskEditorInput {
private String bugTitle = "";
- private BugzillaTask bugTask;
+ private final BugzillaTask bugTask;
public BugzillaTaskEditorInput(TaskRepository repository, BugzillaTask bugzillaTask, boolean offline) {
super(repository, bugzillaTask.getTaskId(), bugzillaTask.getUrl());
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
index 72e27e57c..5f116c515 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java
@@ -19,18 +19,18 @@ import java.util.List;
public class StackTrace {
/** The length of the stack trace in the original string */
- private int length;
+ private final int length;
/** The offset of the stack trace in the orignal string */
- private int offset;
+ private final int offset;
/** The string of the stack trace */
- private String stackTrace;
+ private final String stackTrace;
/**
* This is the comment that the stack trace appeared in. String if desciption else Comment
*/
- private Object comment;
+ private final Object comment;
/**
* Constructor
@@ -180,8 +180,9 @@ public class StackTrace {
stackTraces.add(getStackTrace(stackTrace, charStackStart, charPos[0] - charStackStart, comment));
}
- if (stackTraces.size() == 0)
+ if (stackTraces.size() == 0) {
return null;
+ }
// get the string values of the stack traces and return it
return getTracesFromList(stackTraces);
@@ -233,8 +234,9 @@ public class StackTrace {
if (l1.trim().matches(regexAtString)) {
charPos[0] += l1.length() + 2;
res = l1;
- } else
+ } else {
return null;
+ }
// now determine where the end is if it wasn't on 1 line
if (!res.trim().matches(regexEndString)) {
@@ -302,8 +304,9 @@ public class StackTrace {
private static StackTrace[] getTracesFromList(List<StackTrace> l) {
// make sure that there is something to convert, else return null
- if (l == null || l.size() == 0)
+ if (l == null || l.size() == 0) {
return null;
+ }
// convert the list of strings to an array of strings
int i = 0;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
index d693bac18..7df84f9c7 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -69,6 +70,7 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.progress.UIJob;
/**
@@ -85,7 +87,7 @@ public class BugzillaProductPage extends WizardPage {
private static final String NEW_BUGZILLA_TASK_ERROR_TITLE = "New Bugzilla Task Error";
private static final String DESCRIPTION = "Pick a product to open the new bug editor.\n"
- + "Press the Update button if the product is not in the list.";
+ + "Press the Update button if the product is not in the list.";
private static final String LABEL_UPDATE = "Update Products from Repository";
@@ -95,7 +97,7 @@ public class BugzillaProductPage extends WizardPage {
/**
* Reference to the bug wizard which created this page so we can create the second page
*/
- private NewBugzillaTaskWizard bugWizard;
+ private final NewBugzillaTaskWizard bugWizard;
/** The instance of the workbench */
protected IWorkbench workbench;
@@ -127,8 +129,8 @@ public class BugzillaProductPage extends WizardPage {
this.workbench = workbench;
this.bugWizard = bugWiz;
this.repository = repository;
- setImageDescriptor(BugzillaUiPlugin.imageDescriptorFromPlugin("org.eclipse.mylyn.bugzilla.ui",
- "icons/wizban/bug-wizard.gif"));
+ setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.mylyn.bugzilla.ui",
+ "icons/wizban/bug-wizard.gif"));
}
@@ -231,11 +233,11 @@ public class BugzillaProductPage extends WizardPage {
public void widgetSelected(SelectionEvent e) {
try {
final AbstractRepositoryConnector connector = TasksUi.getRepositoryManager()
- .getRepositoryConnector(repository.getConnectorKind());
+ .getRepositoryConnector(repository.getConnectorKind());
getContainer().run(true, false, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException,
- InterruptedException {
+ InterruptedException {
monitor.beginTask("Updating repository report options...", IProgressMonitor.UNKNOWN);
try {
connector.updateRepositoryConfiguration(repository, monitor);
@@ -263,7 +265,7 @@ public class BugzillaProductPage extends WizardPage {
public void run() {
MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page",
"Unable to get configuration. Ensure proper repository configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
+ + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
}
});
}
@@ -302,7 +304,7 @@ public class BugzillaProductPage extends WizardPage {
public void run() {
MessageDialog.openError(Display.getDefault().getActiveShell(), NEW_BUGZILLA_TASK_ERROR_TITLE,
"Unable to get products. Ensure proper repository configuration in "
- + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
+ + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n");
}
});
}
@@ -382,8 +384,9 @@ public class BugzillaProductPage extends WizardPage {
*/
protected void applyToStatusLine(IStatus status) {
String message = status.getMessage();
- if (message.length() == 0)
+ if (message.length() == 0) {
message = null;
+ }
switch (status.getSeverity()) {
case IStatus.OK:
setErrorMessage(null);
@@ -391,16 +394,16 @@ public class BugzillaProductPage extends WizardPage {
break;
case IStatus.WARNING:
setErrorMessage(null);
- setMessage(message, WizardPage.WARNING);
+ setMessage(message, IMessageProvider.WARNING);
break;
case IStatus.INFO:
setErrorMessage(null);
- setMessage(message, WizardPage.INFORMATION);
+ setMessage(message, IMessageProvider.INFORMATION);
break;
default:
setErrorMessage(null);
- setMessage(message, WizardPage.ERROR);
- break;
+ setMessage(message, IMessageProvider.ERROR);
+ break;
}
}
@@ -414,13 +417,13 @@ public class BugzillaProductPage extends WizardPage {
AbstractLegacyRepositoryConnector connector = (AbstractLegacyRepositoryConnector) TasksUi.getRepositoryManager().getRepositoryConnector(
repository.getConnectorKind());
if (connector == null) {
- throw new CoreException(new Status(Status.ERROR, BugzillaUiPlugin.PLUGIN_ID,
- "Error AbstractRepositoryConnector could not been retrieved.\n\n"));
+ throw new CoreException(new Status(IStatus.ERROR, BugzillaUiPlugin.PLUGIN_ID,
+ "Error AbstractRepositoryConnector could not been retrieved.\n\n"));
}
AbstractTaskDataHandler taskDataHandler = connector.getLegacyTaskDataHandler();
if (taskDataHandler == null) {
- throw new CoreException(new Status(Status.ERROR, BugzillaUiPlugin.PLUGIN_ID,
- "Error AbstractTaskDataHandler could not been retrieved.\n\n"));
+ throw new CoreException(new Status(IStatus.ERROR, BugzillaUiPlugin.PLUGIN_ID,
+ "Error AbstractTaskDataHandler could not been retrieved.\n\n"));
}
taskDataHandler.initializeTaskData(repository, model, null);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
index 0660eaf7d..70796dc78 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java
@@ -28,6 +28,7 @@ import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
* @author Mik Kersten
@@ -61,7 +62,7 @@ public class NewBugzillaTaskWizard extends Wizard implements INewWizard {
taskData = new RepositoryTaskData(new BugzillaAttributeFactory(), BugzillaCorePlugin.REPOSITORY_KIND,
repository.getRepositoryUrl(), TasksUiPlugin.getDefault().getNextNewRepositoryTaskId());
taskData.setNew(true);
- super.setDefaultPageImageDescriptor(BugzillaUiPlugin.imageDescriptorFromPlugin(
+ super.setDefaultPageImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(
"org.eclipse.mylyn.internal.bugzilla.ui", "icons/wizban/bug-wizard.gif"));
super.setWindowTitle(TITLE);
setNeedsProgressMonitor(true);

Back to the top