Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Dos Santos2014-01-15 01:56:27 +0000
committerGerrit Code Review @ Eclipse.org2014-02-12 01:27:20 +0000
commitff4c0c3bb2acad4dd614680a7228aa4c3f3ab025 (patch)
tree638e3592d8e16fecc09365283f8fe9a082007e32 /org.eclipse.mylyn.tasks.ui
parentb8fcbca33a9b308885ffb1f8ff7f2b137907758e (diff)
downloadorg.eclipse.mylyn.tasks-ff4c0c3bb2acad4dd614680a7228aa4c3f3ab025.tar.gz
org.eclipse.mylyn.tasks-ff4c0c3bb2acad4dd614680a7228aa4c3f3ab025.tar.xz
org.eclipse.mylyn.tasks-ff4c0c3bb2acad4dd614680a7228aa4c3f3ab025.zip
378032: fix for boolean attribute editors that show required decorator
Change-Id: Ie343ba26b972fe1327d2fce0e57ab07e78184de9 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=378032 Signed-off-by: Leo Dos Santos <leo.dos.santos@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java5
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
index 51a15ae97..4e2df2ffc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/BooleanAttributeEditor.java
@@ -67,6 +67,11 @@ public class BooleanAttributeEditor extends AbstractAttributeEditor {
return getAttributeMapper().getBooleanValue(getTaskAttribute());
}
+ @Override
+ protected boolean needsValue() {
+ return false;
+ }
+
public void setValue(boolean value) {
getAttributeMapper().setBooleanValue(getTaskAttribute(), value);
attributeChanged();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
index b9fe5a8fc..1fa334791 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
@@ -292,7 +292,7 @@ public abstract class AbstractAttributeEditor {
*/
protected boolean needsValue() {
boolean isRequired = getTaskAttribute().getMetaData().isRequired();
- boolean hasValue = !StringUtils.isEmpty(getTaskAttribute().getValue());
+ boolean hasValue = !StringUtils.isEmpty(getAttributeMapper().getValue(getTaskAttribute()));
return isRequired && !hasValue;
}

Back to the top