Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-06-29 20:12:32 -0400
committerrelves2006-06-29 20:12:32 -0400
commitd83d7f3427ee96f6bb463531e6ecc99e2de546e9 (patch)
treea318a06ed5d932825b2d54dc2dee52ac6f591a73
parenta4522e7bb92a0d471cc84ba26136e09ca5ffc77c (diff)
downloadorg.eclipse.mylyn.tasks-d83d7f3427ee96f6bb463531e6ecc99e2de546e9.tar.gz
org.eclipse.mylyn.tasks-d83d7f3427ee96f6bb463531e6ecc99e2de546e9.tar.xz
org.eclipse.mylyn.tasks-d83d7f3427ee96f6bb463531e6ecc99e2de546e9.zip
Completed: 142891: Bugzilla search should remember values from the last search
https://bugs.eclipse.org/bugs/show_bug.cgi?id=142891
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java19
1 files changed, 13 insertions, 6 deletions
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 014f90e96..b55b9a989 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
@@ -977,6 +977,10 @@ public class BugzillaSearchPage extends AbstractBugzillaQueryPage implements ISe
repositoryCombo.setText(selectRepo);
repository = MylarTaskListPlugin.getRepositoryManager().getRepository(
BugzillaPlugin.REPOSITORY_KIND, repositoryCombo.getText());
+ if (repository == null) {
+ repository = MylarTaskListPlugin.getRepositoryManager().getDefaultRepository(
+ BugzillaPlugin.REPOSITORY_KIND);
+ }
} else {
repositoryCombo.select(indexToSelect);
}
@@ -1020,12 +1024,15 @@ public class BugzillaSearchPage extends AbstractBugzillaQueryPage implements ISe
* attributes so the component/version/milestone lists have the
* proper values, then we can restore all the widget selections.
*/
- IDialogSettings settings = getDialogSettings();
- String repoId = "." + repository.getUrl();
- if (getWizard() == null && restoreQueryOptions && settings.getArray(STORE_PRODUCT_ID + repoId) != null && product != null) {
- product.setSelection(nonNullArray(settings, STORE_PRODUCT_ID + repoId));
- updateAttributesFromRepository(repository.getUrl(), product.getSelection(), false);
- restoreWidgetValues();
+ if (repository != null) {
+ IDialogSettings settings = getDialogSettings();
+ String repoId = "." + repository.getUrl();
+ if (getWizard() == null && restoreQueryOptions && settings.getArray(STORE_PRODUCT_ID + repoId) != null
+ && product != null) {
+ product.setSelection(nonNullArray(settings, STORE_PRODUCT_ID + repoId));
+ updateAttributesFromRepository(repository.getUrl(), product.getSelection(), false);
+ restoreWidgetValues();
+ }
}
if (scontainer != null) {

Back to the top