Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java23
2 files changed, 23 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
index b3bc57ce8..b1dc41be5 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
@@ -117,6 +117,9 @@ public class SaxBugzillaQueryContentHandler extends DefaultHandler {
// case RESOLUTION:
// resolution = parsedText;
// break;
+ case SHORT_DESC:
+ description = parsedText;
+ break;
case SHORT_SHORT_DESC:
description = parsedText;
break;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
index 541513c54..ab97bf4f4 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
@@ -40,6 +40,8 @@ import org.eclipse.ui.themes.IThemeManager;
*/
public class TaskElementLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
+ private static final String NO_SUMMARY_AVAILABLE = ": <no summary available>";
+
private IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
private static final Pattern pattern = Pattern.compile("\\d*: .*");
@@ -108,20 +110,35 @@ public class TaskElementLabelProvider extends LabelProvider implements IColorPro
if (object instanceof AbstractQueryHit) {
AbstractQueryHit hit = (AbstractQueryHit) object;
- if (!pattern.matcher(hit.getSummary()).matches() && hit.getIdLabel() != null && !hit.getIdLabel().equals("")) {
+ if (hit.getSummary() == null) {
+ if (hit.getIdLabel() != null) {
+ return hit.getIdLabel() + NO_SUMMARY_AVAILABLE;
+ } else {
+ return hit.getId() + NO_SUMMARY_AVAILABLE;
+ }
+ } else if (!pattern.matcher(hit.getSummary()).matches() && hit.getIdLabel() != null
+ && !hit.getIdLabel().equals("")) {
return hit.getIdLabel() + ": " + hit.getSummary();
} else {
return hit.getSummary();
}
} else if (object instanceof AbstractRepositoryTask) {
AbstractRepositoryTask task = (AbstractRepositoryTask) object;
- if (!pattern.matcher(task.getSummary()).matches()) {
+ if (task.getSummary() == null) {
+ if (task.getIdLabel() != null) {
+ return task.getIdLabel() + NO_SUMMARY_AVAILABLE;
+ } else {
+ return AbstractRepositoryTask.getTaskId(task.getHandleIdentifier()) + NO_SUMMARY_AVAILABLE;
+ }
+ } else if (!pattern.matcher(task.getSummary()).matches()) {
if (task.getIdLabel() != null) {
return task.getIdLabel() + ": " + task.getSummary();
} else {
return task.getSummary();
}
-// return AbstractRepositoryTask.getTaskId(task.getHandleIdentifier()) + ": " + task.getDescription();
+ // return
+ // AbstractRepositoryTask.getTaskId(task.getHandleIdentifier())
+ // + ": " + task.getDescription();
} else {
return task.getSummary();
}

Back to the top