[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-dev] Sorted repository list when sharing a project

From: Jörg Eichhorn <jeichhorn_at_gmail.com>
Date: 2006-01-21 20:06:02 CET

Hello,

when sharing a project the list of existing repositories is unsorted.
This makes it really hard to find the correct repository when having a
lot of repositories configured in subclipse.

The attached patch which fixed this small issue was made using the 1.0.x
branch.
Maybe this can be integrated before the final release of subclipse 1.0.0
is made.

Jörg

Index: src/org/tigris/subversion/subclipse/ui/wizards/sharing/RepositorySelectionPage.java
===================================================================
--- src/org/tigris/subversion/subclipse/ui/wizards/sharing/RepositorySelectionPage.java (revision 2056)
+++ src/org/tigris/subversion/subclipse/ui/wizards/sharing/RepositorySelectionPage.java (working copy)
@@ -12,6 +12,8 @@
 package org.tigris.subversion.subclipse.ui.wizards.sharing;
 
 
+import java.util.Arrays;
+
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ColumnWeightData;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -32,6 +34,7 @@
 import org.eclipse.ui.model.WorkbenchContentProvider;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
 import org.tigris.subversion.subclipse.core.ISVNRepositoryLocation;
+import org.tigris.subversion.subclipse.core.repo.RepositoryComparator;
 import org.tigris.subversion.subclipse.ui.IHelpContextIds;
 import org.tigris.subversion.subclipse.ui.Policy;
 import org.tigris.subversion.subclipse.ui.SVNUIPlugin;
@@ -118,6 +121,7 @@
                 setControl(composite);
 
         ISVNRepositoryLocation[] locations = SVNUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryLocations();
+ Arrays.sort(locations, new RepositoryComparator());
         AdaptableList input = new AdaptableList(locations);
         table.setInput(input);
         if (locations.length == 0) {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: dev-help@subclipse.tigris.org
Received on Sat Jan 21 20:06:27 2006

This is an archived mail posted to the Subclipse Dev mailing list.