diff options
author | Frank Becker | 2014-01-19 21:23:31 +0000 |
---|---|---|
committer | Frank Becker | 2014-02-12 20:48:21 +0000 |
commit | 73aca745728a52143df46137519f68e63889926c (patch) | |
tree | 98bc75eb5ef43498fb48e5270ac3bdcf178765d5 /connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui | |
parent | 36670c42232938eb07abff1bab488a4bcaa7a3f8 (diff) | |
download | org.eclipse.mylyn.tasks-73aca745728a52143df46137519f68e63889926c.tar.gz org.eclipse.mylyn.tasks-73aca745728a52143df46137519f68e63889926c.tar.xz org.eclipse.mylyn.tasks-73aca745728a52143df46137519f68e63889926c.zip |
414360: add BugzillaRestRepositorySettingsPage to Rest Connector
Change-Id: I54d39dfbb2d85b189550215e8da234f2f56116dc
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=414360
Diffstat (limited to 'connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui')
6 files changed, 120 insertions, 1 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/META-INF/MANIFEST.MF b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/META-INF/MANIFEST.MF index bd6bfd7a5..1b1906edd 100644 --- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/META-INF/MANIFEST.MF +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/META-INF/MANIFEST.MF @@ -4,7 +4,12 @@ Bundle-Name: org.eclipse.mylyn.bugzilla.rest.ui Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.rest.ui;singleton:=true Bundle-Version: 1.0.0.qualifier Require-Bundle: org.eclipse.core.runtime, - org.eclipse.ui + org.eclipse.ui, + org.eclipse.ui.forms, + org.eclipse.mylyn.commons.ui;bundle-version="3.11.0", + org.eclipse.mylyn.tasks.ui;bundle-version="3.11.0", + org.eclipse.mylyn.tasks.core;bundle-version="3.11.0", + org.eclipse.mylyn.bugzilla.rest.core;bundle-version="1.0.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy Bundle-Vendor: Eclipse Mylyn diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/icons/eview16/bugzilla-logo.gif b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/icons/eview16/bugzilla-logo.gif Binary files differnew file mode 100644 index 000000000..1ac3a0327 --- /dev/null +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/icons/eview16/bugzilla-logo.gif diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/icons/eview16/overlay-bugzilla.gif b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/icons/eview16/overlay-bugzilla.gif Binary files differnew file mode 100644 index 000000000..f220eebc4 --- /dev/null +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/icons/eview16/overlay-bugzilla.gif 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 new file mode 100644 index 000000000..242cceaa4 --- /dev/null +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/plugin.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + id="org.eclipse.mylyn.bugzilla.rest.repository" + name="Bugzilla REST Respository" + point="org.eclipse.mylyn.tasks.ui.repositories"> + <connectorUi + brandingIcon="icons/eview16/bugzilla-logo.gif" + class="org.eclipse.mylyn.internal.bugzilla.rest.ui.BugzillaRestRepositoryConnectorUi" + overlayIcon="icons/eview16/overlay-bugzilla.gif"> + </connectorUi> + </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 new file mode 100644 index 000000000..752c3e208 --- /dev/null +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositoryConnectorUi.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * 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.jface.wizard.IWizard; +import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestCore; +import org.eclipse.mylyn.tasks.core.IRepositoryQuery; +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; + +public class BugzillaRestRepositoryConnectorUi extends AbstractRepositoryConnectorUi { + + public BugzillaRestRepositoryConnectorUi() { + // ignore + } + + @Override + public String getConnectorKind() { + return BugzillaRestCore.CONNECTOR_KIND; + } + + @Override + public ITaskRepositoryPage getSettingsPage(TaskRepository repository) { + return new BugzillaRestRepositorySettingsPage(repository); + } + + @Override + public IWizard getQueryWizard(TaskRepository repository, IRepositoryQuery query) { + // ignore + return null; + } + + @Override + public IWizard getNewTaskWizard(TaskRepository repository, ITaskMapping selection) { + // ignore + return null; + } + + @Override + public boolean hasSearchPage() { + // ignore + return false; + } + +} diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositorySettingsPage.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositorySettingsPage.java new file mode 100644 index 000000000..78c336c82 --- /dev/null +++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositorySettingsPage.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * 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 java.text.MessageFormat; + +import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestCore; +import org.eclipse.mylyn.tasks.core.TaskRepository; +import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage; +import org.eclipse.swt.widgets.Composite; + +public class BugzillaRestRepositorySettingsPage extends AbstractRepositorySettingsPage { + private static final String LABEL_VERSION_NUMBER = "5.0"; //$NON-NLS-1$ + + private static final String DESCRIPTION = MessageFormat.format( + "Supports Bugzilla {0} Example: https://bugs.eclipse.org/bugs/ (do not include rest.cgi)", + LABEL_VERSION_NUMBER); + + public BugzillaRestRepositorySettingsPage(TaskRepository taskRepository) { + super("Bugzilla REST Repository Settings", DESCRIPTION, taskRepository); + setNeedsAnonymousLogin(true); + setNeedsValidateOnFinish(true); + } + + @Override + public String getConnectorKind() { + return BugzillaRestCore.CONNECTOR_KIND; + } + + @Override + protected void createAdditionalControls(Composite parent) { + // ignore + + } +} |