diff options
author | Christian Tam | 2017-01-20 23:25:28 +0000 |
---|---|---|
committer | Jaxsun | 2017-01-21 16:12:49 +0000 |
commit | b73943da5b5d8291c6035c74e4af59df224bd333 (patch) | |
tree | c36d92ba8eaacda491c0206168d4fd1179e3c746 /org.eclipse.mylyn.tasks.index.core | |
parent | 13a70b3ad7cf26eccdeee25ca8586f405d81f842 (diff) | |
download | org.eclipse.mylyn.tasks-b73943da5b5d8291c6035c74e4af59df224bd333.tar.gz org.eclipse.mylyn.tasks-b73943da5b5d8291c6035c74e4af59df224bd333.tar.xz org.eclipse.mylyn.tasks-b73943da5b5d8291c6035c74e4af59df224bd333.zip |
389960: task list indexer now indexes private notes
Change-Id: I13568107e61c553250c5efe093f735cce03a75d4
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389960
Signed-off-by: Christian Tam <christian.tam@gmail.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.index.core')
3 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/Messages.java b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/Messages.java index 048c931d4..18e339c89 100644 --- a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/Messages.java +++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/Messages.java @@ -18,6 +18,8 @@ import org.eclipse.osgi.util.NLS; class Messages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.tasks.index.core.messages"; //$NON-NLS-1$ + public static String TaskListIndex_field_notes; + public static String TaskListIndex_field_attachment; public static String TaskListIndex_field_content; diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java index ac16533ed..38dcd9a7d 100644 --- a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java +++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java @@ -131,6 +131,8 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL private static final String TASK_ATTRIBUTE_ATTACHMENT_NAME = INDEX_TASK_ATTRIBUTE_PREFIX + "attachment"; //$NON-NLS-1$ + private static final String TASK_ATTRIBUTE_NOTES = INDEX_TASK_ATTRIBUTE_PREFIX + "notes"; //$NON-NLS-1$ + public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_IDENTIFIER = new AbstractTaskSchema.Field( TASK_ATTRIBUTE_IDENTIFIER, Messages.TaskListIndex_field_identifier, TaskAttribute.TYPE_SHORT_TEXT, "identifier"); //$NON-NLS-1$ @@ -155,6 +157,9 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL TASK_ATTRIBUTE_ATTACHMENT_NAME, Messages.TaskListIndex_field_attachment, TaskAttribute.TYPE_SHORT_TEXT, "attachment"); //$NON-NLS-1$ + public static final org.eclipse.mylyn.tasks.core.data.AbstractTaskSchema.Field FIELD_NOTES = new AbstractTaskSchema.Field( + TASK_ATTRIBUTE_NOTES, Messages.TaskListIndex_field_notes, TaskAttribute.TYPE_LONG_TEXT, "notes"); //$NON-NLS-1$ + private class MaintainIndexJob extends Job { public MaintainIndexJob() { @@ -203,6 +208,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL specialFields.add(FIELD_PERSON); specialFields.add(FIELD_TASK_KEY); specialFields.add(FIELD_ATTACHMENT_NAME); + specialFields.add(FIELD_NOTES); addIndexedField(FIELD_IDENTIFIER); addIndexedField(FIELD_TASK_KEY); @@ -224,6 +230,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL addIndexedField(DefaultTaskSchema.getInstance().RESOLUTION); addIndexedField(DefaultTaskSchema.getInstance().SEVERITY); addIndexedField(DefaultTaskSchema.getInstance().STATUS); + addIndexedField(FIELD_NOTES); } private static enum MaintainIndexType { @@ -845,6 +852,8 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL addIndexedAttribute(document, FIELD_TASK_KEY, task.getTaskKey()); addIndexedAttribute(document, FIELD_REPOSITORY_URL, task.getRepositoryUrl()); addIndexedAttribute(document, FIELD_SUMMARY, root.getMappedAttribute(TaskAttribute.SUMMARY)); + addIndexedAttribute(document, FIELD_CONTENT, ((AbstractTask) task).getNotes()); + addIndexedAttribute(document, FIELD_NOTES, ((AbstractTask) task).getNotes()); for (TaskAttribute contentAttribute : computeContentAttributes(root)) { addIndexedAttribute(document, FIELD_CONTENT, contentAttribute); @@ -936,6 +945,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL addIndexedAttribute(document, FIELD_SUMMARY, task.getSummary()); addIndexedAttribute(document, FIELD_CONTENT, task.getSummary()); addIndexedAttribute(document, FIELD_CONTENT, ((AbstractTask) task).getNotes()); + addIndexedAttribute(document, FIELD_NOTES, ((AbstractTask) task).getNotes()); addIndexedDateAttributes(document, task); } diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/messages.properties b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/messages.properties index aa751acb0..2214317fb 100644 --- a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/messages.properties +++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/messages.properties @@ -15,3 +15,4 @@ TaskListIndex_task_rebuilding_index=Indexing tasks TaskListIndex_field_identifier=Identifier TaskListIndex_field_person=Person TaskListIndex_field_repository_url=Repository URL +TaskListIndex_field_notes=Notes
\ No newline at end of file |