Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-10-19 01:10:53 -0400
committermkersten2006-10-19 01:10:53 -0400
commitcc2f90f5866ae16b19f462d5a14ef01204e1de93 (patch)
tree9e36ea071177eae29b4fe9a834fe9e3eab1fcd2f
parentdae0cfd297541c0dbd352ba514f8b46c896f1256 (diff)
downloadorg.eclipse.mylyn.tasks-cc2f90f5866ae16b19f462d5a14ef01204e1de93.tar.gz
org.eclipse.mylyn.tasks-cc2f90f5866ae16b19f462d5a14ef01204e1de93.tar.xz
org.eclipse.mylyn.tasks-cc2f90f5866ae16b19f462d5a14ef01204e1de93.zip
NEW - bug 143323: show weekly progress in Apply Mylar mode
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractMylarFilteredTree.java42
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java15
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskProgressBar.java11
4 files changed, 31 insertions, 45 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractMylarFilteredTree.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractMylarFilteredTree.java
index 29bf701ba..4a2dedb1c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractMylarFilteredTree.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractMylarFilteredTree.java
@@ -35,9 +35,9 @@ public abstract class AbstractMylarFilteredTree extends FilteredTree {
public static final String LABEL_FIND = "Find:";
private Job refreshJob;
-
+
private AdaptiveRefreshPolicy refreshPolicy;
-
+
/**
* HACK: using reflection to gain access
*/
@@ -58,7 +58,7 @@ public abstract class AbstractMylarFilteredTree extends FilteredTree {
@Override
protected void createControl(Composite parent, int treeStyle) {
super.createControl(parent, treeStyle);
-
+
// Override superclass layout settings...
GridLayout layout = (GridLayout) getLayout();
layout.verticalSpacing = 0;
@@ -67,25 +67,19 @@ public abstract class AbstractMylarFilteredTree extends FilteredTree {
@Override
protected Composite createFilterControls(Composite parent) {
-
- GridLayout statusLayout = new GridLayout(1, false);
- statusLayout.marginWidth = 1;
- statusLayout.marginHeight = 1;
- parent.setLayout(statusLayout);
-
- Composite statusComposite = new Composite(parent, SWT.NULL);
GridLayout gridLayout = new GridLayout(4, false);
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- statusComposite.setLayout(gridLayout);
+ gridLayout.marginWidth = 2;
+ gridLayout.marginHeight = 2;
+ gridLayout.verticalSpacing = 0;
+ parent.setLayout(gridLayout);
- Label label = new Label(statusComposite, SWT.NONE);
+ Label label = new Label(parent, SWT.NONE);
label.setText(LABEL_FIND);
- super.createFilterControls(statusComposite);
+ super.createFilterControls(parent);
- GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- gd.minimumWidth = filterWidth;
+ GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
+ gd.minimumWidth = filterWidth;
filterText.setLayoutData(gd);
filterText.addKeyListener(new KeyAdapter() {
@@ -97,13 +91,21 @@ public abstract class AbstractMylarFilteredTree extends FilteredTree {
}
});
- createStatusComposite(statusComposite);
- createProgressComposite(parent);
+ createStatusComposite(parent);
+ Composite progressComposite = new Composite(parent, SWT.NONE);
+ GridLayout progressLayout = new GridLayout(1, false);
+ progressLayout.marginWidth = 0;
+ progressLayout.marginHeight = 0;
+ progressLayout.horizontalSpacing = 0;
+ progressLayout.verticalSpacing = 0;
+ progressComposite.setLayout(progressLayout);
+ progressComposite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 4, 1));
+ createProgressComposite(progressComposite);
return parent;
}
protected abstract Composite createProgressComposite(Composite container);
-
+
protected abstract Composite createStatusComposite(Composite container);
protected void textChanged() {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
index 4810c5156..04d725099 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListFilteredTree.java
@@ -14,7 +14,6 @@ package org.eclipse.mylar.internal.tasks.ui.views;
import java.util.List;
import java.util.Set;
-import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
import org.eclipse.mylar.tasks.core.AbstractTaskContainer;
import org.eclipse.mylar.tasks.core.DateRangeContainer;
import org.eclipse.mylar.tasks.core.ITask;
@@ -25,7 +24,6 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.forms.widgets.Hyperlink;
@@ -47,19 +45,8 @@ public class TaskListFilteredTree extends AbstractMylarFilteredTree {
@Override
protected Composite createProgressComposite(Composite container) {
-// container.setBackground(new Color(Display.getDefault(), 255, 0, 0));
-// Composite composite = new Composite(container, SWT.NULL);
-
taskProgressBar = new TaskProgressBar(container);
- taskProgressBar.setBackground(TaskListColorsAndFonts.COLOR_TASK_COMPLETED);
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- container.setLayout(gridLayout);
-
- taskProgressBar.setLayoutData(
- new GridData(GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
+ taskProgressBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
TasksUiPlugin.getTaskListManager().getTaskList().addChangeListener(new ITaskListChangeListener() {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index f91897473..5fb1f5417 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -1511,8 +1511,7 @@ public class TaskListView extends ViewPart {
// if no task exists, select the query hit if exists
AbstractQueryHit hit = null;
if (getViewer().getSelection().isEmpty()
- && (hit = TasksUiPlugin.getTaskListManager().getTaskList().getQueryHitForHandle(
- task.getHandleIdentifier())) != null) {
+ && (hit = TasksUiPlugin.getTaskListManager().getTaskList().getQueryHit(task.getHandleIdentifier())) != null) {
AbstractRepositoryQuery query = TasksUiPlugin.getTaskListManager().getTaskList().getQueryForHandle(
task.getHandleIdentifier());
getViewer().expandToLevel(query, 1);
@@ -1537,9 +1536,8 @@ public class TaskListView extends ViewPart {
refresh(task.getContainer());
}
- Set<AbstractQueryHit> hits = TasksUiPlugin.getTaskListManager().getTaskList().getQueryHitsForHandle(
- task.getHandleIdentifier());
- for (AbstractQueryHit hit : hits) {
+ AbstractQueryHit hit = TasksUiPlugin.getTaskListManager().getTaskList().getQueryHit(task.getHandleIdentifier());
+ if (hit != null) {
refresh(hit);
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskProgressBar.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskProgressBar.java
index d590e6658..8453505da 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskProgressBar.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskProgressBar.java
@@ -30,9 +30,7 @@ import org.eclipse.swt.widgets.Display;
*/
public class TaskProgressBar extends Canvas {
-// private static final int DEFAULT_WIDTH = 200;
-
-// private static final int DEFAULT_HEIGHT = 5;
+ private static final int DEFAULT_HEIGHT = 6;
private int fCurrentTickCount = 0;
@@ -76,7 +74,9 @@ public class TaskProgressBar extends Canvas {
});
Display display = parent.getDisplay();
fFailureColor = new Color(display, 159, 63, 63);
- fOKColor = new Color(display, 95, 191, 95);
+ fOKColor = new Color(display, 95, 191, 124); //95);
+// themeManager.getCurrentTheme().getColorRegistry().get(
+// TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED);
fStoppedColor = new Color(display, 120, 120, 120);
}
@@ -164,8 +164,7 @@ public class TaskProgressBar extends Canvas {
public Point computeSize(int wHint, int hHint, boolean changed) {
checkWidget();
-// System.err.println(">>>>> " + parent.getSize().y);
- Point size = new Point(parent.getSize().x, 5);//parent.getSize().y);
+ Point size = new Point(parent.getSize().x, DEFAULT_HEIGHT);//parent.getSize().y);
if (wHint != SWT.DEFAULT)
size.x = wHint;
if (hHint != SWT.DEFAULT)

Back to the top