Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2007-06-26 16:01:19 -0400
committerrelves2007-06-26 16:01:19 -0400
commit3d07229dd5e2bcb56eab3a728b1c73353a3c5e91 (patch)
tree992fafc9677c010793da7d1bd2442eb801dab121
parent1434e63f92765b8710b73b2a3e231020751f4673 (diff)
downloadorg.eclipse.mylyn.tasks-3d07229dd5e2bcb56eab3a728b1c73353a3c5e91.tar.gz
org.eclipse.mylyn.tasks-3d07229dd5e2bcb56eab3a728b1c73353a3c5e91.tar.xz
org.eclipse.mylyn.tasks-3d07229dd5e2bcb56eab3a728b1c73353a3c5e91.zip
REOPENED - bug 190660: Repository settings wizards don't persist individual proxy settings
https://bugs.eclipse.org/bugs/show_bug.cgi?id=190660
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java100
1 files changed, 52 insertions, 48 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 ea09add79..f44b36f98 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
@@ -212,6 +212,41 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage {
}
public void createControl(Composite parent) {
+
+ if (repository != null) {
+ originalUrl = repository.getUrl();
+ oldUsername = repository.getUserName();
+ oldPassword = repository.getPassword();
+
+ if (repository.getHttpUser() != null && repository.getHttpPassword() != null) {
+ oldHttpAuthUserId = repository.getHttpUser();
+ oldHttpAuthPassword = repository.getHttpPassword();
+ } else {
+ oldHttpAuthPassword = "";
+ oldHttpAuthUserId = "";
+ }
+
+ oldProxyHostname = repository.getProperty(TaskRepository.PROXY_HOSTNAME);
+ oldProxyPort = repository.getProperty(TaskRepository.PROXY_PORT);
+ if (oldProxyHostname == null)
+ oldProxyHostname = "";
+ if (oldProxyPort == null)
+ oldProxyPort = "";
+
+ oldProxyUsername = repository.getProxyUsername();
+ oldProxyPassword = repository.getProxyPassword();
+ if (oldProxyUsername == null)
+ oldProxyUsername = "";
+ if (oldProxyPassword == null)
+ oldProxyPassword = "";
+
+ } else {
+ oldUsername = "";
+ oldPassword = "";
+ oldHttpAuthPassword = "";
+ oldHttpAuthUserId = "";
+ }
+
compositeContainer = new Composite(parent, SWT.NULL);
FillLayout layout = new FillLayout();
compositeContainer.setLayout(layout);
@@ -316,6 +351,22 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage {
}
};
+ if (repository != null) {
+ try {
+ String repositoryLabel = repository.getProperty(IRepositoryConstants.PROPERTY_LABEL);
+ if (repositoryLabel != null && repositoryLabel.length() > 0) {
+ // repositoryLabelCombo.add(repositoryLabel);
+ // repositoryLabelCombo.select(0);
+ repositoryLabelEditor.setStringValue(repositoryLabel);
+ }
+ serverUrlCombo.setText(repository.getUrl());
+ repositoryUserNameEditor.setStringValue(repository.getUserName());
+ repositoryPasswordEditor.setStringValue(repository.getPassword());
+ } catch (Throwable t) {
+ StatusHandler.fail(t, "could not set field value for: " + repository, false);
+ }
+ }
+
if (needsAnonymousLogin()) {
if (repository != null) {
setAnonymous(repository.isAnonymous());
@@ -468,6 +519,7 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage {
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).span(2, SWT.DEFAULT).applyTo(httpAuthButton);
httpAuthButton.setText("Enabled");
+
httpAuthButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
setHttpAuth(httpAuthButton.getSelection());
@@ -497,7 +549,6 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage {
httpAuthComp);
((RepositoryStringFieldEditor) httpAuthPasswordEditor).getTextControl().setEchoChar('*');
- // httpAuthGroup.setEnabled(httpAuthButton.getSelection());
httpAuthUserNameEditor.setEnabled(httpAuthButton.getSelection(), httpAuthComp);
httpAuthPasswordEditor.setEnabled(httpAuthButton.getSelection(), httpAuthComp);
@@ -507,53 +558,6 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage {
httpAuthExpComposite.setExpanded(httpAuthButton.getSelection());
}
- if (repository != null) {
- originalUrl = repository.getUrl();
- oldUsername = repository.getUserName();
- oldPassword = repository.getPassword();
-
- if (repository.getHttpUser() != null && repository.getHttpPassword() != null) {
- oldHttpAuthUserId = repository.getHttpUser();
- oldHttpAuthPassword = repository.getHttpPassword();
- } else {
- oldHttpAuthPassword = "";
- oldHttpAuthUserId = "";
- }
-
- oldProxyHostname = repository.getProperty(TaskRepository.PROXY_HOSTNAME);
- oldProxyPort = repository.getProperty(TaskRepository.PROXY_PORT);
- if (oldProxyHostname == null)
- oldProxyHostname = "";
- if (oldProxyPort == null)
- oldProxyPort = "";
-
- oldProxyUsername = repository.getProxyUsername();
- oldProxyPassword = repository.getProxyPassword();
- if (oldProxyUsername == null)
- oldProxyUsername = "";
- if (oldProxyPassword == null)
- oldProxyPassword = "";
-
- try {
- String repositoryLabel = repository.getProperty(IRepositoryConstants.PROPERTY_LABEL);
- if (repositoryLabel != null && repositoryLabel.length() > 0) {
- // repositoryLabelCombo.add(repositoryLabel);
- // repositoryLabelCombo.select(0);
- repositoryLabelEditor.setStringValue(repositoryLabel);
- }
- serverUrlCombo.setText(repository.getUrl());
- repositoryUserNameEditor.setStringValue(repository.getUserName());
- repositoryPasswordEditor.setStringValue(repository.getPassword());
- } catch (Throwable t) {
- StatusHandler.fail(t, "could not set field value for: " + repository, false);
- }
- } else {
- oldUsername = "";
- oldPassword = "";
- oldHttpAuthPassword = "";
- oldHttpAuthUserId = "";
- }
-
if (needsProxy()) {
addProxySection();
}

Back to the top