Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Green2012-03-07 21:49:12 +0000
committerDavid Green2012-03-07 22:07:10 +0000
commit87996045f1f408aed57e9d4f4595fb25fd280a9e (patch)
tree96c944d5b8c3d29e17dc7e06090ec3387c6a1b2c
parent9d84df8f2055a171b8f67aeced8da8dc19de6576 (diff)
downloadorg.eclipse.mylyn.tasks-87996045f1f408aed57e9d4f4595fb25fd280a9e.tar.gz
org.eclipse.mylyn.tasks-87996045f1f408aed57e9d4f4595fb25fd280a9e.tar.xz
org.eclipse.mylyn.tasks-87996045f1f408aed57e9d4f4595fb25fd280a9e.zip
373557: task list find box content assist functions incorrectly for modification date
https://bugs.eclipse.org/bugs/show_bug.cgi?id=373557
-rw-r--r--org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
index 31febf32e..9375dfe28 100644
--- a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
+++ b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
@@ -103,7 +103,7 @@ public class IndexSearchHandler extends AbstractSearchHandler {
if (TaskAttribute.TYPE_DATE.equals(field.getType())
|| TaskAttribute.TYPE_DATETIME.equals(field.getType())) {
- computeDateRangeProposals(proposals, field);
+ computeDateRangeProposals(proposals, prefix, field);
}
}
}
@@ -112,7 +112,7 @@ public class IndexSearchHandler extends AbstractSearchHandler {
return proposals.toArray(new IContentProposal[proposals.size()]);
}
- public void computeDateRangeProposals(List<IContentProposal> proposals, Field field) {
+ public void computeDateRangeProposals(List<IContentProposal> proposals, String prefix, Field field) {
// for date fields give suggestion of date range search
String description;
final Date now = new Date();
@@ -136,7 +136,10 @@ public class IndexSearchHandler extends AbstractSearchHandler {
String queryText = reference.index().computeQueryFieldDateRange(field, dateSearchOneWeekLowerBound,
dateSearchUpperBound);
- proposals.add(new ContentProposal(queryText, label, description));
+
+ if (queryText.startsWith(prefix)) {
+ proposals.add(new ContentProposal(queryText.substring(prefix.length()), label, description));
+ }
}
public void computePersonProposals(List<IContentProposal> proposals, String prefix) {

Back to the top