Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2012-07-17 08:36:45 -0400
committerBenjamin Muskalla2012-07-17 08:36:45 -0400
commit6586fcf0bbd341af3cf5d34b4b3a2f44272456e4 (patch)
treec06d97956e578b7dd2ca46414d8079d0c9d4a940 /org.eclipse.mylyn.tasks.ui
parent38d3983fa7a1e5819bcc3419d4ac30db93d8c407 (diff)
downloadorg.eclipse.mylyn.tasks-6586fcf0bbd341af3cf5d34b4b3a2f44272456e4.tar.gz
org.eclipse.mylyn.tasks-6586fcf0bbd341af3cf5d34b4b3a2f44272456e4.tar.xz
org.eclipse.mylyn.tasks-6586fcf0bbd341af3cf5d34b4b3a2f44272456e4.zip
NEW - bug 380876: pull up default implementation for getReplyText
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380876 Change-Id: I188ef19ce831af8b98f63c16ff6afcc285ae036c
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java18
3 files changed, 23 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java
index dfcb1a7fd..c91b04316 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/Messages.java
@@ -135,6 +135,12 @@ public class Messages extends NLS {
public static String TaskTrimWidget__no_task_active_;
+ public static String AbstractRepositoryConnectorUi_InReplyToComment;
+
+ public static String AbstractRepositoryConnectorUi_InReplyToDescription;
+
+ public static String AbstractRepositoryConnectorUi_InReplyToTaskAndComment;
+
public static String AbstractRepositoryConnectorUi_Task;
public static String TaskElementLabelProvider__no_summary_available_;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties
index 8cf5fe442..787d353a8 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/messages.properties
@@ -82,6 +82,9 @@ TasksUiPlugin_New_Task=New Task...
TaskTrimWidget__no_active_task_=<no active task>
TaskTrimWidget__no_task_active_=<no task active>
+AbstractRepositoryConnectorUi_InReplyToComment=(In reply to comment \#{0})
+AbstractRepositoryConnectorUi_InReplyToDescription=(In reply to comment \#0)
+AbstractRepositoryConnectorUi_InReplyToTaskAndComment=(In reply to {0} comment \#{1})
AbstractRepositoryConnectorUi_Task=Task
TaskElementLabelProvider__no_summary_available_=: <no summary available>
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
index 3ceb233d9..8a310c8a1 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
@@ -13,6 +13,7 @@
package org.eclipse.mylyn.tasks.ui;
+import java.text.MessageFormat;
import java.util.Collections;
import java.util.List;
@@ -214,14 +215,23 @@ public abstract class AbstractRepositoryConnectorUi {
}
/**
- * Override to return a textual reference to a comment, e.g. for Bugzilla this method returns <code>#12</code> for
- * comment 12. This reference is used when generating replies to comments
+ * Override to return a specific textual reference to a comment, e.g. by default this method returns
+ * <code>In reply to comment #12</code> for a reply to comment 12. This text is used when generating replies to
+ * comments.
*
- * @return a reference to <code>comment</code>; null, if no reference is available
+ * @return the reply text with a reference to <code>taskComment</code>; null, if no reference is available
* @since 3.0
*/
public String getReplyText(TaskRepository taskRepository, ITask task, ITaskComment taskComment, boolean includeTask) {
- return null;
+ if (taskComment == null) {
+ return Messages.AbstractRepositoryConnectorUi_InReplyToDescription;
+ } else if (includeTask) {
+ return MessageFormat.format(Messages.AbstractRepositoryConnectorUi_InReplyToTaskAndComment,
+ task.getTaskKey(), taskComment.getNumber());
+ } else {
+ return MessageFormat.format(Messages.AbstractRepositoryConnectorUi_InReplyToComment,
+ taskComment.getNumber());
+ }
}
/**

Back to the top