Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-05-03 14:20:18 +0000
committerMichael Valenta2005-05-03 14:20:18 +0000
commit7e44e86d3b97ea0ba67f7f764a77be2dd12ead1b (patch)
tree80d2f2f08008713c0446852c58ba13a623099b78
parent403864ab3a784bb8cff13b8ec63630b88865ddd0 (diff)
downloadeclipse.platform.team-7e44e86d3b97ea0ba67f7f764a77be2dd12ead1b.tar.gz
eclipse.platform.team-7e44e86d3b97ea0ba67f7f764a77be2dd12ead1b.tar.xz
eclipse.platform.team-7e44e86d3b97ea0ba67f7f764a77be2dd12ead1b.zip
Bug 90331 importing from cvs incorrectly prompts user for new repository
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java61
1 files changed, 34 insertions, 27 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java
index 1c9b5eb7e..6ee6ebba7 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java
@@ -80,35 +80,36 @@ public class RepositorySelectionPage extends CVSWizardPage {
table = createTable(composite, 1);
table.setContentProvider(new WorkbenchContentProvider());
table.setLabelProvider(new WorkbenchLabelProvider());
- table.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
- setPageComplete(true);
- }
- });
- table.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- getContainer().showPage(getNextPage());
- }
- });
-
- useExistingRepo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if (useNewRepo.getSelection()) {
- table.getTable().setEnabled(false);
- result = null;
- } else {
- table.getTable().setEnabled(true);
- result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
- }
- setPageComplete(true);
- }
- });
+ table.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ getContainer().showPage(getNextPage());
+ }
+ });
setControl(composite);
initializeValues();
Dialog.applyDialogFont(parent);
+
+ table.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
+ setPageComplete(true);
+ }
+ });
+
+ useExistingRepo.addListener(SWT.Selection, new Listener() {
+ public void handleEvent(Event event) {
+ if (useNewRepo.getSelection()) {
+ table.getTable().setEnabled(false);
+ result = null;
+ } else {
+ table.getTable().setEnabled(true);
+ result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
+ }
+ setPageComplete(true);
+ }
+ });
}
/**
* Initializes states of the controls.
@@ -118,11 +119,17 @@ public class RepositorySelectionPage extends CVSWizardPage {
AdaptableList input = new AdaptableList(locations);
table.setInput(input);
if (locations.length == 0) {
- useNewRepo.setSelection(true);
+ useNewRepo.setSelection(true);
+ useExistingRepo.setSelection(false);
+ table.getTable().setEnabled(false);
} else {
- useExistingRepo.setSelection(true);
- table.setSelection(new StructuredSelection(locations[0]));
+ useNewRepo.setSelection(false);
+ useExistingRepo.setSelection(true);
+ table.getTable().setEnabled(true);
+ result = locations[0];
+ table.setSelection(new StructuredSelection(result));
}
+ setPageComplete(true);
}
public ICVSRepositoryLocation getLocation() {

Back to the top