Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-12 01:00:26 +0000
committerChris Aniszczyk2011-04-12 13:41:02 +0000
commitc3a4fc19aed460bef2f722e6ddf40eddbbfbacff (patch)
tree26121036a4697c2eba623206a294318f227f5bd9
parent039d7d67019d1a9ca20515a4ac36392fa755901c (diff)
downloadegit-github-c3a4fc19aed460bef2f722e6ddf40eddbbfbacff.tar.gz
egit-github-c3a4fc19aed460bef2f722e6ddf40eddbbfbacff.tar.xz
egit-github-c3a4fc19aed460bef2f722e6ddf40eddbbfbacff.zip
Use custom summary part from issue task editor page
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 7aefa4bf..0d6b0988 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);
- }
- };
- }
+
}

Back to the top