Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-01-21 23:34:23 +0000
committerspingel2011-01-21 23:34:23 +0000
commit6f5fcccb003c81957fd45407ef2efbbcb9daf9da (patch)
tree33c824928b3c98c481d49c61b737986b7ec507c8 /org.eclipse.mylyn.tasks.ui
parentaab530b8ef016f32097a61f5886b3dcda7ffce40 (diff)
downloadorg.eclipse.mylyn.tasks-6f5fcccb003c81957fd45407ef2efbbcb9daf9da.tar.gz
org.eclipse.mylyn.tasks-6f5fcccb003c81957fd45407ef2efbbcb9daf9da.tar.xz
org.eclipse.mylyn.tasks-6f5fcccb003c81957fd45407ef2efbbcb9daf9da.zip
ASSIGNED - bug 199283: [patch] [api] make attachments actionable from associated comment in task editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=199283
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java41
2 files changed, 1 insertions, 47 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
index b0ec29331..badcedf59 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorOutlineNode.java
@@ -31,7 +31,6 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskRelation;
-import org.eclipse.mylyn.tasks.core.data.TaskRelation.Direction;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.osgi.util.NLS;
@@ -145,12 +144,6 @@ public class TaskEditorOutlineNode {
label = NLS.bind(Messages.TaskEditorOutlineNode_TaskRelation_Label,
new Object[] { taskRelation.getTaskId(), Messages.TaskEditorOutlineNode_unknown_Label });
}
-
- if (taskRelation.getDirection().compareTo(Direction.INWARD) == 0) {
- label = label + Messages.TaskEditorOutlineNode_ParentRelation;
- } else {
- label = label + Messages.TaskEditorOutlineNode_ChildRelation;
- }
TaskEditorOutlineNode childNode = new TaskEditorOutlineNode(label);
childNode.setTaskRelation(taskRelation);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
index 9f20a6997..13de3c18a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage.java
@@ -1732,46 +1732,7 @@ public abstract class AbstractTaskEditorPage extends TaskFormPage implements ISe
@Override
public boolean selectReveal(Object object) {
- if (object instanceof String) {
- String objString = (String) object;
- if (objString != null && objString.startsWith(TaskAttribute.PREFIX_ATTACHMENT)) {
- AbstractTaskEditorPart actionPart = this.getPart(AbstractTaskEditorPage.ID_PART_ATTACHMENTS);
- if (actionPart != null && actionPart.getControl() instanceof ExpandableComposite) {
- CommonFormUtil.setExpanded((ExpandableComposite) actionPart.getControl(), true);
- if (actionPart.getControl() instanceof Section) {
- Control client = actionPart.getControl();
- if (client instanceof Composite) {
- for (Control control : ((Composite) client).getChildren()) {
- if (control instanceof Composite) {
- for (Control control1 : ((Composite) control).getChildren()) {
- if (control1 instanceof org.eclipse.swt.widgets.Table) {
- org.eclipse.swt.widgets.Table attachmentTable = ((org.eclipse.swt.widgets.Table) control1);
- TableItem[] attachments = attachmentTable.getItems();
- int index = 0;
- for (TableItem attachment : attachments) {
- Object data = attachment.getData();
- if (data instanceof ITaskAttachment) {
- ITaskAttachment attachmentData = ((ITaskAttachment) data);
- if (attachmentData.getTaskAttribute().getId().equals(objString)) {
- attachmentTable.deselectAll();
- attachmentTable.select(index);
- IManagedForm mform = actionPart.getManagedForm();
- ScrolledForm form = mform.getForm();
- EditorUtil.focusOn(form, attachmentTable);
- return true;
- }
- }
- index++;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- } else if (object instanceof TaskEditorOutlineNode) {
+ if (object instanceof TaskEditorOutlineNode) {
TaskEditorOutlineNode node = (TaskEditorOutlineNode) object;
TaskAttribute attribute = node.getData();
if (attribute != null) {

Back to the top