Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-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
19 files changed, 269 insertions, 173 deletions
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