Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 315184
Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java (-1 / +1 lines)
Lines 74-80 Link Here
74
			if (!repository.getConnectorKind().equals(LocalRepositoryConnector.CONNECTOR_KIND)) {
74
			if (!repository.getConnectorKind().equals(LocalRepositoryConnector.CONNECTOR_KIND)) {
75
				repository.setRepositoryUrl(newUrl);
75
				repository.setRepositoryUrl(newUrl);
76
			}
76
			}
77
			settingsPage.applyTo(repository);
77
			settingsPage.performFinish(repository);
78
			if (oldUrl != null && newUrl != null && !oldUrl.equals(newUrl)) {
78
			if (oldUrl != null && newUrl != null && !oldUrl.equals(newUrl)) {
79
				TasksUiPlugin.getRepositoryManager().notifyRepositoryUrlChanged(repository, oldUrl);
79
				TasksUiPlugin.getRepositoryManager().notifyRepositoryUrlChanged(repository, oldUrl);
80
			}
80
			}
(-)src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewRepositoryWizard.java (-1 / +1 lines)
Lines 100-106 Link Here
100
	public boolean performFinish() {
100
	public boolean performFinish() {
101
		if (canFinish()) {
101
		if (canFinish()) {
102
			taskRepository = new TaskRepository(connector.getConnectorKind(), settingsPage.getRepositoryUrl());
102
			taskRepository = new TaskRepository(connector.getConnectorKind(), settingsPage.getRepositoryUrl());
103
			settingsPage.applyTo(taskRepository);
103
			settingsPage.performFinish(taskRepository);
104
			TasksUi.getRepositoryManager().addRepository(taskRepository);
104
			TasksUi.getRepositoryManager().addRepository(taskRepository);
105
			return true;
105
			return true;
106
		}
106
		}
(-)src/org/eclipse/mylyn/tasks/ui/wizards/AbstractTaskRepositoryPage.java (+11 lines)
Lines 277-282 Link Here
277
	}
277
	}
278
278
279
	/**
279
	/**
280
	 * {@inheritDoc}
281
	 * <p>
282
	 * Invokes {@link #applyTo(TaskRepository)} by default. Client may override.
283
	 * 
284
	 * @since 3.6
285
	 */
286
	public void performFinish(TaskRepository repository) {
287
		applyTo(repository);
288
	}
289
290
	/**
280
	 * Returns a status if there is a message to display, otherwise null.
291
	 * Returns a status if there is a message to display, otherwise null.
281
	 */
292
	 */
282
	private IStatus computeValidation() {
293
	private IStatus computeValidation() {
(-)src/org/eclipse/mylyn/tasks/ui/wizards/ITaskRepositoryPage.java (+23 lines)
Lines 22-29 Link Here
22
 */
22
 */
23
public interface ITaskRepositoryPage extends IWizardPage {
23
public interface ITaskRepositoryPage extends IWizardPage {
24
24
25
	/**
26
	 * Invoked to commit changes from the wizard page to the <code>repository</code> object.
27
	 * 
28
	 * @since 3.0
29
	 * @param repository
30
	 *            the task repository to persists settings to
31
	 */
25
	public abstract void applyTo(TaskRepository repository);
32
	public abstract void applyTo(TaskRepository repository);
26
33
34
	/**
35
	 * Returns the URL currently entered on the page. This is used by the framework to detect if the URL of the
36
	 * repository has changed which requires a migration job to run.
37
	 * 
38
	 * @since 3.0
39
	 * @return the repository URL that is currently entered
40
	 */
27
	public abstract String getRepositoryUrl();
41
	public abstract String getRepositoryUrl();
28
42
43
	/**
44
	 * Invoked when the wizard that contains page finishes. This method should commit all entered data to the
45
	 * <code>repository</code> object.
46
	 * 
47
	 * @since 3.6
48
	 * @see #applyTo(TaskRepository)
49
	 */
50
	public abstract void performFinish(TaskRepository repository);
51
29
}
52
}

Return to bug 315184