Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-06-30 17:30:49 -0400
committermkersten2005-06-30 17:30:49 -0400
commit922455647b22857b2e64aa7455bb44e9f8c6fafa (patch)
tree7cd0f19e03daf941b3f055e004780effbdd8b9db /org.eclipse.mylyn.tasks.ui
parent15b4ed8a65d1e74d1652362dc88c14fc3c4a8290 (diff)
downloadorg.eclipse.mylyn.tasks-922455647b22857b2e64aa7455bb44e9f8c6fafa.tar.gz
org.eclipse.mylyn.tasks-922455647b22857b2e64aa7455bb44e9f8c6fafa.tar.xz
org.eclipse.mylyn.tasks-922455647b22857b2e64aa7455bb44e9f8c6fafa.zip
Ken's patch for 101911
Support bugzilla queries
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/AbstractCategory.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListLabelProvider.java12
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java15
3 files changed, 21 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/AbstractCategory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/AbstractCategory.java
index 599106aba..f8b994464 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/AbstractCategory.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/AbstractCategory.java
@@ -19,7 +19,7 @@ import org.eclipse.swt.graphics.Image;
public class AbstractCategory implements ITaskListElement {
private String priority = "";
- private String description = "";
+ protected String description = "";
private String handle = "";
public AbstractCategory(String description) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListLabelProvider.java
index bb98704b9..756788d93 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListLabelProvider.java
@@ -93,14 +93,20 @@ public class TaskListLabelProvider extends LabelProvider implements ITableLabelP
return null;
}
- public Image getColumnImage(Object element, int columnIndex) {
-
+ public Image getColumnImage(Object element, int columnIndex) {
if (! (element instanceof ITaskListElement)) {
return null;
}
if (columnIndex == 0) {
- return ((ITaskListElement)element).getStatusIcon();
+ if (element instanceof AbstractCategory) {
+ return ((ITaskListElement)element).getIcon();
+ } else {
+ return ((ITaskListElement)element).getStatusIcon();
+ }
} else if (columnIndex == 1) {
+ if (element instanceof AbstractCategory) {
+ return null;
+ }
return ((ITaskListElement)element).getIcon();
} else {
return null;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
index d323951cc..e375462e0 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
@@ -291,10 +291,17 @@ public class TaskListView extends ViewPart {
public boolean select(Viewer viewer, Object parentElement, Object element) {
if (element instanceof ITask) {
return !((ITask)element).isCompleted();
- } else {
+ } else if (element instanceof BugzillaHit){
+ BugzillaHit hit = (BugzillaHit)element;
+ BugzillaTask task = hit.getAssociatedTask();
+ if (task != null) {
+ return !task.isCompleted();
+ }
+ return true;
+ } else {
return true;
}
- }
+ }
};
private ViewerFilter inCompleteFilter = new ViewerFilter(){
@@ -329,8 +336,8 @@ public class TaskListView extends ViewPart {
}
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof ITask) {
- ITask task = (ITask) element;
+ if (element instanceof ITaskListElement && !(element instanceof AbstractCategory)) {
+ ITaskListElement task = (ITaskListElement) element;
if (priorities.size() == PRIORITY_LEVELS.length) {
return true;
} else {

Back to the top