diff options
-rw-r--r-- | org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java index 42aef5e3..3d88a4d9 100644 --- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java +++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java @@ -15,10 +15,13 @@ import java.util.Set; import org.eclipse.mylyn.github.ui.internal.IssueSummaryPart; import org.eclipse.mylyn.internal.github.core.gist.GistAttribute; +import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionPart; import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage; import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart; import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.forms.widgets.FormToolkit; /** * Gist task editor page class @@ -47,7 +50,8 @@ public class GistTaskEditorPage extends AbstractTaskEditorPage { TaskEditorPartDescriptor partDescriptor = descriptorIt.next(); String id = partDescriptor.getId(); if (id.equals(ID_PART_ATTRIBUTES) || id.equals(ID_PART_SUMMARY) - || id.equals(ID_PART_ATTACHMENTS)) + || id.equals(ID_PART_ATTACHMENTS) + || id.equals(ID_PART_ACTIONS)) descriptorIt.remove(); } if (!getModel().getTaskData().isNew()) { @@ -66,6 +70,20 @@ public class GistTaskEditorPage extends AbstractTaskEditorPage { } }.setPath(PATH_ATTACHMENTS)); } + partDescriptors.add(new TaskEditorPartDescriptor(ID_PART_ACTIONS) { + + public AbstractTaskEditorPart createPart() { + return new TaskEditorActionPart() { + + protected void addAttachContextButton( + Composite buttonComposite, FormToolkit toolkit) { + // Prohibit context button since Gists don't support + // binary attachments + } + + }; + } + }.setPath(PATH_ACTIONS)); return partDescriptors; } |