Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF2
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF9
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java22
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui.tests/META-INF/MANIFEST.MF2
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/META-INF/MANIFEST.MF1
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositoryConnectorUi.java8
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui/src/org/eclipse/mylyn/internal/bugzilla/rest/ui/BugzillaRestRepositorySettingsPage.java7
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java13
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/RepositoryConnectorUiExtensionReader.java23
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java19
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java13
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java58
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java79
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java4
16 files changed, 175 insertions, 89 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF
index 6d3b6353d..0a13f401a 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/META-INF/MANIFEST.MF
@@ -15,6 +15,6 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.equinox.security
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.mylyn.internal.bugzilla.rest.core;x-friends:="org.eclipse.mylyn.bugzilla.rest.ui,org.eclipse.mylyn.bugzilla.rest.core.tests,org.eclipse.mylyn.bugzilla.rest.ui.tests",
+Export-Package: org.eclipse.mylyn.internal.bugzilla.rest.core,
org.eclipse.mylyn.internal.bugzilla.rest.core.response.data
Bundle-Vendor: Eclipse Mylyn
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF
index 524afa81f..145f54574 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.junit;bundle-version="4.8.2",
org.eclipse.mylyn.commons.repositories.http.core;bundle-version="1.3.0",
org.eclipse.mylyn.tasks.ui,
org.eclipse.mylyn.tasks.core;bundle-version="3.11.0",
- org.eclipse.mylyn.bugzilla.rest.core,
- org.eclipse.mylyn.bugzilla.rest.ui
-Export-Package: org.eclipse.mylyn.bugzilla.rest.tests;x-internal:=true,
- org.eclipse.mylyn.bugzilla.rest.tests.tck;x-internal:=true
+ org.eclipse.mylyn.bugzilla.rest.ui,
+ org.eclipse.mylyn.bugzilla.rest.core;bundle-version="1.0.0"
+Export-Package: org.eclipse.mylyn.bugzilla.rest.tests,
+ org.eclipse.mylyn.bugzilla.rest.tests.tck,
+ org.eclipse.mylyn.bugzilla.rest.tests.tck.ui
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java
index 34e05260f..cc683cf28 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.tests/src/org/eclipse/mylyn/bugzilla/rest/tests/tck/ui/AbstractRepositorySettingsPageTest.java
@@ -11,20 +11,19 @@
package org.eclipse.mylyn.bugzilla.rest.tests.tck.ui;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.bugzilla.rest.tests.AbstractTckTest;
import org.eclipse.mylyn.bugzilla.rest.tests.TckFixture;
import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner.FixtureDefinition;
import org.eclipse.mylyn.commons.sdk.util.Junit4TestFixtureRunner.RunOnlyWhenProperty;
+import org.eclipse.mylyn.internal.bugzilla.rest.core.BugzillaRestConnector;
+import org.eclipse.mylyn.internal.bugzilla.rest.ui.BugzillaRestRepositoryConnectorUi;
import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
import org.eclipse.swt.widgets.Shell;
import org.junit.After;
-import org.junit.Ignore;
+import org.junit.Before;
import org.junit.Test;
@FixtureDefinition(fixtureClass = TckFixture.class, fixtureType = "bugzillaREST")
@@ -36,6 +35,10 @@ public class AbstractRepositorySettingsPageTest extends AbstractTckTest {
super(fixture);
}
+ @Before
+ public void setup() {
+ }
+
@After
public void tearDown() throws Exception {
if (dialog != null) {
@@ -44,17 +47,18 @@ public class AbstractRepositorySettingsPageTest extends AbstractTckTest {
}
@Test
- @Ignore
- //we temporary disable this test (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=436398)
public void testApplyTo() {
TaskRepository repository = fixture().createRepository();
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
+ BugzillaRestConnector connector = new BugzillaRestConnector();
+ BugzillaRestRepositoryConnectorUi connectorUi = new BugzillaRestRepositoryConnectorUi(connector);
+ EditRepositoryWizard wizard = new EditRepositoryWizard(repository, connectorUi);
dialog = new WizardDialog(new Shell(), wizard);
dialog.create();
ITaskRepositoryPage page = wizard.getSettingsPage();
- assertNull("repository.getCategory() should be null", repository.getCategory());
+ // we need this because save removes the static import of org.junit.Assert
+ org.junit.Assert.assertNull("repository.getCategory() should be null", repository.getCategory());
page.applyTo(repository);
- assertEquals(TaskRepository.CATEGORY_BUGS, repository.getCategory());
+ org.junit.Assert.assertEquals(TaskRepository.CATEGORY_BUGS, repository.getCategory());
}
}
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui.tests/META-INF/MANIFEST.MF b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui.tests/META-INF/MANIFEST.MF
index d0c24c699..ef1329321 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui.tests/META-INF/MANIFEST.MF
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.ui.tests/META-INF/MANIFEST.MF
@@ -7,4 +7,4 @@ Bundle-Vendor: Eclipse Mylyn
Fragment-Host: org.eclipse.mylyn.bugzilla.rest.ui
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit;bundle-version="4.8.2"
-Export-Package: org.eclipse.mylyn.internal.bugzilla.rest.ui
+Export-Package: org.eclipse.mylyn.internal.bugzilla.rest.ui.tests
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 1b1906edd..6923416f0 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
@@ -14,3 +14,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Eclipse Mylyn
Bundle-Activator: org.eclipse.mylyn.internal.bugzilla.rest.ui.BugzillaRestUiPlugin
+Export-Package: org.eclipse.mylyn.internal.bugzilla.rest.ui
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 6339cb55c..9c83fff9c 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
@@ -13,6 +13,7 @@ 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.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -23,7 +24,10 @@ import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
public class BugzillaRestRepositoryConnectorUi extends AbstractRepositoryConnectorUi {
public BugzillaRestRepositoryConnectorUi() {
- // ignore
+ }
+
+ public BugzillaRestRepositoryConnectorUi(AbstractRepositoryConnector connector) {
+ super(connector);
}
@Override
@@ -33,7 +37,7 @@ public class BugzillaRestRepositoryConnectorUi extends AbstractRepositoryConnect
@Override
public ITaskRepositoryPage getSettingsPage(TaskRepository repository) {
- return new BugzillaRestRepositorySettingsPage(repository);
+ return new BugzillaRestRepositorySettingsPage(repository, getConnector(), this);
}
@Override
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
index 78c336c82..b57308c52 100644
--- 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
@@ -14,7 +14,9 @@ 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.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
import org.eclipse.swt.widgets.Composite;
@@ -25,8 +27,9 @@ public class BugzillaRestRepositorySettingsPage extends AbstractRepositorySettin
"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);
+ public BugzillaRestRepositorySettingsPage(TaskRepository taskRepository, AbstractRepositoryConnector connector,
+ AbstractRepositoryConnectorUi connectorUi) {
+ super("Bugzilla REST Repository Settings", DESCRIPTION, taskRepository, connector, connectorUi);
setNeedsAnonymousLogin(true);
setNeedsValidateOnFinish(true);
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java
index 484219efd..c2f3804a0 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/ui/BugzillaRepositorySettingsPageTest.java
@@ -27,6 +27,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClient;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaClientFactory;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector;
+import org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaConnectorUi;
import org.eclipse.mylyn.internal.bugzilla.ui.tasklist.BugzillaRepositorySettingsPage;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
@@ -45,6 +46,8 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
private TaskRepository repository;
+ private EditRepositoryWizard wizard;
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -56,6 +59,8 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
new AuthenticationCredentials(credentials.getUserName(), credentials.getPassword()), false);
TasksUiPlugin.getRepositoryManager().addRepository(repository);
TasksUiTestUtil.ensureTasksUiInitialization();
+ BugzillaConnectorUi connectorUi = new BugzillaConnectorUi();
+ wizard = new EditRepositoryWizard(repository, connectorUi);
}
private BugzillaClient createClient(String hostUrl, String username, String password, String htAuthUser,
@@ -75,7 +80,6 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
public void testValidationInvalidPassword() throws Exception {
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
dialog.create();
BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
@@ -95,7 +99,6 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
}
public void testValidationInvalidUserid() throws Exception {
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
dialog.create();
BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
@@ -111,7 +114,6 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
}
public void testValidationInvalidUrl() throws Exception {
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
dialog.create();
BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
@@ -122,7 +124,7 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
client.validate(null);
fail("UnknownHostException didn't occur!");
} catch (CoreException e) {
- // skip assertion, some environments will still resolve invalid addresses
+ // skip assertion, some environments will still resolve invalid addresses
//assertTrue(e.getStatus().getException() instanceof UnknownHostException);
}
}
@@ -130,7 +132,6 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
// TODO: Test locking up?
// public void testAutoVersion() throws Exception {
// repository.setVersion(BugzillaRepositorySettingsPage.LABEL_AUTOMATIC_VERSION);
- // EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
// WizardDialog dialog = new
// WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
// wizard);
@@ -148,7 +149,6 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
assertEquals(1, manager.getAllRepositories().size());
String tempUid = repository.getUserName();
String tempPass = repository.getPassword();
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
dialog.create();
BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
@@ -167,7 +167,6 @@ public class BugzillaRepositorySettingsPageTest extends TestCase {
public void testValidateOnFinishInvalidUserId() throws Exception {
assertEquals(1, manager.getAllRepositories().size());
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), wizard);
dialog.create();
BugzillaRepositorySettingsPage page = (BugzillaRepositorySettingsPage) wizard.getSettingsPage();
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
index e8cd3d67e..36d678632 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
@@ -42,7 +42,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
/**
* Provides facilities for managing the life-cycle of and access to task repositories.
- *
+ *
* @author Mik Kersten
* @author Rob Elves
* @author Jevgeni Holodkov
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/RepositoryConnectorUiExtensionReader.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/RepositoryConnectorUiExtensionReader.java
index b84496799..31490cd3d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/RepositoryConnectorUiExtensionReader.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/RepositoryConnectorUiExtensionReader.java
@@ -13,6 +13,7 @@ package org.eclipse.mylyn.internal.tasks.ui.util;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.reflect.Field;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
@@ -68,6 +69,16 @@ public class RepositoryConnectorUiExtensionReader {
public void registerConnectorUis() {
registerFromExtensionPoint();
registerFromAdaptable();
+ registerConnetorToConnectorUi();
+ }
+
+ private void registerConnetorToConnectorUi() {
+ for (AbstractRepositoryConnector connector : TasksUi.getRepositoryManager().getRepositoryConnectors()) {
+ AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(connector.getConnectorKind());
+ if (connectorUi != null) {
+ setConnectorForConnectorUi(connector, connectorUi);
+ }
+ }
}
private void registerFromAdaptable() {
@@ -202,4 +213,16 @@ public class RepositoryConnectorUiExtensionReader {
}
}
+ private static void setConnectorForConnectorUi(AbstractRepositoryConnector connector,
+ AbstractRepositoryConnectorUi connectorUi) {
+ // need reflection since the field is private
+ try {
+ Field field = AbstractRepositoryConnectorUi.class.getDeclaredField("connector");
+ field.setAccessible(true);
+ field.set(connectorUi, connector);
+ } catch (Exception e) {
+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Unable to call setConnector()", e)); //$NON-NLS-1$
+ }
+ }
+
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
index 8202af336..76a958c00 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java
@@ -173,7 +173,7 @@ public class TasksUiInternal {
/**
* get the connector discovery wizard command. Calling code should check {@link Command#isEnabled()} on return.
- *
+ *
* @return the command, or null if it is not available.
*/
public static Command getConfiguredDiscoveryWizardCommand() {
@@ -487,7 +487,7 @@ public class TasksUiInternal {
/**
* Synchronize a single task. Note that if you have a collection of tasks to synchronize with this connector then
* you should call synchronize(Set<Set<AbstractTask> repositoryTasks, ...)
- *
+ *
* @param listener
* can be null
*/
@@ -636,7 +636,7 @@ public class TasksUiInternal {
/**
* Creates a new local task and schedules for today
- *
+ *
* @param summary
* if null DEFAULT_SUMMARY (New Task) used.
*/
@@ -823,7 +823,7 @@ public class TasksUiInternal {
* return null.
* <p>
* <b>Note: Applied from patch on bug 99472.</b>
- *
+ *
* @return Shell or <code>null</code>
* @deprecated Use {@link WorkbenchUtil#getShell()} instead
*/
@@ -1008,7 +1008,7 @@ public class TasksUiInternal {
/**
* Only override if task should be opened by a custom editor, default behavior is to open with a rich editor,
* falling back to the web browser if not available.
- *
+ *
* @return true if the task was successfully opened
*/
public static boolean openRepositoryTask(String connectorKind, String repositoryUrl, String id,
@@ -1019,7 +1019,7 @@ public class TasksUiInternal {
/**
* Only override if task should be opened by a custom editor, default behavior is to open with a rich editor,
* falling back to the web browser if not available.
- *
+ *
* @return true if the task was successfully opened
*/
public static boolean openRepositoryTask(String connectorKind, String repositoryUrl, String id,
@@ -1083,7 +1083,7 @@ public class TasksUiInternal {
/**
* Returns text masking the &amp;-character from decoration as an accelerator in SWT labels.
- *
+ *
* @deprecated Use {@link CommonUiUtil#toLabel(String)} instead
*/
@Deprecated
@@ -1194,7 +1194,7 @@ public class TasksUiInternal {
/**
* Searches for a task whose URL matches
- *
+ *
* @return first task with a matching URL.
*/
public static AbstractTask getTaskByUrl(String taskUrl) {
@@ -1260,7 +1260,7 @@ public class TasksUiInternal {
/**
* Cleans text for use as the text of an action to ensure that it is displayed properly.
- *
+ *
* @return the cleaned text
* @deprecated use {@link CommonUiUtil#toMenuLabel(String)} instead
*/
@@ -1527,4 +1527,5 @@ public class TasksUiInternal {
}
return undoContext;
}
+
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
index c89117b27..40e17a10b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
@@ -13,6 +13,7 @@ package org.eclipse.mylyn.internal.tasks.ui.wizards;
import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -41,8 +42,17 @@ public class EditRepositoryWizard extends Wizard implements INewWizard {
private final TaskRepository repository;
+ private final AbstractRepositoryConnectorUi connectorUi;
+
public EditRepositoryWizard(TaskRepository repository) {
+ this(repository, TasksUiPlugin.getConnectorUi(repository.getConnectorKind()));
+ }
+
+ public EditRepositoryWizard(TaskRepository repository, AbstractRepositoryConnectorUi connectorUi) {
+ Assert.isNotNull(repository);
+ Assert.isNotNull(connectorUi);
this.repository = repository;
+ this.connectorUi = connectorUi;
setNeedsProgressMonitor(true);
setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY_SETTINGS);
setWindowTitle(Messages.EditRepositoryWizard_Properties_for_Task_Repository);
@@ -69,7 +79,7 @@ public class EditRepositoryWizard extends Wizard implements INewWizard {
StatusManager.getManager().handle(
new Status(IStatus.WARNING, TasksUiPlugin.ID_PLUGIN,
Messages.EditRepositoryWizard_Failed_to_refactor_repository_urls, e),
- StatusManager.SHOW | StatusManager.LOG);
+ StatusManager.SHOW | StatusManager.LOG);
return false;
} catch (InterruptedException e) {
// should not get here
@@ -96,7 +106,6 @@ public class EditRepositoryWizard extends Wizard implements INewWizard {
@Override
public void addPages() {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind());
settingsPage = connectorUi.getSettingsPage(repository);
if (settingsPage instanceof AbstractRepositorySettingsPage) {
((AbstractRepositorySettingsPage) settingsPage).setRepository(repository);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
index aed2d8739..cff330cc5 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
@@ -27,6 +27,7 @@ import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
import org.eclipse.mylyn.internal.tasks.ui.Messages;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
+import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
@@ -43,7 +44,7 @@ import org.eclipse.ui.IEditorInput;
/**
* Extend to provide connector-specific UI extensions. TODO: consider refactoring into extension points
- *
+ *
* @author Mik Kersten
* @since 2.0
*/
@@ -53,6 +54,25 @@ public abstract class AbstractRepositoryConnectorUi {
private final boolean customNotificationHandling = false;
+ private final AbstractRepositoryConnector connector;
+
+ /**
+ * Connectors should provide a one-argument constructor that can be used to pass the connector into the connector UI
+ * in tests. Connectors must provide a default constructor so that they can be created via extension point.
+ *
+ * @param connector
+ * the task repository connector
+ * @noreference This method is not intended to be referenced by clients.
+ * @since 3.13
+ */
+ public AbstractRepositoryConnectorUi(AbstractRepositoryConnector connector) {
+ this.connector = connector;
+ }
+
+ public AbstractRepositoryConnectorUi() {
+ this(null);
+ }
+
/**
* @return the unique type of the repository, e.g. "bugzilla"
*/
@@ -86,7 +106,7 @@ public abstract class AbstractRepositoryConnectorUi {
* Override to return a custom task editor ID. If overriding this method the connector becomes responsible for
* showing the additional pages handled by the default task editor. As of Mylyn 2.0M2 these are the Planning and
* Context pages.
- *
+ *
* @since 3.0
*/
@NonNull
@@ -99,7 +119,7 @@ public abstract class AbstractRepositoryConnectorUi {
* this method to return a custom task editor input. The connector author must ensure the corresponding editor is
* capable of opening this editor input and will likely need to override
* AbstractRepositoryConnectorUi.getTaskEditorId() as well.
- *
+ *
* @param repository
* - task repository for which to construct an editor
* @param task
@@ -115,7 +135,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* Contributions to the UI legend.
- *
+ *
* @deprecated use {@link #getLegendElements()} instead
*/
@Deprecated
@@ -126,7 +146,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* Contributions to the UI legend.
- *
+ *
* @since 3.0
*/
@NonNull
@@ -148,7 +168,7 @@ public abstract class AbstractRepositoryConnectorUi {
* Connector-specific task icons. Not recommended to override unless providing custom icons and kind overlays. For
* connectors that have a decorator that they want to reuse, the connector can maintain a reference to the label
* provider and get the descriptor from the images it returns.
- *
+ *
* @since 3.0
*/
@Nullable
@@ -164,7 +184,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* Task kind overlay, recommended to override with connector-specific overlay.
- *
+ *
* @since 3.0
*/
@Nullable
@@ -175,7 +195,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* Connector-specific priority icons. Not recommended to override since priority icons are used elsewhere in the
* Task List UI (e.g. filter selection in view menu).
- *
+ *
* @since 3.0
*/
@NonNull
@@ -185,7 +205,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* This method is not used anymore.
- *
+ *
* @return returns null
*/
@Deprecated
@@ -204,7 +224,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* Override to return a URL that provides the user with an account creation page for the repository
- *
+ *
* @param taskRepository
* TODO
*/
@@ -215,7 +235,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* Override to return a URL that provides the user with an account management page for the repository
- *
+ *
* @param taskRepository
* TODO
*/
@@ -226,7 +246,7 @@ public abstract class AbstractRepositoryConnectorUi {
/**
* Override to return a URL that provides the user with a history page for the task.
- *
+ *
* @return a url of a page for the history of the task; null, if no history url is available
* @since 3.0
*/
@@ -239,7 +259,7 @@ public abstract class AbstractRepositoryConnectorUi {
* Override to return a specific textual reference to a comment, e.g. by default this method returns
* <code>In reply to comment #12</code> for a reply to comment 12. This text is used when generating replies to
* comments.
- *
+ *
* @return the reply text with a reference to <code>taskComment</code>; null, if no reference is available
* @since 3.0
*/
@@ -261,7 +281,7 @@ public abstract class AbstractRepositoryConnectorUi {
* Returns an array of hyperlinks that link to tasks within <code>text</code>. If <code>index</code> is != -1
* clients may limit the results to hyperlinks found at <code>index</code>. It is legal for clients to always return
* all results.
- *
+ *
* @param repository
* the task repository, never <code>null</code>
* @param text
@@ -308,7 +328,7 @@ public abstract class AbstractRepositoryConnectorUi {
* Returns an array of hyperlinks that link to tasks within <code>text</code>. If <code>index</code> is != -1
* clients may limit the results to hyperlinks found at <code>index</code>. It is legal for clients to always return
* all results.
- *
+ *
* @param repository
* the task repository, never <code>null</code>
* @param task
@@ -327,4 +347,12 @@ public abstract class AbstractRepositoryConnectorUi {
int index, int textOffset) {
return findHyperlinks(repository, text, index, textOffset);
}
+
+ /**
+ * @return the {@link AbstractRepositoryConnector } that is associated to this instance
+ * @since 3.14
+ */
+ public AbstractRepositoryConnector getConnector() {
+ return connector;
+ }
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
index 1e3a0b099..753f48421 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
@@ -197,7 +197,7 @@ public class TasksUiUtil {
return Window.CANCEL;
}
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
+ EditRepositoryWizard wizard = new EditRepositoryWizard(repository, TasksUiPlugin.getConnectorUi(repository.getConnectorKind()));
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
if (shell != null && !shell.isDisposed()) {
WizardDialog dialog = new TaskRepositoryWizardDialog(shell, wizard);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
index ea7c0d932..862a17079 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
@@ -57,6 +57,7 @@ import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.RepositoryInfo;
import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
import org.eclipse.mylyn.tasks.core.TaskRepository;
+import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -91,7 +92,7 @@ import org.eclipse.ui.statushandlers.StatusManager;
/**
* Extend to provide custom repository settings. This page is typically invoked by the user requesting properties via
* the Task Repositories view.
- *
+ *
* @author Mik Kersten
* @author Rob Elves
* @author Steffen Pingel
@@ -102,7 +103,7 @@ import org.eclipse.ui.statushandlers.StatusManager;
* @since 2.0
*/
public abstract class AbstractRepositorySettingsPage extends AbstractTaskRepositoryPage implements ITaskRepositoryPage,
- IAdaptable {
+IAdaptable {
protected static final String PREFS_PAGE_ID_NET_PROXY = "org.eclipse.ui.net.NetPreferences"; //$NON-NLS-1$
@@ -124,6 +125,8 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
protected AbstractRepositoryConnector connector;
+ private final AbstractRepositoryConnectorUi connectorUi;
+
protected StringFieldEditor repositoryLabelEditor;
protected Combo serverUrlCombo;
@@ -272,12 +275,24 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
*/
public AbstractRepositorySettingsPage(String title, String description, TaskRepository taskRepository,
AbstractRepositoryConnector connector) {
+ this(title, description, taskRepository, connector, null);
+ }
+
+ /**
+ * @since 3.14
+ */
+ public AbstractRepositorySettingsPage(String title, String description, TaskRepository taskRepository,
+ AbstractRepositoryConnector connector, AbstractRepositoryConnectorUi connectorUi) {
super(title, description, taskRepository);
repository = taskRepository;
if (connector == null) {
connector = TasksUi.getRepositoryManager().getRepositoryConnector(getConnectorKind());
}
this.connector = connector;
+ if (connectorUi == null) {
+ connectorUi = TasksUi.getRepositoryConnectorUi(getConnectorKind());
+ }
+ this.connectorUi = connectorUi;
if (repository != null && !repository.getConnectorKind().equals(getConnectorKind())) {
throw new IllegalArgumentException(
"connectorKind of repository does not match connectorKind of page, expected '" + getConnectorKind() + "', got '" + repository.getConnectorKind() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -422,10 +437,10 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
});
GridDataFactory.fillDefaults()
- .hint(300, SWT.DEFAULT)
- .grab(true, false)
- .span(2, SWT.DEFAULT)
- .applyTo(serverUrlCombo);
+ .hint(300, SWT.DEFAULT)
+ .grab(true, false)
+ .span(2, SWT.DEFAULT)
+ .applyTo(serverUrlCombo);
repositoryLabelEditor = new StringFieldEditor("", LABEL_REPOSITORY_LABEL, StringFieldEditor.UNLIMITED, //$NON-NLS-1$
compositeContainer) {
@@ -505,8 +520,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
// repository = createTaskRepository();
// }
if (repository != null) {
- String accountCreationUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountCreationUrl(repository);
+ String accountCreationUrl = connectorUi.getAccountCreationUrl(repository);
if (accountCreationUrl != null) {
BrowserUtil.openUrl(accountCreationUrl, IWorkbenchBrowserSupport.AS_EXTERNAL);
}
@@ -525,8 +539,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
repository = createTaskRepository();
}
if (repository != null) {
- String accountManagementUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountManagementUrl(repository);
+ String accountManagementUrl = connectorUi.getAccountManagementUrl(repository);
if (accountManagementUrl != null) {
BrowserUtil.openUrl(accountManagementUrl, IWorkbenchBrowserSupport.AS_EXTERNAL);
}
@@ -767,10 +780,10 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
certAuthButton = new Button(certAuthComp, SWT.CHECK);
GridDataFactory.fillDefaults()
- .indent(0, 5)
- .align(SWT.LEFT, SWT.TOP)
- .span(3, SWT.DEFAULT)
- .applyTo(certAuthButton);
+ .indent(0, 5)
+ .align(SWT.LEFT, SWT.TOP)
+ .span(3, SWT.DEFAULT)
+ .applyTo(certAuthButton);
certAuthButton.setText(Messages.AbstractRepositorySettingsPage_Enable_certificate_authentification);
@@ -862,10 +875,10 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
httpAuthButton = new Button(httpAuthComp, SWT.CHECK);
GridDataFactory.fillDefaults()
- .indent(0, 5)
- .align(SWT.LEFT, SWT.TOP)
- .span(3, SWT.DEFAULT)
- .applyTo(httpAuthButton);
+ .indent(0, 5)
+ .align(SWT.LEFT, SWT.TOP)
+ .span(3, SWT.DEFAULT)
+ .applyTo(httpAuthButton);
httpAuthButton.setText(Messages.AbstractRepositorySettingsPage_Enable_http_authentication);
@@ -1397,13 +1410,11 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
if (getRepositoryUrl() != null && getRepositoryUrl().length() > 0) {
TaskRepository repository = new TaskRepository(connector.getConnectorKind(), getRepositoryUrl());
- String accountCreationUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountCreationUrl(repository);
+ String accountCreationUrl = connectorUi.getAccountCreationUrl(repository);
createAccountHyperlink.setEnabled(accountCreationUrl != null);
createAccountHyperlink.setVisible(accountCreationUrl != null);
- String accountManagementUrl = TasksUiPlugin.getConnectorUi(connector.getConnectorKind())
- .getAccountManagementUrl(repository);
+ String accountManagementUrl = connectorUi.getAccountManagementUrl(repository);
manageAccountHyperlink.setEnabled(accountManagementUrl != null);
manageAccountHyperlink.setVisible(accountManagementUrl != null);
} else {
@@ -1616,7 +1627,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Returns true, if credentials are incomplete. Clients may override this method.
- *
+ *
* @since 3.4
*/
protected boolean isMissingCredentials() {
@@ -1702,7 +1713,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
* Note: The credentials of the created repository are not persisted in the platform keystore. When overriding,
* subclasses must either call super or call {@link TaskRepository#setShouldPersistCredentials(boolean)
* setShouldPersistCredentials(false)} before calling {@link #applyTo(TaskRepository)}.
- *
+ *
* @since 2.0
*/
public TaskRepository createTaskRepository() {
@@ -1905,7 +1916,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
* <p>
* This information is typically used by the wizard to set the enablement of the validation UI affordance.
* </p>
- *
+ *
* @return <code>true</code> if this page can be validated, and <code>false</code> otherwise
* @see #needsValidation()
* @see IWizardContainer#updateButtons()
@@ -1924,7 +1935,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Public for testing.
- *
+ *
* @since 2.0
*/
public void setUrl(String url) {
@@ -1933,7 +1944,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Public for testing.
- *
+ *
* @since 2.0
*/
public void setUserId(String id) {
@@ -1942,7 +1953,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Public for testing.
- *
+ *
* @since 2.0
*/
public void setPassword(String pass) {
@@ -1991,7 +2002,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Validate settings provided by the {@link #getValidator(TaskRepository) validator}, typically the server settings.
- *
+ *
* @since 2.0
*/
protected void validateSettings() {
@@ -2027,7 +2038,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
StatusManager.getManager().handle(
new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN,
Messages.AbstractRepositorySettingsPage_Internal_error_validating_repository, e),
- StatusManager.SHOW | StatusManager.LOG);
+ StatusManager.SHOW | StatusManager.LOG);
return;
} catch (InterruptedException e) {
// canceled
@@ -2088,7 +2099,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
* For version 3.11 we change the abstract implementation to a default implementation. The default implementation
* creates an {@link Validator} and deligate the work to
* {@link AbstractRepositoryConnector#validateRepository(TaskRepository, IProgressMonitor)}
- *
+ *
* @since 2.0
*/
@@ -2107,7 +2118,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Public for testing.
- *
+ *
* @since 2.0
*/
public abstract class Validator {
@@ -2128,7 +2139,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Provides an adapter for the {@link IValidatable} interface.
- *
+ *
* @since 3.7
* @see IAdaptable#getAdapter(Class)
*/
@@ -2190,7 +2201,7 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
/**
* Returns the toolkit used to construct sections and hyperlinks.
- *
+ *
* @return the toolkit
* @throws IllegalStateException
* if the toolkit has not been initialized
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
index 3c266560d..a208760e7 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
@@ -21,6 +21,7 @@ import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
+import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
@@ -201,7 +202,8 @@ public class TracRepositorySettingsPageTest extends TestCase {
TasksUiTestUtil.ensureTasksUiInitialization();
- EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
+ EditRepositoryWizard wizard = new EditRepositoryWizard(repository,
+ TasksUiPlugin.getConnectorUi(repository.getConnectorKind()));
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
WizardDialog dialog = new WizardDialog(shell, wizard);
try {

Back to the top