Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.explorer.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/SwitchToActionProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/wizards/CheckoutRepositoryPage.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/SwitchToActionProvider.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/SwitchToActionProvider.java
index 42231ee74d..d36823eb72 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/SwitchToActionProvider.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/SwitchToActionProvider.java
@@ -35,7 +35,7 @@ public class SwitchToActionProvider extends AbstractBranchPointActionProvider
@Override
protected void fillSubMenu(IWorkbenchPage page, IMenuManager subMenu, CDOCheckout checkout)
{
- if (checkout.isOnline())
+ if (CDOCheckout.TYPE_ONLINE_TRANSACTIONAL.equals(checkout.getType()))
{
subMenu.add(new SwitchToNewBranchAction(page, checkout));
}
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/wizards/CheckoutRepositoryPage.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/wizards/CheckoutRepositoryPage.java
index e8709c1a29..b74a71a166 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/wizards/CheckoutRepositoryPage.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/wizards/CheckoutRepositoryPage.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.explorer.ui.checkouts.wizards;
import org.eclipse.emf.cdo.explorer.CDOExplorerUtil;
import org.eclipse.emf.cdo.explorer.repositories.CDORepository;
+import org.eclipse.emf.cdo.explorer.repositories.CDORepositoryManager;
import org.eclipse.emf.cdo.explorer.ui.repositories.CDORepositoriesView;
import org.eclipse.emf.cdo.explorer.ui.repositories.CDORepositoryItemProvider;
import org.eclipse.emf.cdo.internal.explorer.checkouts.CDOCheckoutImpl;
@@ -136,6 +137,17 @@ public class CheckoutRepositoryPage extends CheckoutWizardPage
}
});
+ if (repository == null)
+ {
+ CDORepositoryManager repositoryManager = CDOExplorerUtil.getRepositoryManager();
+ CDORepository[] repositories = repositoryManager.getRepositories();
+ if (repositories.length != 0)
+ {
+ setRepository(repositories[0]);
+ tableViewer.setSelection(new StructuredSelection(repositories[0]));
+ }
+ }
+
tableViewer.addDoubleClickListener(new IDoubleClickListener()
{
public void doubleClick(DoubleClickEvent event)

Back to the top