Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java45
1 files changed, 21 insertions, 24 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 51f150e8f..6335babb7 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ import org.eclipse.ui.model.*;
public class RepositorySelectionPage extends CVSWizardPage {
private class DecoratingRepoLabelProvider extends WorkbenchLabelProvider {
+ @Override
protected String decorateText(String input, Object element) {
//Used to process RTL locales only
return TextProcessor.process(input, ":@/"); //$NON-NLS-1$
@@ -78,6 +79,7 @@ public class RepositorySelectionPage extends CVSWizardPage {
*
* @param parent the parent of the created widgets
*/
+ @Override
public void createControl(Composite parent) {
Composite composite = createComposite(parent, 1, false);
// set F1 help
@@ -91,6 +93,7 @@ public class RepositorySelectionPage extends CVSWizardPage {
useExistingRepo = createRadioButton(composite, CVSUIMessages.RepositorySelectionPage_useExisting, 1);
useExistingRepo.addKeyListener(new KeyAdapter() {
+ @Override
public void keyPressed(KeyEvent e) {
if (table.getTable().getItemCount() > 0) {
table.getTable().setFocus();
@@ -103,12 +106,9 @@ public class RepositorySelectionPage extends CVSWizardPage {
table.setContentProvider(new WorkbenchContentProvider());
table.setLabelProvider(new DecoratingRepoLabelProvider()/*WorkbenchLabelProvider()*/);
table.setComparator(new RepositoryComparator());
- table.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- getContainer().showPage(getNextPage());
- }
- });
+ table.addDoubleClickListener(event -> getContainer().showPage(getNextPage()));
table.getTable().addKeyListener(new KeyAdapter() {
+ @Override
public void keyPressed(KeyEvent e) {
traverseRepositories(e.character);
}
@@ -119,25 +119,21 @@ public class RepositorySelectionPage extends CVSWizardPage {
initializeValues();
Dialog.applyDialogFont(parent);
- table.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
- setPageComplete(true);
- }
- });
+ table.addSelectionChangedListener(event -> {
+ result = (ICVSRepositoryLocation)table.getStructuredSelection().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);
- }
- });
+ useExistingRepo.addListener(SWT.Selection, event -> {
+ if (useNewRepo.getSelection()) {
+ table.getTable().setEnabled(false);
+ result = null;
+ } else {
+ table.getTable().setEnabled(true);
+ result = (ICVSRepositoryLocation)table.getStructuredSelection().getFirstElement();
+ }
+ setPageComplete(true);
+ });
}
/**
* Initializes states of the controls.
@@ -163,6 +159,7 @@ public class RepositorySelectionPage extends CVSWizardPage {
public ICVSRepositoryLocation getLocation() {
return result;
}
+ @Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible) {

Back to the top