Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-08-10 23:50:03 +0000
committerspingel2009-08-10 23:50:03 +0000
commit3ad05ebe21105cc7f5ed3c27688671297042c9b9 (patch)
treecb6cb0d65d11f59b2657360bdb1cac6b86afb978
parentf6ea9f8dad126468df916038452cc354e5a1e517 (diff)
downloadorg.eclipse.mylyn.tasks-3ad05ebe21105cc7f5ed3c27688671297042c9b9.tar.gz
org.eclipse.mylyn.tasks-3ad05ebe21105cc7f5ed3c27688671297042c9b9.tar.xz
org.eclipse.mylyn.tasks-3ad05ebe21105cc7f5ed3c27688671297042c9b9.zip
NEW - bug 284559: [patch][editor] creation of summary part fails when priority level is null
https://bugs.eclipse.org/bugs/show_bug.cgi?id=284559
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PriorityEditor.java30
1 files changed, 16 insertions, 14 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PriorityEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PriorityEditor.java
index 0911c07b3..b07ee5117 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PriorityEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PriorityEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies and others.
+ * Copyright (c) 2009 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Tasktop Technologies - initial API and implementation
+ * Maarten Meijer - fix for bug 284559
*******************************************************************************/
package org.eclipse.mylyn.internal.tasks.ui.editors;
@@ -127,20 +128,21 @@ public class PriorityEditor {
}
private ImageDescriptor getLargeImageDescriptor(PriorityLevel priorityLevel) {
- switch (priorityLevel) {
- case P1:
- return CommonImages.PRIORITY_1_LARGE;
- case P2:
- return CommonImages.PRIORITY_2_LARGE;
- case P3:
- return CommonImages.PRIORITY_3_LARGE;
- case P4:
- return CommonImages.PRIORITY_4_LARGE;
- case P5:
- return CommonImages.PRIORITY_5_LARGE;
- default:
- return CommonImages.PRIORITY_3_LARGE;
+ if (priorityLevel != null) {
+ switch (priorityLevel) {
+ case P1:
+ return CommonImages.PRIORITY_1_LARGE;
+ case P2:
+ return CommonImages.PRIORITY_2_LARGE;
+ case P3:
+ return CommonImages.PRIORITY_3_LARGE;
+ case P4:
+ return CommonImages.PRIORITY_4_LARGE;
+ case P5:
+ return CommonImages.PRIORITY_5_LARGE;
+ }
}
+ return CommonImages.PRIORITY_3_LARGE;
}
private Image getSmallImage(String value) {

Back to the top