Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2012-11-18 15:07:13 -0500
committerFrank Becker2012-11-18 15:07:13 -0500
commita12cda4438d58d49f1f490645b0219d569ea5ab8 (patch)
treeb063a2943876817805dfadb5e7a894c8cac1bb7b /org.eclipse.mylyn.bugzilla.ui
parente8f49283d766cd89db0fd47e5423fe6604fa62ab (diff)
downloadorg.eclipse.mylyn.tasks-a12cda4438d58d49f1f490645b0219d569ea5ab8.tar.gz
org.eclipse.mylyn.tasks-a12cda4438d58d49f1f490645b0219d569ea5ab8.tar.xz
org.eclipse.mylyn.tasks-a12cda4438d58d49f1f490645b0219d569ea5ab8.zip
Revert "372600: redesign of RepositoryConfiguration create new usage api Change-Id: Ieb5f1514ac88b9d32b529fdbe27b8f215d0873f6 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=372600"
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java16
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java9
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java17
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java5
4 files changed, 19 insertions, 28 deletions
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 9a07858dd..a3bbecdb1 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
@@ -15,7 +15,6 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientManager;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
@@ -144,24 +143,21 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
&& selectedProducts != null) {
for (String product : selectedProducts) {
if (prefId.equals(IBugzillaConstants.VALUES_COMPONENT)) {
- for (String option : repositoryConfiguration.getProductOptionValues(BugzillaAttribute.COMPONENT,
- product)) {
+ for (String option : repositoryConfiguration.getComponents(product)) {
if (!options.contains(option)) {
options.add(option);
}
}
}
if (prefId.equals(IBugzillaConstants.VALUES_VERSION)) {
- for (String option : repositoryConfiguration.getProductOptionValues(BugzillaAttribute.VERSION,
- product)) {
+ for (String option : repositoryConfiguration.getVersions(product)) {
if (!options.contains(option)) {
options.add(option);
}
}
}
if (prefId.equals(IBugzillaConstants.VALUES_TARGET)) {
- for (String option : repositoryConfiguration.getProductOptionValues(
- BugzillaAttribute.TARGET_MILESTONE, product)) {
+ for (String option : repositoryConfiguration.getTargetMilestones(product)) {
if (!options.contains(option)) {
options.add(option);
}
@@ -170,13 +166,13 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
}
} else {
if (prefId.equals(IBugzillaConstants.VALUES_COMPONENT)) {
- options = repositoryConfiguration.getOptionValues(BugzillaAttribute.COMPONENT);
+ options = repositoryConfiguration.getComponents();
}
if (prefId.equals(IBugzillaConstants.VALUES_VERSION)) {
- options = repositoryConfiguration.getOptionValues(BugzillaAttribute.VERSION);
+ options = repositoryConfiguration.getVersions();
}
if (prefId.equals(IBugzillaConstants.VALUES_TARGET)) {
- options = repositoryConfiguration.getOptionValues(BugzillaAttribute.TARGET_MILESTONE);
+ options = repositoryConfiguration.getTargetMilestones();
}
}
return options.toArray(new String[options.size()]);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
index 0ed443d9f..ce7353c76 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
@@ -451,8 +451,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
.getRoot()
.getMappedAttribute(BugzillaAttribute.COMPONENT.getKey());
if (attributeComponent != null) {
- List<String> optionValues = repositoryConfiguration.getProductOptionValues(
- BugzillaAttribute.COMPONENT, taskAttribute.getValue());
+ List<String> optionValues = repositoryConfiguration.getComponents(taskAttribute.getValue());
Collections.sort(optionValues);
attributeComponent.clearOptions();
for (String option : optionValues) {
@@ -468,8 +467,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
.getRoot()
.getMappedAttribute(BugzillaAttribute.TARGET_MILESTONE.getKey());
if (attributeTargetMilestone != null) {
- List<String> optionValues = repositoryConfiguration.getProductOptionValues(
- BugzillaAttribute.TARGET_MILESTONE, taskAttribute.getValue());
+ List<String> optionValues = repositoryConfiguration.getTargetMilestones(taskAttribute.getValue());
Collections.sort(optionValues);
attributeTargetMilestone.clearOptions();
for (String option : optionValues) {
@@ -487,8 +485,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
.getRoot()
.getMappedAttribute(BugzillaAttribute.VERSION.getKey());
if (attributeVersion != null) {
- List<String> optionValues = repositoryConfiguration.getProductOptionValues(
- BugzillaAttribute.VERSION, taskAttribute.getValue());
+ List<String> optionValues = repositoryConfiguration.getVersions(taskAttribute.getValue());
Collections.sort(optionValues);
attributeVersion.clearOptions();
for (String option : optionValues) {
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 da5df3e26..13b958ff5 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
@@ -43,7 +43,6 @@ import org.eclipse.mylyn.commons.ui.dialogs.InPlaceDialogEvent;
import org.eclipse.mylyn.commons.workbench.InPlaceCheckBoxTreeDialog;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.commons.workbench.forms.SectionComposite;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCustomField;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaSearch;
@@ -911,7 +910,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage2 implements
Map<String, String> validValues = new HashMap<String, String>();
if (getRepositoryConfiguration() != null) {
- for (String string : getRepositoryConfiguration().getOptionValues(BugzillaAttribute.KEYWORDS)) {
+ for (String string : getRepositoryConfiguration().getKeywords()) {
validValues.put(string, string);
}
}
@@ -1551,19 +1550,19 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage2 implements
String[] saved_hardware = hardware.getSelection();
String[] saved_os = os.getSelection();
- java.util.List<String> products = repositoryConfiguration.getOptionValues(BugzillaAttribute.PRODUCT);
+ java.util.List<String> products = repositoryConfiguration.getProducts();
String[] productsList = products.toArray(new String[products.size()]);
Arrays.sort(productsList, String.CASE_INSENSITIVE_ORDER);
product.setItems(productsList);
updateAttributesBasedOnProductSelection(selectedProducts, repositoryConfiguration);
- status.setItems(convertStringListToArray(repositoryConfiguration.getOptionValues(BugzillaAttribute.BUG_STATUS)));
- resolution.setItems(convertStringListToArray(repositoryConfiguration.getOptionValues(BugzillaAttribute.RESOLUTION)));
- severity.setItems(convertStringListToArray(repositoryConfiguration.getOptionValues(BugzillaAttribute.BUG_SEVERITY)));
- priority.setItems(convertStringListToArray(repositoryConfiguration.getOptionValues(BugzillaAttribute.PRIORITY)));
- hardware.setItems(convertStringListToArray(repositoryConfiguration.getOptionValues(BugzillaAttribute.REP_PLATFORM)));
- os.setItems(convertStringListToArray(repositoryConfiguration.getOptionValues(BugzillaAttribute.OP_SYS)));
+ status.setItems(convertStringListToArray(repositoryConfiguration.getStatusValues()));
+ resolution.setItems(convertStringListToArray(repositoryConfiguration.getResolutions()));
+ severity.setItems(convertStringListToArray(repositoryConfiguration.getSeverities()));
+ priority.setItems(convertStringListToArray(repositoryConfiguration.getPriorities()));
+ hardware.setItems(convertStringListToArray(repositoryConfiguration.getPlatforms()));
+ os.setItems(convertStringListToArray(repositoryConfiguration.getOSs()));
setSelection(product, selectedProducts);
setSelection(status, saved_status);
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 228f20ce4..611426d43 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
@@ -30,7 +30,6 @@ import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientFactory;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
@@ -487,7 +486,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
private void populateOsCombo() {
if (null != repositoryConfiguration && defaultOSCombo != null) {
defaultOSCombo.removeAll();
- List<String> optionValues = repositoryConfiguration.getOptionValues(BugzillaAttribute.OP_SYS);
+ List<String> optionValues = repositoryConfiguration.getOSs();
for (String option : optionValues) {
defaultOSCombo.add(option.toString());
}
@@ -509,7 +508,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
private void populatePlatformCombo() {
if (null != repositoryConfiguration && defaultPlatformCombo != null) {
defaultPlatformCombo.removeAll();
- List<String> optionValues = repositoryConfiguration.getOptionValues(BugzillaAttribute.REP_PLATFORM);
+ List<String> optionValues = repositoryConfiguration.getPlatforms();
for (String option : optionValues) {
defaultPlatformCombo.add(option.toString());
}

Back to the top