summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-11 21:00:26 (EDT)
committer Chris Aniszczyk2011-04-12 09:41:02 (EDT)
commitc3a4fc19aed460bef2f722e6ddf40eddbbfbacff (patch)
tree26121036a4697c2eba623206a294318f227f5bd9
parent039d7d67019d1a9ca20515a4ac36392fa755901c (diff)
downloadegit-github-c3a4fc19aed460bef2f722e6ddf40eddbbfbacff.zip
egit-github-c3a4fc19aed460bef2f722e6ddf40eddbbfbacff.tar.gz
egit-github-c3a4fc19aed460bef2f722e6ddf40eddbbfbacff.tar.bz2
Use custom summary part from issue task editor pagerefs/changes/67/3067/3
Change-Id: I76e460864b6132fb18c3e4d0567b46c67e7f5a33 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java35
1 files changed, 14 insertions, 21 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java
index 7aefa4b..0d6b098 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java
@@ -16,11 +16,8 @@ import java.util.Iterator;
import java.util.Set;
import org.eclipse.mylyn.github.internal.GitHub;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
-import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;
@@ -40,17 +37,25 @@ public class GitHubTaskEditorPage extends AbstractTaskEditorPage {
setNeedsPrivateSection(true);
setNeedsSubmitButton(true);
}
-
+
@Override
protected Set<TaskEditorPartDescriptor> createPartDescriptors() {
- Set<TaskEditorPartDescriptor> partDescriptors = super.createPartDescriptors();
- Iterator<TaskEditorPartDescriptor> descriptorIt = partDescriptors.iterator();
+ Set<TaskEditorPartDescriptor> partDescriptors = super
+ .createPartDescriptors();
+ Iterator<TaskEditorPartDescriptor> descriptorIt = partDescriptors
+ .iterator();
while (descriptorIt.hasNext()) {
TaskEditorPartDescriptor partDescriptor = descriptorIt.next();
- if (partDescriptor.getId().equals(ID_PART_ATTRIBUTES)) {
+ String id = partDescriptor.getId();
+ if (id.equals(ID_PART_ATTRIBUTES) || id.equals(ID_PART_SUMMARY))
descriptorIt.remove();
- }
}
+ partDescriptors.add(new TaskEditorPartDescriptor(ID_PART_SUMMARY) {
+
+ public AbstractTaskEditorPart createPart() {
+ return new IssueSummaryPart();
+ }
+ }.setPath(PATH_HEADER));
partDescriptors.add(new TaskEditorPartDescriptor("labels") {
public AbstractTaskEditorPart createPart() {
@@ -59,17 +64,5 @@ public class GitHubTaskEditorPage extends AbstractTaskEditorPage {
}.setPath(PATH_ATTRIBUTES));
return partDescriptors;
}
-
-
- @Override
- protected AttributeEditorFactory createAttributeEditorFactory() {
- return new AttributeEditorFactory(getModel(), getTaskRepository(), getEditorSite()) {
- @Override
- public AbstractAttributeEditor createEditor(String type,
- TaskAttribute taskAttribute) {
- // TODO Auto-generated method stub
- return super.createEditor(type, taskAttribute);
- }
- };
- }
+
}