|
Lines 54-59
Link Here
|
| 54 |
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer; |
54 |
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer; |
| 55 |
import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener; |
55 |
import org.eclipse.mylyn.internal.tasks.core.ITaskListChangeListener; |
| 56 |
import org.eclipse.mylyn.internal.tasks.core.ITaskListRunnable; |
56 |
import org.eclipse.mylyn.internal.tasks.core.ITaskListRunnable; |
|
|
57 |
import org.eclipse.mylyn.internal.tasks.core.TaskAttachment; |
| 57 |
import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta; |
58 |
import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta; |
| 58 |
import org.eclipse.mylyn.internal.tasks.core.data.ITaskDataManagerListener; |
59 |
import org.eclipse.mylyn.internal.tasks.core.data.ITaskDataManagerListener; |
| 59 |
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManagerEvent; |
60 |
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManagerEvent; |
|
Lines 88-96
Link Here
|
| 88 |
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; |
89 |
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; |
| 89 |
import org.eclipse.mylyn.tasks.core.IRepositoryElement; |
90 |
import org.eclipse.mylyn.tasks.core.IRepositoryElement; |
| 90 |
import org.eclipse.mylyn.tasks.core.ITask; |
91 |
import org.eclipse.mylyn.tasks.core.ITask; |
|
|
92 |
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState; |
| 91 |
import org.eclipse.mylyn.tasks.core.RepositoryStatus; |
93 |
import org.eclipse.mylyn.tasks.core.RepositoryStatus; |
| 92 |
import org.eclipse.mylyn.tasks.core.TaskRepository; |
94 |
import org.eclipse.mylyn.tasks.core.TaskRepository; |
| 93 |
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState; |
|
|
| 94 |
import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy; |
95 |
import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy; |
| 95 |
import org.eclipse.mylyn.tasks.core.data.TaskAttribute; |
96 |
import org.eclipse.mylyn.tasks.core.data.TaskAttribute; |
| 96 |
import org.eclipse.mylyn.tasks.core.data.TaskData; |
97 |
import org.eclipse.mylyn.tasks.core.data.TaskData; |
|
Lines 123-128
Link Here
|
| 123 |
import org.eclipse.swt.widgets.Listener; |
124 |
import org.eclipse.swt.widgets.Listener; |
| 124 |
import org.eclipse.swt.widgets.Menu; |
125 |
import org.eclipse.swt.widgets.Menu; |
| 125 |
import org.eclipse.swt.widgets.ScrollBar; |
126 |
import org.eclipse.swt.widgets.ScrollBar; |
|
|
127 |
import org.eclipse.swt.widgets.TableItem; |
| 126 |
import org.eclipse.ui.IEditorInput; |
128 |
import org.eclipse.ui.IEditorInput; |
| 127 |
import org.eclipse.ui.IEditorSite; |
129 |
import org.eclipse.ui.IEditorSite; |
| 128 |
import org.eclipse.ui.PlatformUI; |
130 |
import org.eclipse.ui.PlatformUI; |
|
Lines 1053-1060
Link Here
|
| 1053 |
} |
1055 |
} |
| 1054 |
} |
1056 |
} |
| 1055 |
} |
1057 |
} |
|
|
1058 |
EditorUtil.reveal(form, attribute.getId()); |
| 1059 |
} else if (TaskAttribute.TYPE_ATTACHMENT.equals(attribute.getMetaData().getType())) { |
| 1060 |
AbstractTaskEditorPart actionPart = getPart(ID_PART_ATTACHMENTS); |
| 1061 |
if (actionPart != null && actionPart.getControl() instanceof ExpandableComposite) { |
| 1062 |
CommonFormUtil.setExpanded((ExpandableComposite) actionPart.getControl(), true); |
| 1063 |
if (actionPart.getControl() instanceof Section) { |
| 1064 |
Control client = actionPart.getControl(); |
| 1065 |
if (client instanceof Composite) { |
| 1066 |
for (Control control : ((Composite) client).getChildren()) { |
| 1067 |
if (control instanceof Composite) { |
| 1068 |
for (Control control1 : ((Composite) control).getChildren()) { |
| 1069 |
if (control1 instanceof org.eclipse.swt.widgets.Table) { |
| 1070 |
org.eclipse.swt.widgets.Table attachmentTable = ((org.eclipse.swt.widgets.Table) control1); |
| 1071 |
TableItem[] attachments = attachmentTable.getItems(); |
| 1072 |
int index = 0; |
| 1073 |
for (TableItem attachment : attachments) { |
| 1074 |
TaskAttachment attachmentData = ((TaskAttachment) attachment.getData()); |
| 1075 |
if (attachmentData.getTaskAttribute() == attribute) { |
| 1076 |
attachmentTable.deselectAll(); |
| 1077 |
attachmentTable.select(index); |
| 1078 |
IManagedForm mform = actionPart.getManagedForm(); |
| 1079 |
ScrolledForm form = mform.getForm(); |
| 1080 |
EditorUtil.focusOn(form, attachmentTable, 30); |
| 1081 |
break; |
| 1082 |
} |
| 1083 |
index++; |
| 1084 |
} |
| 1085 |
} |
| 1086 |
} |
| 1087 |
} |
| 1088 |
} |
| 1089 |
} |
| 1090 |
} |
| 1091 |
} |
| 1056 |
} |
1092 |
} |
| 1057 |
EditorUtil.reveal(form, attribute.getId()); |
|
|
| 1058 |
} else { |
1093 |
} else { |
| 1059 |
EditorUtil.reveal(form, node.getLabel()); |
1094 |
EditorUtil.reveal(form, node.getLabel()); |
| 1060 |
} |
1095 |
} |