Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-12-01 06:38:58 -0500
committerSteffen Pingel2011-12-01 06:38:58 -0500
commit5248ca16bc9aad83b08b1215d9b3aad22109b15f (patch)
tree28ec320e5d5e1b8c274bd292f5d27ad82e6cf47d /org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks
parentdca8657902a64a5a9d273dc2beb51cf928cfb840 (diff)
downloadorg.eclipse.mylyn.tasks-5248ca16bc9aad83b08b1215d9b3aad22109b15f.tar.gz
org.eclipse.mylyn.tasks-5248ca16bc9aad83b08b1215d9b3aad22109b15f.tar.xz
org.eclipse.mylyn.tasks-5248ca16bc9aad83b08b1215d9b3aad22109b15f.zip
NEW - bug 360046: Fix validation when creating repositories from Team
Repositories view https://bugs.eclipse.org/bugs/show_bug.cgi?id=360046
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java31
1 files changed, 30 insertions, 1 deletions
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 dfe24ccca..f0770b568 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
@@ -21,6 +21,7 @@ import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
@@ -37,6 +38,7 @@ import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.provisional.commons.ui.WorkbenchUtil;
+import org.eclipse.mylyn.internal.provisional.commons.ui.dialogs.IValidatable;
import org.eclipse.mylyn.internal.provisional.commons.ui.dialogs.ValidatableWizardDialog;
import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
import org.eclipse.mylyn.internal.tasks.core.RepositoryTemplateManager;
@@ -85,7 +87,8 @@ import org.eclipse.ui.forms.widgets.Hyperlink;
* @author Helen Bershadskaya
* @since 2.0
*/
-public abstract class AbstractRepositorySettingsPage extends AbstractTaskRepositoryPage implements ITaskRepositoryPage {
+public abstract class AbstractRepositorySettingsPage extends AbstractTaskRepositoryPage implements ITaskRepositoryPage,
+ IAdaptable {
protected static final String PREFS_PAGE_ID_NET_PROXY = "org.eclipse.ui.net.NetPreferences"; //$NON-NLS-1$
@@ -1985,4 +1988,30 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
}
+ /**
+ * Provides an adapter for the {@link IValidatable} interface.
+ *
+ * @since 3.7
+ * @see IAdaptable#getAdapter(Class)
+ */
+ public Object getAdapter(@SuppressWarnings("rawtypes")
+ Class adapter) {
+ if (adapter == IValidatable.class) {
+ return new IValidatable() {
+ public void validate() {
+ AbstractRepositorySettingsPage.this.validateSettings();
+ }
+
+ public boolean needsValidation() {
+ return AbstractRepositorySettingsPage.this.needsValidation();
+ }
+
+ public boolean canValidate() {
+ return AbstractRepositorySettingsPage.this.canValidate();
+ }
+ };
+ }
+ return null;
+ }
+
}

Back to the top