Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-11-07 22:37:13 -0500
committermkersten2005-11-07 22:37:13 -0500
commit999a179305547d1dca079031ef25fa01901d8c1d (patch)
tree9d3cf4fc88df399de3ead266d944333782918a7b /org.eclipse.mylyn.tasks.ui
parent76897ad39a1f58295723ec22036def3b41549c24 (diff)
downloadorg.eclipse.mylyn.tasks-999a179305547d1dca079031ef25fa01901d8c1d.tar.gz
org.eclipse.mylyn.tasks-999a179305547d1dca079031ef25fa01901d8c1d.tar.xz
org.eclipse.mylyn.tasks-999a179305547d1dca079031ef25fa01901d8c1d.zip
Fixed Bugzilla Bug 114408: make bug report titles consistent
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/plugin.xml2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java13
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/MylarTaskEditor.java (renamed from org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java)10
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java4
5 files changed, 20 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/plugin.xml b/org.eclipse.mylyn.tasks.ui/plugin.xml
index 05b4d8a02..091930655 100644
--- a/org.eclipse.mylyn.tasks.ui/plugin.xml
+++ b/org.eclipse.mylyn.tasks.ui/plugin.xml
@@ -81,7 +81,7 @@
point="org.eclipse.ui.editors">
<editor
icon="icons/eview16/task.gif"
- class="org.eclipse.mylar.tasklist.ui.TaskEditor"
+ class="org.eclipse.mylar.tasklist.ui.MylarTaskEditor"
name="Task Viewer"
id="org.eclipse.mylar.tasklist.ui.taskEditor"/>
<editor
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java
index ebd73c659..9dd5d1e9f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java
@@ -35,7 +35,7 @@ public interface ITaskListElement {
public abstract String getPriority();
- public abstract String getDescription(boolean label);
+ public abstract String getDescription(boolean truncate);
public abstract void setDescription(String description);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java
index 0e6781fb9..8dc99b45b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/Task.java
@@ -38,6 +38,7 @@ import org.eclipse.ui.internal.Workbench;
public class Task implements ITask {
public static final long INACTIVITY_TIME_MILLIS = MylarPlugin.getContextManager().getActivityTimeoutSeconds() * 1000;
+ public static final int MAX_LABEL_LENGTH = 50;
public Color ACTIVE = new Color(Display.getDefault(), 30, 30, 60);
private static final long serialVersionUID = 3545518391537382197L;
@@ -362,8 +363,16 @@ public class Task implements ITask {
}
}
- public String getDescription(boolean label) {
- return this.label;
+ public String getDescription(boolean truncate) {
+ if (!truncate) {
+ return label;
+ } else {
+ if (label == null || label.length() <= MAX_LABEL_LENGTH) {
+ return label;
+ } else {
+ return label.substring(0, MAX_LABEL_LENGTH) + "...";
+ }
+ }
}
/**
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/MylarTaskEditor.java
index 2a0ad3aaf..4ed0a0677 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/MylarTaskEditor.java
@@ -40,7 +40,7 @@ import org.eclipse.ui.part.MultiPageSelectionProvider;
* @author Mik Kersten
* @author Eric Booth (initial prototype)
*/
-public class TaskEditor extends MultiPageEditorPart {
+public class MylarTaskEditor extends MultiPageEditorPart {
private static final String TASK_INFO_PAGE_LABEL = "Task Info";
private static final String ISSUE_WEB_PAGE_LABEL = "Browser";
@@ -53,12 +53,12 @@ public class TaskEditor extends MultiPageEditorPart {
private static class TaskEditorSelectionProvider extends MultiPageSelectionProvider {
private ISelection globalSelection;
- public TaskEditorSelectionProvider(TaskEditor taskEditor) {
+ public TaskEditorSelectionProvider(MylarTaskEditor taskEditor) {
super(taskEditor);
}
public ISelection getSelection() {
- IEditorPart activeEditor = ((TaskEditor) getMultiPageEditor()).getActiveEditor();
+ IEditorPart activeEditor = ((MylarTaskEditor) getMultiPageEditor()).getActiveEditor();
if (activeEditor != null && activeEditor.getSite() != null) {
ISelectionProvider selectionProvider = activeEditor.getSite().getSelectionProvider();
if (selectionProvider != null)
@@ -68,7 +68,7 @@ public class TaskEditor extends MultiPageEditorPart {
}
public void setSelection(ISelection selection) {
- IEditorPart activeEditor = ((TaskEditor) getMultiPageEditor()).getActiveEditor();
+ IEditorPart activeEditor = ((MylarTaskEditor) getMultiPageEditor()).getActiveEditor();
if (activeEditor != null && activeEditor.getSite() != null) {
ISelectionProvider selectionProvider = activeEditor.getSite().getSelectionProvider();
if (selectionProvider != null) selectionProvider.setSelection(selection);
@@ -79,7 +79,7 @@ public class TaskEditor extends MultiPageEditorPart {
}
}
- public TaskEditor() {
+ public MylarTaskEditor() {
super();
IWorkbench workbench = MylarTasklistPlugin.getDefault().getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java
index 7c4df46f9..e597b1f48 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java
@@ -97,7 +97,7 @@ public class TaskSummaryEditor extends EditorPart {
private Spinner estimated;
private boolean isDirty = false;
- private TaskEditor parentEditor = null;
+ private MylarTaskEditor parentEditor = null;
private ITaskActivityListener TASK_LIST_LISTENER = new ITaskActivityListener() {
public void taskActivated(ITask activeTask) {
@@ -554,7 +554,7 @@ public class TaskSummaryEditor extends EditorPart {
return;
}
- public void setParentEditor(TaskEditor parentEditor) {
+ public void setParentEditor(MylarTaskEditor parentEditor) {
this.parentEditor = parentEditor;
}
}

Back to the top