Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2014-01-20 19:51:43 +0000
committerFrank Becker2014-02-12 20:57:56 +0000
commitcfd9a96e47f484d3ecb96e3dbfe306b63bab50e4 (patch)
tree95d041ffcddca9948403137624bdcc743cea27b0
parent73aca745728a52143df46137519f68e63889926c (diff)
downloadorg.eclipse.mylyn.tasks-cfd9a96e47f484d3ecb96e3dbfe306b63bab50e4.tar.gz
org.eclipse.mylyn.tasks-cfd9a96e47f484d3ecb96e3dbfe306b63bab50e4.tar.xz
org.eclipse.mylyn.tasks-cfd9a96e47f484d3ecb96e3dbfe306b63bab50e4.zip
414360: add BugzillaRestTaskEditorPage
Change-Id: I21263f961271e5ca651d651c289543593ccd378a Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=414360
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/plugin.xml7
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositoryConnectorUi.java4
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPage.java29
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPageFactory.java65
4 files changed, 103 insertions, 2 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/plugin.xml b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/plugin.xml
index 242cceaa4..b3f33cf66 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/plugin.xml
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/plugin.xml
@@ -11,4 +11,11 @@
overlayIcon="icons/eview16/overlay-bugzilla.gif">
</connectorUi>
</extension>
+ <extension
+ point="org.eclipse.mylyn.tasks.ui.editors">
+ <pageFactory
+ class="org.eclipse.mylyn.internal.bugzilla.rest.ui.BugzillaRestTaskEditorPageFactory"
+ id="org.eclipse.mylyn.bugzilla.rest.ui.pageFactory">
+ </pageFactory>
+ </extension>
</plugin>
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositoryConnectorUi.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositoryConnectorUi.java
index 752c3e208..6339cb55c 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositoryConnectorUi.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositoryConnectorUi.java
@@ -18,6 +18,7 @@ import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
+import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
public class BugzillaRestRepositoryConnectorUi extends AbstractRepositoryConnectorUi {
@@ -43,8 +44,7 @@ public class BugzillaRestRepositoryConnectorUi extends AbstractRepositoryConnect
@Override
public IWizard getNewTaskWizard(TaskRepository repository, ITaskMapping selection) {
- // ignore
- return null;
+ return new NewTaskWizard(repository, selection);
}
@Override
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPage.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPage.java
new file mode 100644
index 000000000..3d2a9d670
--- /dev/null
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPage.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Frank Becker and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Frank Becker - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.bugzilla.rest.ui;
+
+import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestCore;
+import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
+import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
+
+public class BugzillaRestTaskEditorPage extends AbstractTaskEditorPage {
+ public BugzillaRestTaskEditorPage(TaskEditor editor) {
+ this(editor, BugzillaRestCore.CONNECTOR_KIND);
+ }
+
+ public BugzillaRestTaskEditorPage(TaskEditor editor, String connectorKind) {
+ super(editor, connectorKind);
+ setNeedsPrivateSection(false);
+ setNeedsSubmitButton(false);
+ }
+
+}
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPageFactory.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPageFactory.java
new file mode 100644
index 000000000..bc9ed06bf
--- /dev/null
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestTaskEditorPageFactory.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Frank Becker and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Frank Becker - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.bugzilla.rest.ui;
+
+import org.eclipse.mylyn.commons.ui.CommonImages;
+import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestCore;
+import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
+import org.eclipse.mylyn.tasks.ui.TasksUiImages;
+import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
+import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPageFactory;
+import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
+import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.forms.editor.IFormPage;
+
+public class BugzillaRestTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
+
+ public BugzillaRestTaskEditorPageFactory() {
+ // ignore
+ }
+
+ @Override
+ public boolean canCreatePageFor(TaskEditorInput input) {
+ if (input.getTask().getConnectorKind().equals(BugzillaRestCore.CONNECTOR_KIND)
+ || TasksUiUtil.isOutgoingNewTask(input.getTask(), BugzillaRestCore.CONNECTOR_KIND)) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public IFormPage createPage(TaskEditor parentEditor) {
+ return new BugzillaRestTaskEditorPage(parentEditor);
+ }
+
+ @Override
+ public Image getPageImage() {
+ return CommonImages.getImage(TasksUiImages.REPOSITORY_SMALL);
+ }
+
+ @Override
+ public String getPageText() {
+ return "Bugzilla";
+ }
+
+ @Override
+ public String[] getConflictingIds(TaskEditorInput input) {
+ return new String[] { ITasksUiConstants.ID_PAGE_PLANNING };
+ }
+
+ @Override
+ public int getPriority() {
+ return PRIORITY_TASK;
+ }
+
+}

Back to the top