Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2008-04-08 20:34:43 +0000
committerspingel2008-04-08 20:34:43 +0000
commit1a367bcc21a34dc465cbf7163bcbbd6bbf60e91e (patch)
treeefa2066e19752a86f1db0a8cf52f436e9d5436a2 /org.eclipse.mylyn.trac.ui/src/org/eclipse
parent0a096ad51bda14cc9ec4aad779beb14ec6ef2a6f (diff)
downloadorg.eclipse.mylyn.tasks-1a367bcc21a34dc465cbf7163bcbbd6bbf60e91e.tar.gz
org.eclipse.mylyn.tasks-1a367bcc21a34dc465cbf7163bcbbd6bbf60e91e.tar.xz
org.eclipse.mylyn.tasks-1a367bcc21a34dc465cbf7163bcbbd6bbf60e91e.zip
NEW - bug 226063: [api] move template management to internal package
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226063
Diffstat (limited to 'org.eclipse.mylyn.trac.ui/src/org/eclipse')
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java40
1 files changed, 15 insertions, 25 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
index 11d3365c4..f849d60a2 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracRepositorySettingsPage.java
@@ -29,7 +29,6 @@ import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
import org.eclipse.mylyn.web.core.AbstractWebLocation;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Combo;
@@ -59,33 +58,24 @@ public class TracRepositorySettingsPage extends AbstractRepositorySettingsPage {
}
@Override
- protected void createAdditionalControls(final Composite parent) {
-
- for (RepositoryTemplate template : connector.getTemplates()) {
- serverUrlCombo.add(template.label);
+ protected void repositoryTemplateSelected(RepositoryTemplate template) {
+ repositoryLabelEditor.setStringValue(template.label);
+ setUrl(template.repositoryUrl);
+ setAnonymous(template.anonymous);
+
+ try {
+ Version version = Version.valueOf(template.version);
+ setTracVersion(version);
+ } catch (RuntimeException ex) {
+ setTracVersion(Version.TRAC_0_9);
}
- serverUrlCombo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String text = serverUrlCombo.getText();
- RepositoryTemplate template = connector.getTemplate(text);
- if (template != null) {
- repositoryLabelEditor.setStringValue(template.label);
- setUrl(template.repositoryUrl);
- setAnonymous(template.anonymous);
- try {
- Version version = Version.valueOf(template.version);
- setTracVersion(version);
- } catch (RuntimeException ex) {
- setTracVersion(Version.TRAC_0_9);
- }
+ getContainer().updateButtons();
+ }
- getContainer().updateButtons();
- return;
- }
- }
- });
+ @Override
+ protected void createAdditionalControls(final Composite parent) {
+ addRepositoryTemplatesToServerUrlCombo();
Label accessTypeLabel = new Label(parent, SWT.NONE);
accessTypeLabel.setText("Access Type: ");

Back to the top