Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2016-12-18 15:14:23 +0000
committerGerrit Code Review @ Eclipse.org2017-01-30 19:00:33 +0000
commiteb110be4af73ee8c70e0b101e61e8e5408dd0bb0 (patch)
tree819ad9918585180da2ef696c05c0e49e3c8c88c2 /connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui
parentd2a46aff5af616b1d97e24f1702e856234ca76e7 (diff)
downloadorg.eclipse.mylyn.tasks-eb110be4af73ee8c70e0b101e61e8e5408dd0bb0.tar.gz
org.eclipse.mylyn.tasks-eb110be4af73ee8c70e0b101e61e8e5408dd0bb0.tar.xz
org.eclipse.mylyn.tasks-eb110be4af73ee8c70e0b101e61e8e5408dd0bb0.zip
234445: [upstream] show descriptions for keywords for the REST Connector
Change-Id: Id2db8d3af57b89c34840e86f11316e454b0dcbb4 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=234445
Diffstat (limited to 'connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui')
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaKeywordAttributeEditor.java29
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/Messages.java2
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/messages.properties1
3 files changed, 31 insertions, 1 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaKeywordAttributeEditor.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaKeywordAttributeEditor.java
index fb0d37dfa..7938dc0b2 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaKeywordAttributeEditor.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaKeywordAttributeEditor.java
@@ -13,11 +13,16 @@ package org.eclipse.mylyn.internal.bugzilla.rest.ui;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
+import org.eclipse.mylyn.commons.workbench.InPlaceCheckBoxTreeDialog;
+import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.internal.tasks.ui.editors.CheckboxMultiSelectAttributeEditor;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
+import org.eclipse.osgi.util.NLS;
/**
* @author Rob Elves
@@ -26,7 +31,6 @@ public class BugzillaKeywordAttributeEditor extends CheckboxMultiSelectAttribute
public BugzillaKeywordAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
super(manager, taskAttribute);
-
}
@Override
@@ -44,4 +48,27 @@ public class BugzillaKeywordAttributeEditor extends CheckboxMultiSelectAttribute
attributeChanged();
}
+ @Override
+ protected List<String> getValueList() {
+ return getValues();
+ }
+
+ @Override
+ public List<String> getValuesLabels() {
+ List<String> tmp = getTaskAttribute().getValues();
+ List<String> newStrs = new ArrayList<>(tmp);
+ return newStrs;
+ }
+
+ @Override
+ protected InPlaceCheckBoxTreeDialog createInPlaceCheckBoxTreeDialog(List<String> values) {
+ Map<String, String> validDescriptions = getTaskAttribute().getOptions();
+ LinkedHashMap<String, String> validValues = new LinkedHashMap<String, String>(validDescriptions.size());
+ for (String value : validDescriptions.keySet()) {
+ validValues.put(value, value);
+ }
+ return new InPlaceCheckBoxTreeDialog(WorkbenchUtil.getShell(), getButton(), values, validValues,
+ NLS.bind(Messages.BugzillaKeywordAttributeEditor_Select_X, getLabel()), validDescriptions);
+ }
+
} \ No newline at end of file
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/Messages.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/Messages.java
index 893caaf60..7c390a7de 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/Messages.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/Messages.java
@@ -16,6 +16,8 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.rest.ui.messages"; //$NON-NLS-1$
+ public static String BugzillaKeywordAttributeEditor_Select_X;
+
public static String BugzillaRestRepositorySettingsPage_api_key;
public static String BugzillaRestRepositorySettingsPage_Please_create_or_copy_the_API_Key_from;
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/messages.properties b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/messages.properties
index 96ec9ad82..fc03f92b4 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/messages.properties
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/messages.properties
@@ -1,3 +1,4 @@
+BugzillaKeywordAttributeEditor_Select_X=Select {0}
BugzillaRestRepositorySettingsPage_api_key=API Key
BugzillaRestRepositorySettingsPage_Please_create_or_copy_the_API_Key_from=Please create or copy the API Key from\n {0}
BugzillaRestRepositorySettingsPage_RestRepositorySetting=Bugzilla REST Repository Settings

Back to the top