directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1292339 - in /directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common: ./ widgets/browser/
Date Wed, 22 Feb 2012 15:13:13 GMT
Author: pamarcelot
Date: Wed Feb 22 15:13:13 2012
New Revision: 1292339

URL: http://svn.apache.org/viewvc?rev=1292339&view=rev
Log:
Fix for DIRSTUDIO-784 (Add the ability to sort searches in the LDAP Browser view) & DIRSTUDIO-785 (Add the ability to sort bookmarks in the LDAP Browser view).

Modified:
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserConfiguration.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserPreferences.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorterDialog.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages.properties
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_de.properties
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_fr.properties

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java Wed Feb 22 15:13:13 2012
@@ -81,6 +81,8 @@ public final class BrowserCommonConstant
     public static final String PREFERENCE_BROWSER_SORT_BY = "browserSortBy"; //$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_SORT_ORDER = "browserSortOrder"; //$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_SORT_LIMIT = "browserSortLimit"; //$NON-NLS-1$
+    public static final String PREFERENCE_BROWSER_SORT_SEARCHES_ORDER = "browserSortSearchesOrder"; //$NON-NLS-1$
+    public static final String PREFERENCE_BROWSER_SORT_BOOKMARKS_ORDER = "browserSortBookmarksOrder"; //$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_LEAF_ENTRIES_FIRST = "browserLeafEntriesFirst"; //$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_CONTAINER_ENTRIES_FIRST = "browserContainerEntriesFirst"; //$NON-NLS-1$
     public static final String PREFERENCE_BROWSER_META_ENTRIES_LAST = "browserMetaEntriesLast"; //$NON-NLS-1$

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java Wed Feb 22 15:13:13 2012
@@ -123,6 +123,10 @@ public class BrowserCommonPreferencesIni
         store.setDefault( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BY, BrowserCoreConstants.SORT_BY_RDN_VALUE );
         store.setDefault( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_ORDER,
             BrowserCoreConstants.SORT_ORDER_ASCENDING );
+        store.setDefault( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_SEARCHES_ORDER,
+            BrowserCoreConstants.SORT_ORDER_ASCENDING );
+        store.setDefault( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BOOKMARKS_ORDER,
+            BrowserCoreConstants.SORT_ORDER_ASCENDING );
         store.setDefault( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_LIMIT, 10000 );
         store.setDefault( BrowserCommonConstants.PREFERENCE_BROWSER_LEAF_ENTRIES_FIRST, true );
         store.setDefault( BrowserCommonConstants.PREFERENCE_BROWSER_CONTAINER_ENTRIES_FIRST, false );

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserConfiguration.java?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserConfiguration.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserConfiguration.java Wed Feb 22 15:13:13 2012
@@ -76,12 +76,6 @@ public class BrowserConfiguration
     {
         if ( !disposed )
         {
-            if ( sorter != null )
-            {
-                sorter.dispose();
-                sorter = null;
-            }
-
             if ( preferences != null )
             {
                 preferences.dispose();

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserPreferences.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserPreferences.java?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserPreferences.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserPreferences.java Wed Feb 22 15:13:13 2012
@@ -76,12 +76,12 @@ public class BrowserPreferences implemen
 
 
     /**
-     * Gets the sort by, one of BrowserCoreConstants.SORT_BY_NONE, 
+     * Gets the sort entries by, one of BrowserCoreConstants.SORT_BY_NONE, 
      * BrowserCoreConstants.SORT_BY_RDN or BrowserCoreConstants.SORT_BY_RDN_VALUE.
      * 
-     * @return the sort by
+     * @return the sort entries by
      */
-    public int getSortBy()
+    public int getSortEntriesBy()
     {
         return BrowserCommonActivator.getDefault().getPreferenceStore().getInt(
             BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BY );
@@ -89,12 +89,12 @@ public class BrowserPreferences implemen
 
 
     /**
-     * Gets the sort order, one of one of BrowserCoreConstants.SORT_ORDER_NONE, 
+     * Gets the sort entries order, one of one of BrowserCoreConstants.SORT_ORDER_NONE, 
      * BrowserCoreConstants.SORT_ORDER_ASCENDING or BrowserCoreConstants.SORT_ORDER_DESCENDING.
      * 
-     * @return the sort order
+     * @return the sort entries order
      */
-    public int getSortOrder()
+    public int getSortEntriesOrder()
     {
         return BrowserCommonActivator.getDefault().getPreferenceStore().getInt(
             BrowserCommonConstants.PREFERENCE_BROWSER_SORT_ORDER );
@@ -102,6 +102,32 @@ public class BrowserPreferences implemen
 
 
     /**
+     * Gets the searches sort order, one of one of BrowserCoreConstants.SORT_ORDER_NONE, 
+     * BrowserCoreConstants.SORT_ORDER_ASCENDING or BrowserCoreConstants.SORT_ORDER_DESCENDING.
+     * 
+     * @return the searches sort order
+     */
+    public int getSortSearchesOrder()
+    {
+        return BrowserCommonActivator.getDefault().getPreferenceStore().getInt(
+            BrowserCommonConstants.PREFERENCE_BROWSER_SORT_SEARCHES_ORDER );
+    }
+
+
+    /**
+     * Gets the bookmarks sort order, one of one of BrowserCoreConstants.SORT_ORDER_NONE, 
+     * BrowserCoreConstants.SORT_ORDER_ASCENDING or BrowserCoreConstants.SORT_ORDER_DESCENDING.
+     * 
+     * @return the sort order
+     */
+    public int getSortBookmarksOrder()
+    {
+        return BrowserCommonActivator.getDefault().getPreferenceStore().getInt(
+            BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BOOKMARKS_ORDER );
+    }
+
+
+    /**
      * Gets the sort limit.
      * 
      * @return the sort limit

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorter.java Wed Feb 22 15:13:13 2012
@@ -26,6 +26,7 @@ import java.math.BigInteger;
 import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
+import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
@@ -43,7 +44,6 @@ import org.eclipse.jface.viewers.ViewerS
  */
 public class BrowserSorter extends ViewerSorter
 {
-
     /** The browser preferences, used to get the sort settings */
     private BrowserPreferences preferences;
 
@@ -71,23 +71,14 @@ public class BrowserSorter extends Viewe
 
 
     /**
-     * Disposes this sorter.
-     */
-    public void dispose()
-    {
-    }
-
-
-    /**
      * {@inheritDoc}
      * 
-     * For performance reasons this implemention first checks if sorting is enabled 
+     * For performance reasons this implementation first checks if sorting is enabled 
      * and if the number of elements is less than the sort limit.
      */
     public void sort( final Viewer viewer, final Object[] elements )
     {
-        if ( elements != null && ( preferences.getSortLimit() <= 0 || elements.length < preferences.getSortLimit() )
-            && ( preferences.getSortBy() != BrowserCoreConstants.SORT_BY_NONE || preferences.isLeafEntriesFirst() ) )
+        if ( elements != null && ( preferences.getSortLimit() <= 0 || elements.length < preferences.getSortLimit() ) )
         {
             BrowserSorter.super.sort( viewer, elements );
         }
@@ -143,83 +134,101 @@ public class BrowserSorter extends Viewe
      */
     public int compare( Viewer viewer, Object o1, Object o2 )
     {
+        // o1 is StudioConnectionRunnableWithProgress
         if ( o1 instanceof StudioConnectionRunnableWithProgress )
         {
             StudioConnectionRunnableWithProgress runnable = ( StudioConnectionRunnableWithProgress ) o1;
+
             for ( Object lockedObject : runnable.getLockedObjects() )
             {
                 if ( lockedObject instanceof ISearch )
                 {
                     ISearch search = ( ISearch ) lockedObject;
+
                     if ( o1 == search.getTopSearchRunnable() )
                     {
-                        return lessThan();
+                        return lessThanEntries();
                     }
                     else if ( o1 == search.getNextSearchRunnable() )
                     {
-                        return greaterThan();
+                        return greaterThanEntries();
                     }
                 }
                 else if ( lockedObject instanceof IEntry )
                 {
                     IEntry entry = ( IEntry ) lockedObject;
+
                     if ( o1 == entry.getTopPageChildrenRunnable() )
                     {
-                        return lessThan();
+                        return lessThanEntries();
                     }
                     else if ( o1 == entry.getNextPageChildrenRunnable() )
                     {
-                        return greaterThan();
+                        return greaterThanEntries();
                     }
                 }
             }
-            return lessThan();
+
+            return lessThanEntries();
         }
+
+        // o2 is StudioConnectionRunnableWithProgress
         if ( o2 instanceof StudioConnectionRunnableWithProgress )
         {
             StudioConnectionRunnableWithProgress runnable = ( StudioConnectionRunnableWithProgress ) o2;
+
             for ( Object lockedObject : runnable.getLockedObjects() )
             {
                 if ( lockedObject instanceof ISearch )
                 {
                     ISearch search = ( ISearch ) lockedObject;
+
                     if ( o2 == search.getTopSearchRunnable() )
                     {
-                        return greaterThan();
+                        return greaterThanEntries();
                     }
                     else if ( o2 == search.getNextSearchRunnable() )
                     {
-                        return lessThan();
+                        return lessThanEntries();
                     }
                 }
                 else if ( lockedObject instanceof IEntry )
                 {
                     IEntry entry = ( IEntry ) lockedObject;
+
                     if ( o2 == entry.getTopPageChildrenRunnable() )
                     {
-                        return greaterThan();
+                        return greaterThanEntries();
                     }
                     else if ( o2 == entry.getNextPageChildrenRunnable() )
                     {
-                        return lessThan();
+                        return lessThanEntries();
                     }
                 }
             }
-            return greaterThan();
+
+            return greaterThanEntries();
         }
 
+        // o1 and o2 are null
         if ( o1 == null && o2 == null )
         {
             return equal();
         }
+
+        // o1 is null, o2 isn't
         else if ( o1 == null && o2 != null )
         {
-            return lessThan();
+            return lessThanEntries();
         }
+
+        // o1 isn't null, o1 is
         else if ( o1 != null && o2 == null )
         {
-            return greaterThan();
+            return greaterThanEntries();
         }
+
+        // o1 and o2 are entries
         else if ( o1 instanceof IEntry || o2 instanceof IEntry )
         {
             if ( !( o1 instanceof IEntry ) && !( o2 instanceof IEntry ) )
@@ -228,11 +237,11 @@ public class BrowserSorter extends Viewe
             }
             else if ( !( o1 instanceof IEntry ) && ( o2 instanceof IEntry ) )
             {
-                return lessThan();
+                return lessThanEntries();
             }
             else if ( ( o1 instanceof IEntry ) && !( o2 instanceof IEntry ) )
             {
-                return greaterThan();
+                return greaterThanEntries();
             }
             else
             {
@@ -241,19 +250,20 @@ public class BrowserSorter extends Viewe
 
                 int cat1 = category( entry1 );
                 int cat2 = category( entry2 );
+
                 if ( cat1 != cat2 )
                 {
                     return cat1 - cat2;
                 }
-                else if ( preferences.getSortBy() == BrowserCoreConstants.SORT_BY_NONE )
+                else if ( preferences.getSortEntriesBy() == BrowserCoreConstants.SORT_BY_NONE )
                 {
                     return equal();
                 }
-                else if ( preferences.getSortBy() == BrowserCoreConstants.SORT_BY_RDN )
+                else if ( preferences.getSortEntriesBy() == BrowserCoreConstants.SORT_BY_RDN )
                 {
                     return compareRdns( entry1, entry2 );
                 }
-                else if ( preferences.getSortBy() == BrowserCoreConstants.SORT_BY_RDN_VALUE )
+                else if ( preferences.getSortEntriesBy() == BrowserCoreConstants.SORT_BY_RDN_VALUE )
                 {
                     return compareRdnValues( entry1, entry2 );
                 }
@@ -263,6 +273,8 @@ public class BrowserSorter extends Viewe
                 }
             }
         }
+
+        // o1 and o2 are search results
         else if ( o1 instanceof ISearchResult || o2 instanceof ISearchResult )
         {
             if ( !( o1 instanceof ISearchResult ) && !( o2 instanceof ISearchResult ) )
@@ -271,11 +283,11 @@ public class BrowserSorter extends Viewe
             }
             else if ( !( o1 instanceof ISearchResult ) && ( o2 instanceof ISearchResult ) )
             {
-                return lessThan();
+                return lessThanEntries();
             }
             else if ( ( o1 instanceof ISearchResult ) && !( o2 instanceof ISearchResult ) )
             {
-                return greaterThan();
+                return greaterThanEntries();
             }
             else
             {
@@ -284,19 +296,20 @@ public class BrowserSorter extends Viewe
 
                 int cat1 = category( sr1 );
                 int cat2 = category( sr2 );
+
                 if ( cat1 != cat2 )
                 {
                     return cat1 - cat2;
                 }
-                else if ( preferences.getSortBy() == BrowserCoreConstants.SORT_BY_NONE )
+                else if ( preferences.getSortEntriesBy() == BrowserCoreConstants.SORT_BY_NONE )
                 {
                     return equal();
                 }
-                else if ( preferences.getSortBy() == BrowserCoreConstants.SORT_BY_RDN )
+                else if ( preferences.getSortEntriesBy() == BrowserCoreConstants.SORT_BY_RDN )
                 {
                     return compareRdns( sr1.getEntry(), sr2.getEntry() );
                 }
-                else if ( preferences.getSortBy() == BrowserCoreConstants.SORT_BY_RDN_VALUE )
+                else if ( preferences.getSortEntriesBy() == BrowserCoreConstants.SORT_BY_RDN_VALUE )
                 {
                     return compareRdnValues( sr1.getEntry(), sr2.getEntry() );
                 }
@@ -306,6 +319,68 @@ public class BrowserSorter extends Viewe
                 }
             }
         }
+
+        // o1 and o2 are searches
+        else if ( o1 instanceof ISearch || o2 instanceof ISearch )
+        {
+            if ( !( o1 instanceof ISearch ) && !( o2 instanceof ISearch ) )
+            {
+                return equal();
+            }
+            else if ( !( o1 instanceof ISearch ) && ( o2 instanceof ISearch ) )
+            {
+                return lessThanSearches();
+            }
+            else if ( ( o1 instanceof ISearch ) && !( o2 instanceof ISearch ) )
+            {
+                return greaterThanSearches();
+            }
+            else
+            {
+                ISearch s1 = ( ISearch ) o1;
+                ISearch s2 = ( ISearch ) o2;
+
+                if ( preferences.getSortSearchesOrder() == BrowserCoreConstants.SORT_ORDER_NONE )
+                {
+                    return equal();
+                }
+                else
+                {
+                    return compareSearches( s1.getName(), s2.getName() );
+                }
+            }
+        }
+
+        // o1 and o2 are bookmarks
+        else if ( o1 instanceof IBookmark || o2 instanceof IBookmark )
+        {
+            if ( !( o1 instanceof IBookmark ) && !( o2 instanceof IBookmark ) )
+            {
+                return equal();
+            }
+            else if ( !( o1 instanceof IBookmark ) && ( o2 instanceof IBookmark ) )
+            {
+                return lessThanBookmarks();
+            }
+            else if ( ( o1 instanceof IBookmark ) && !( o2 instanceof IBookmark ) )
+            {
+                return greaterThanBookmarks();
+            }
+            else
+            {
+                IBookmark b1 = ( IBookmark ) o1;
+                IBookmark b2 = ( IBookmark ) o2;
+
+                if ( preferences.getSortBookmarksOrder() == BrowserCoreConstants.SORT_ORDER_NONE )
+                {
+                    return equal();
+                }
+                else
+                {
+                    return compareBookmarks( b1.getName(), b2.getName() );
+                }
+            }
+        }
         else
         {
             return equal();
@@ -331,15 +406,15 @@ public class BrowserSorter extends Viewe
         }
         else if ( rdn1 == null && rdn2 != null )
         {
-            return greaterThan();
+            return greaterThanEntries();
         }
         else if ( rdn1 != null && rdn2 == null )
         {
-            return lessThan();
+            return lessThanEntries();
         }
         else
         {
-            return compare( rdn1.getName(), rdn2.getName() );
+            return compareEntries( rdn1.getName(), rdn2.getName() );
         }
     }
 
@@ -360,11 +435,11 @@ public class BrowserSorter extends Viewe
         }
         else if ( ( entry1 != null ) && ( entry2 == null ) )
         {
-            return greaterThan();
+            return greaterThanEntries();
         }
         else if ( ( entry1 == null ) && ( entry2 != null ) )
         {
-            return lessThan();
+            return lessThanEntries();
         }
         else
         {
@@ -379,12 +454,12 @@ public class BrowserSorter extends Viewe
             else if ( ( rdn1 == null || rdn1.getName() == null || "".equals( rdn1.getName() ) ) //$NON-NLS-1$
                 && !( rdn2 == null || rdn2.getName() == null || "".equals( rdn2.getName() ) ) ) //$NON-NLS-1$
             {
-                return greaterThan();
+                return greaterThanEntries();
             }
             else if ( !( rdn1 == null || rdn1.getName() == null || "".equals( rdn1.getName() ) ) //$NON-NLS-1$
                 && ( rdn2 == null || rdn2.getName() == null || "".equals( rdn2.getName() ) ) ) //$NON-NLS-1$
             {
-                return lessThan();
+                return lessThanEntries();
             }
 
             String rdn1Value = ( String ) rdn1.getName();
@@ -392,12 +467,12 @@ public class BrowserSorter extends Viewe
             if ( rdn1Value.matches( "\\d*" ) && !rdn2Value.matches( "\\d*" ) ) //$NON-NLS-1$ //$NON-NLS-2$
             {
                 // return lessThan();
-                return compare( rdn1Value, rdn2Value );
+                return compareEntries( rdn1Value, rdn2Value );
             }
             else if ( !rdn1Value.matches( "\\d*" ) && rdn2Value.matches( "\\d*" ) ) //$NON-NLS-1$ //$NON-NLS-2$
             {
                 // return greaterThan();
-                return compare( rdn1Value, rdn2Value );
+                return compareEntries( rdn1Value, rdn2Value );
             }
             else if ( rdn2Value.matches( "\\d*" ) && rdn2Value.matches( "\\d*" ) ) //$NON-NLS-1$ //$NON-NLS-2$
             {
@@ -409,20 +484,42 @@ public class BrowserSorter extends Viewe
             }
             else
             {
-                return compare( rdn1Value, rdn2Value );
+                return compareEntries( rdn1Value, rdn2Value );
             }
         }
     }
 
 
     /**
-     * Returns +1 or -1, depending on the sort order.
+     * Returns +1 or -1, depending on the sort entries order.
      *
-     * @return +1 or -1, depending on the sort order
+     * @return +1 or -1, depending on the sort entries order
      */
-    private int lessThan()
+    private int lessThanEntries()
     {
-        return preferences.getSortOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? -1 : 1;
+        return preferences.getSortEntriesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? -1 : 1;
+    }
+
+
+    /**
+     * Returns +1 or -1, depending on the sort searches order.
+     *
+     * @return +1 or -1, depending on the sort searches order
+     */
+    private int lessThanSearches()
+    {
+        return preferences.getSortSearchesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? -1 : 1;
+    }
+
+
+    /**
+     * Returns +1 or -1, depending on the sort entries order.
+     *
+     * @return +1 or -1, depending on the sort entries order
+     */
+    private int lessThanBookmarks()
+    {
+        return preferences.getSortBookmarksOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? -1 : 1;
     }
 
 
@@ -438,29 +535,83 @@ public class BrowserSorter extends Viewe
 
 
     /**
-     * Returns +1 or -1, depending on the sort order.
+     * Returns +1 or -1, depending on the sort entries order.
+     *
+     * @return +1 or -1, depending on the sort entries order
+     */
+    private int greaterThanEntries()
+    {
+        return preferences.getSortEntriesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? 1 : -1;
+    }
+
+
+    /**
+     * Returns +1 or -1, depending on the sort searches order.
+     *
+     * @return +1 or -1, depending on the sort searches order
+     */
+    private int greaterThanSearches()
+    {
+        return preferences.getSortSearchesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? 1 : -1;
+    }
+
+
+    /**
+     * Returns +1 or -1, depending on the sort bookmarks order.
      *
-     * @return +1 or -1, depending on the sort order
+     * @return +1 or -1, depending on the sort bookmarks order
      */
-    private int greaterThan()
+    private int greaterThanBookmarks()
     {
-        return preferences.getSortOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? 1 : -1;
+        return preferences.getSortBookmarksOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? 1 : -1;
     }
 
 
     /**
      * Compares the two strings using the Strings's compareToIgnoreCase method, 
-     * pays attention for the sort order.
+     * pays attention for the sort entries order.
      *
      * @param s1 the first string to compare
      * @param s2 the second string to compare
      * @return a negative integer, zero, or a positive integer
      * @see java.lang.String#compareToIgnoreCase(String)
      */
-    private int compare( String s1, String s2 )
+    private int compareEntries( String s1, String s2 )
     {
-        return preferences.getSortOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? s1.compareToIgnoreCase( s2 )
-            : s2.compareToIgnoreCase( s1 );
+        return preferences.getSortEntriesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? s1
+            .compareToIgnoreCase( s2 ) : s2.compareToIgnoreCase( s1 );
+    }
+
+
+    /**
+     * Compares the two strings using the Strings's compareToIgnoreCase method, 
+     * pays attention for the sort searches order.
+     *
+     * @param s1 the first string to compare
+     * @param s2 the second string to compare
+     * @return a negative integer, zero, or a positive integer
+     * @see java.lang.String#compareToIgnoreCase(String)
+     */
+    private int compareSearches( String s1, String s2 )
+    {
+        return preferences.getSortSearchesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? s1
+            .compareToIgnoreCase( s2 ) : s2.compareToIgnoreCase( s1 );
+    }
+
+
+    /**
+     * Compares the two strings using the Strings's compareToIgnoreCase method, 
+     * pays attention for the sort bookmarks order.
+     *
+     * @param s1 the first string to compare
+     * @param s2 the second string to compare
+     * @return a negative integer, zero, or a positive integer
+     * @see java.lang.String#compareToIgnoreCase(String)
+     */
+    private int compareBookmarks( String s1, String s2 )
+    {
+        return preferences.getSortBookmarksOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? s1
+            .compareToIgnoreCase( s2 ) : s2.compareToIgnoreCase( s1 );
     }
 
 
@@ -476,8 +627,7 @@ public class BrowserSorter extends Viewe
      */
     private int compare( BigInteger bi1, BigInteger bi2 )
     {
-        return preferences.getSortOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? bi1.compareTo( bi2 ) : bi2
-            .compareTo( bi1 );
+        return preferences.getSortEntriesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING ? bi1.compareTo( bi2 )
+            : bi2.compareTo( bi1 );
     }
-
 }

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorterDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorterDialog.java?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorterDialog.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserSorterDialog.java Wed Feb 22 15:13:13 2012
@@ -50,7 +50,6 @@ import org.eclipse.swt.widgets.Text;
  */
 public class BrowserSorterDialog extends Dialog
 {
-
     /** The dialog title. */
     public static final String DIALOG_TITLE = Messages.getString( "BrowserSorterDialog.BrowserSorting" ); //$NON-NLS-1$
 
@@ -66,15 +65,6 @@ public class BrowserSorterDialog extends
     /** The browser preferences. */
     private BrowserPreferences preferences;
 
-    /** The sort by combo. */
-    private Combo sortByCombo;
-
-    /** The sort acending button. */
-    private Button sortAcendingButton;
-
-    /** The sort descending button. */
-    private Button sortDescendingButton;
-
     /** The leaf entries first button. */
     private Button leafEntriesFirstButton;
 
@@ -87,6 +77,33 @@ public class BrowserSorterDialog extends
     /** The meta entries last button. */
     private Button metaEntriesLastButton;
 
+    /** The sort entries by combo. */
+    private Combo sortEntriesByCombo;
+
+    /** The sort entries ascending button. */
+    private Button sortEntriesAscendingButton;
+
+    /** The sort entries descending button. */
+    private Button sortEntriesDescendingButton;
+
+    /** The sort searches ascending button. */
+    private Button sortSearchesAscendingButton;
+
+    /** The sort searches descending button. */
+    private Button sortSearchesDescendingButton;
+
+    /** The sort searches none button. */
+    private Button sortSearchesNoSortingButton;
+
+    /** The sort bookmarks ascending button. */
+    private Button sortBookmarksAscendingButton;
+
+    /** The sort bookmarks descending button. */
+    private Button sortBookmarksDescendingButton;
+
+    /** The sort bookmarks none button. */
+    private Button sortBookmarksNoSortingButton;
+
     /** The sort limit text. */
     private Text sortLimitText;
 
@@ -135,19 +152,55 @@ public class BrowserSorterDialog extends
             }
 
             IPreferenceStore store = BrowserCommonActivator.getDefault().getPreferenceStore();
+
             store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_LEAF_ENTRIES_FIRST, leafEntriesFirstButton
                 .getSelection() );
             store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_CONTAINER_ENTRIES_FIRST,
                 containerEntriesFirstButton.getSelection() );
             store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_META_ENTRIES_LAST, metaEntriesLastButton
                 .getSelection() );
-            store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_LIMIT, sortLimit );
+
             store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_ORDER,
-                sortDescendingButton.getSelection() ? BrowserCoreConstants.SORT_ORDER_DESCENDING
+                sortEntriesDescendingButton.getSelection() ? BrowserCoreConstants.SORT_ORDER_DESCENDING
                     : BrowserCoreConstants.SORT_ORDER_ASCENDING );
             store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BY,
-                sortByCombo.getSelectionIndex() == 2 ? BrowserCoreConstants.SORT_BY_RDN_VALUE : sortByCombo
-                    .getSelectionIndex() == 1 ? BrowserCoreConstants.SORT_BY_RDN : BrowserCoreConstants.SORT_BY_NONE );
+                sortEntriesByCombo.getSelectionIndex() == 2 ? BrowserCoreConstants.SORT_BY_RDN_VALUE
+                    : sortEntriesByCombo
+                        .getSelectionIndex() == 1 ? BrowserCoreConstants.SORT_BY_RDN
+                        : BrowserCoreConstants.SORT_BY_NONE );
+            store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_LIMIT, sortLimit );
+
+            if ( sortSearchesAscendingButton.getSelection() )
+            {
+                store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_SEARCHES_ORDER,
+                    BrowserCoreConstants.SORT_ORDER_ASCENDING );
+            }
+            else if ( sortSearchesDescendingButton.getSelection() )
+            {
+                store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_SEARCHES_ORDER,
+                    BrowserCoreConstants.SORT_ORDER_DESCENDING );
+            }
+            else if ( sortSearchesNoSortingButton.getSelection() )
+            {
+                store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_SEARCHES_ORDER,
+                    BrowserCoreConstants.SORT_ORDER_NONE );
+            }
+
+            if ( sortBookmarksAscendingButton.getSelection() )
+            {
+                store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BOOKMARKS_ORDER,
+                    BrowserCoreConstants.SORT_ORDER_ASCENDING );
+            }
+            else if ( sortBookmarksDescendingButton.getSelection() )
+            {
+                store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BOOKMARKS_ORDER,
+                    BrowserCoreConstants.SORT_ORDER_DESCENDING );
+            }
+            else if ( sortBookmarksNoSortingButton.getSelection() )
+            {
+                store.setValue( BrowserCommonConstants.PREFERENCE_BROWSER_SORT_BOOKMARKS_ORDER,
+                    BrowserCoreConstants.SORT_ORDER_NONE );
+            }
         }
         else
         {
@@ -163,74 +216,188 @@ public class BrowserSorterDialog extends
      */
     protected Control createDialogArea( Composite parent )
     {
-
         Composite composite = ( Composite ) super.createDialogArea( parent );
         GridData gd = new GridData( GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL );
         gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
         composite.setLayoutData( gd );
 
-        Group groupingGroup = BaseWidgetUtils.createGroup( composite, Messages
+        createGroupEntriesGroup( composite );
+        createSortEntriesGroup( composite );
+        createSortSearchesGroup( composite );
+        createSortBookmarksGroup( composite );
+        createSortLimitGroup( composite );
+
+        applyDialogFont( composite );
+        return composite;
+    }
+
+
+    /**
+     * Creates the group entries group.
+     *
+     * @param composite the parent composite
+     */
+    private void createGroupEntriesGroup( Composite composite )
+    {
+        // Group entries group and composite
+        Group groupEntriesGroup = BaseWidgetUtils.createGroup( composite, Messages
             .getString( "BrowserSorterDialog.GroupEntries" ), 1 ); //$NON-NLS-1$
-        Composite columGroup = BaseWidgetUtils.createColumnContainer( groupingGroup, 3, 1 );
+        Composite groupEntriesButtonsComposite = BaseWidgetUtils.createColumnContainer( groupEntriesGroup, 3, 1 );
 
-        leafEntriesFirstButton = BaseWidgetUtils.createRadiobutton( columGroup, Messages
+        // Leaf entries first button
+        leafEntriesFirstButton = BaseWidgetUtils.createRadiobutton( groupEntriesButtonsComposite, Messages
             .getString( "BrowserSorterDialog.LeafEntriesFirst" ), 1 ); //$NON-NLS-1$
         leafEntriesFirstButton.setToolTipText( Messages.getString( "BrowserSorterDialog.LeafEntriesFirstToolTip" ) ); //$NON-NLS-1$
         leafEntriesFirstButton.setSelection( preferences.isLeafEntriesFirst() );
 
-        containerEntriesFirstButton = BaseWidgetUtils.createRadiobutton( columGroup, Messages
+        // Container entries first button
+        containerEntriesFirstButton = BaseWidgetUtils.createRadiobutton( groupEntriesButtonsComposite, Messages
             .getString( "BrowserSorterDialog.ContainerEntriesFirst" ), 1 ); //$NON-NLS-1$
         containerEntriesFirstButton.setToolTipText( Messages
             .getString( "BrowserSorterDialog.ContainerEntriesFirstToolTip" ) ); //$NON-NLS-1$
         containerEntriesFirstButton.setSelection( preferences.isContainerEntriesFirst() );
 
-        mixedButton = BaseWidgetUtils.createRadiobutton( columGroup,
+        // Mixed button
+        mixedButton = BaseWidgetUtils.createRadiobutton( groupEntriesButtonsComposite,
             Messages.getString( "BrowserSorterDialog.Mixed" ), 1 ); //$NON-NLS-1$
         mixedButton.setToolTipText( Messages.getString( "BrowserSorterDialog.MixedToolTip" ) ); //$NON-NLS-1$
         mixedButton.setSelection( !preferences.isLeafEntriesFirst() && !preferences.isContainerEntriesFirst() );
 
-        metaEntriesLastButton = BaseWidgetUtils.createCheckbox( groupingGroup, Messages
+        // Meta entries last button
+        metaEntriesLastButton = BaseWidgetUtils.createCheckbox( groupEntriesGroup, Messages
             .getString( "BrowserSorterDialog.MetaEntriesLast" ), 1 ); //$NON-NLS-1$
         metaEntriesLastButton.setToolTipText( Messages.getString( "BrowserSorterDialog.MetaEntriesLastToolTip" ) ); //$NON-NLS-1$
         metaEntriesLastButton.setSelection( preferences.isMetaEntriesLast() );
+    }
 
-        Group sortingGroup = BaseWidgetUtils.createGroup( composite, Messages
+
+    /**
+     * Creates the sort entries group.
+     *
+     * @param composite the parent composite
+     */
+    private void createSortEntriesGroup( Composite composite )
+    {
+        // Sort entries group and composite
+        Group sortEntriesGroup = BaseWidgetUtils.createGroup( composite, Messages
             .getString( "BrowserSorterDialog.SortEntries" ), 1 ); //$NON-NLS-1$
+        Composite sortByComposite = BaseWidgetUtils.createColumnContainer( sortEntriesGroup, 4, 1 );
 
-        Composite sortByComposite = BaseWidgetUtils.createColumnContainer( sortingGroup, 4, 1 );
+        // Sort entries by combo
         BaseWidgetUtils.createLabel( sortByComposite, Messages.getString( "BrowserSorterDialog.SortBy" ), 1 ); //$NON-NLS-1$
-        sortByCombo = BaseWidgetUtils.createReadonlyCombo( sortByComposite, new String[]
+        sortEntriesByCombo = BaseWidgetUtils.createReadonlyCombo( sortByComposite, new String[]
             { SORT_BY_NONE, SORT_BY_RDN, SORT_BY_RDN_VALUE }, 0, 1 );
-        sortByCombo.select( preferences.getSortBy() == BrowserCoreConstants.SORT_BY_RDN_VALUE ? 2 : preferences
-            .getSortBy() == BrowserCoreConstants.SORT_BY_RDN ? 1 : 0 );
-        sortByCombo.addSelectionListener( new SelectionAdapter()
+        sortEntriesByCombo.select( preferences.getSortEntriesBy() == BrowserCoreConstants.SORT_BY_RDN_VALUE ? 2
+            : preferences
+                .getSortEntriesBy() == BrowserCoreConstants.SORT_BY_RDN ? 1 : 0 );
+        sortEntriesByCombo.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
             {
-                sortAcendingButton.setEnabled( sortByCombo.getSelectionIndex() != 0 );
-                sortDescendingButton.setEnabled( sortByCombo.getSelectionIndex() != 0 );
-                sortLimitText.setEnabled( sortByCombo.getSelectionIndex() != 0 );
+                sortEntriesAscendingButton.setEnabled( sortEntriesByCombo.getSelectionIndex() != 0 );
+                sortEntriesDescendingButton.setEnabled( sortEntriesByCombo.getSelectionIndex() != 0 );
             }
         } );
 
-        sortAcendingButton = BaseWidgetUtils.createRadiobutton( sortByComposite, Messages
+        // Sort entries ascending button
+        sortEntriesAscendingButton = BaseWidgetUtils.createRadiobutton( sortByComposite, Messages
+            .getString( "BrowserSorterDialog.Ascending" ), 1 ); //$NON-NLS-1$
+        sortEntriesAscendingButton
+            .setSelection( preferences.getSortEntriesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING );
+        sortEntriesAscendingButton.setEnabled( sortEntriesByCombo.getSelectionIndex() != 0 );
+
+        // Sort entries descending button
+        sortEntriesDescendingButton = BaseWidgetUtils.createRadiobutton( sortByComposite, Messages
+            .getString( "BrowserSorterDialog.Descending" ), 1 ); //$NON-NLS-1$
+        sortEntriesDescendingButton
+            .setSelection( preferences.getSortEntriesOrder() == BrowserCoreConstants.SORT_ORDER_DESCENDING );
+        sortEntriesDescendingButton.setEnabled( sortEntriesByCombo.getSelectionIndex() != 0 );
+    }
+
+
+    /**
+     * Creates the sort searches group.
+     *
+     * @param parent the parent composite
+     */
+    private void createSortSearchesGroup( Composite parent )
+    {
+        // Sort searches group and composite
+        Group sortSearchesGroup = BaseWidgetUtils.createGroup( parent, Messages
+            .getString( "BrowserSorterDialog.SortSearches" ), 1 ); //$NON-NLS-1$
+        Composite sortSearchesComposite = BaseWidgetUtils.createColumnContainer( sortSearchesGroup, 3, 1 );
+
+        // Sort searches ascending button
+        sortSearchesAscendingButton = BaseWidgetUtils.createRadiobutton( sortSearchesComposite, Messages
+            .getString( "BrowserSorterDialog.Ascending" ), 1 ); //$NON-NLS-1$
+        sortSearchesAscendingButton
+            .setSelection( preferences.getSortSearchesOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING );
+
+        // Sort searches descending button
+        sortSearchesDescendingButton = BaseWidgetUtils.createRadiobutton( sortSearchesComposite, Messages
+            .getString( "BrowserSorterDialog.Descending" ), 1 ); //$NON-NLS-1$
+        sortSearchesDescendingButton
+            .setSelection( preferences.getSortSearchesOrder() == BrowserCoreConstants.SORT_ORDER_DESCENDING );
+
+        // Sort searches none button
+        sortSearchesNoSortingButton = BaseWidgetUtils.createRadiobutton( sortSearchesComposite, Messages
+            .getString( "BrowserSorterDialog.NoSorting" ), 1 ); //$NON-NLS-1$
+        sortSearchesNoSortingButton
+            .setSelection( preferences.getSortSearchesOrder() == BrowserCoreConstants.SORT_ORDER_NONE );
+    }
+
+
+    /**
+     * Creates the sort bookmarks group.
+     *
+     * @param parent the parent composite
+     */
+    private void createSortBookmarksGroup( Composite parent )
+    {
+        // Sort bookmarks group and composite
+        Group sortBookmarksGroup = BaseWidgetUtils.createGroup( parent, Messages
+            .getString( "BrowserSorterDialog.SortBookmarks" ), 1 ); //$NON-NLS-1$
+        Composite sortBookmarksComposite = BaseWidgetUtils.createColumnContainer( sortBookmarksGroup, 3, 1 );
+
+        // Sort bookmarks ascending button
+        sortBookmarksAscendingButton = BaseWidgetUtils.createRadiobutton( sortBookmarksComposite, Messages
             .getString( "BrowserSorterDialog.Ascending" ), 1 ); //$NON-NLS-1$
-        sortAcendingButton.setSelection( preferences.getSortOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING );
-        sortAcendingButton.setEnabled( sortByCombo.getSelectionIndex() != 0 );
+        sortBookmarksAscendingButton
+            .setSelection( preferences.getSortBookmarksOrder() == BrowserCoreConstants.SORT_ORDER_ASCENDING );
 
-        sortDescendingButton = BaseWidgetUtils.createRadiobutton( sortByComposite, Messages
+        // Sort bookmarks descending button
+        sortBookmarksDescendingButton = BaseWidgetUtils.createRadiobutton( sortBookmarksComposite, Messages
             .getString( "BrowserSorterDialog.Descending" ), 1 ); //$NON-NLS-1$
-        sortDescendingButton.setSelection( preferences.getSortOrder() == BrowserCoreConstants.SORT_ORDER_DESCENDING );
-        sortDescendingButton.setEnabled( sortByCombo.getSelectionIndex() != 0 );
+        sortBookmarksDescendingButton
+            .setSelection( preferences.getSortBookmarksOrder() == BrowserCoreConstants.SORT_ORDER_DESCENDING );
+
+        // Sort bookmarks none button
+        sortBookmarksNoSortingButton = BaseWidgetUtils.createRadiobutton( sortBookmarksComposite, Messages
+            .getString( "BrowserSorterDialog.NoSorting" ), 1 ); //$NON-NLS-1$
+        sortBookmarksNoSortingButton
+            .setSelection( preferences.getSortBookmarksOrder() == BrowserCoreConstants.SORT_ORDER_NONE );
+    }
 
-        Composite sortLimitComposite = BaseWidgetUtils.createColumnContainer( sortingGroup, 2, 1 );
+
+    /**
+     * Creates the sort limit group.
+     *
+     * @param composite the parent composite
+     */
+    private void createSortLimitGroup( Composite composite )
+    {
+        // Sort limit group and composite
+        Group sortLimitGroup = BaseWidgetUtils.createGroup( composite, Messages
+            .getString( "BrowserSorterDialog.SortLimit" ), 1 ); //$NON-NLS-1$
+        Composite sortLimitComposite = BaseWidgetUtils.createColumnContainer( sortLimitGroup, 2, 1 );
+
+        // Sort limit text
         String sortLimitTooltip = Messages.getString( "BrowserSorterDialog.SortLimitToolTip" ); //$NON-NLS-1$
         Label sortLimitLabel = BaseWidgetUtils.createLabel( sortLimitComposite, Messages
-            .getString( "BrowserSorterDialog.SortLimit" ), 1 ); //$NON-NLS-1$
+            .getString( "BrowserSorterDialog.SortLimitColon" ), 1 ); //$NON-NLS-1$
         sortLimitLabel.setToolTipText( sortLimitTooltip );
         sortLimitText = BaseWidgetUtils.createText( sortLimitComposite, "" + preferences.getSortLimit(), 5, 1 ); //$NON-NLS-1$
         sortLimitText.setToolTipText( sortLimitTooltip );
-        sortLimitText.setEnabled( sortByCombo.getSelectionIndex() != 0 );
         sortLimitText.addVerifyListener( new VerifyListener()
         {
             public void verifyText( VerifyEvent e )
@@ -241,9 +408,5 @@ public class BrowserSorterDialog extends
                 }
             }
         } );
-
-        applyDialogFont( composite );
-        return composite;
     }
-
 }

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages.properties?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages.properties (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages.properties Wed Feb 22 15:13:13 2012
@@ -41,8 +41,11 @@ BrowserSorterDialog.RDN=RDN
 BrowserSorterDialog.RDNValue=RDN Value
 BrowserSorterDialog.SortBy=Sort by
 BrowserSorterDialog.SortEntries=Sort entries
-BrowserSorterDialog.SortLimit=Sort limit:
+BrowserSorterDialog.SortLimit=Sort limit
+BrowserSorterDialog.SortLimitColon=Sort limit:
 BrowserSorterDialog.SortLimitToolTip=If there are more than the specified number of children they won't be sorted. Hint: For performance reason the maximum value should be 10.000\!
+BrowserSorterDialog.SortSearches=Sort searches
+BrowserSorterDialog.SortBookmarks=Sort bookmarks
 OpenSortDialogAction.Sorting=Sorting...
 ShowQuickSearchAction.ShowQuickSearch=Show Quick Search
 BrowserQuickSearchWidget.9=\!=

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_de.properties?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_de.properties (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_de.properties Wed Feb 22 15:13:13 2012
@@ -41,8 +41,11 @@ BrowserSorterDialog.RDN=RDN
 BrowserSorterDialog.RDNValue=RDN Wert
 BrowserSorterDialog.SortBy=Sortieren nach
 BrowserSorterDialog.SortEntries=Eintr\u00E4ge sortieren
-BrowserSorterDialog.SortLimit=Sortier-Limit:
+BrowserSorterDialog.SortLimit=Sortier-Limit
+BrowserSorterDialog.SortLimitColon=Sortier-Limit:
 BrowserSorterDialog.SortLimitToolTip=Bei mehr Eintr\u00E4gen wird keine Sortierung durchgef\u00FChrt. Hinweis: Der Wert sollte 10000 nicht \u00FCbersteigen\!
+BrowserSorterDialog.SortSearches=Suchen sortieren
+BrowserSorterDialog.SortBookmarks=Lesezeichen sortieren
 OpenSortDialogAction.Sorting=Sortierung...
 BrowserQuickSearchWidget.RunQuickSearch=Schnellsuche ausf\u00FChren
 BrowserQuickSearchWidget.QuickSearch=Schnellsuche

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_fr.properties?rev=1292339&r1=1292338&r2=1292339&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_fr.properties (original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/messages_fr.properties Wed Feb 22 15:13:13 2012
@@ -41,8 +41,11 @@ BrowserSorterDialog.RDN=RDN
 BrowserSorterDialog.RDNValue=Valeur de RDN
 BrowserSorterDialog.SortBy=Trier par
 BrowserSorterDialog.SortEntries=Tri des entr\u00E9es
-BrowserSorterDialog.SortLimit=Limite de tri:
+BrowserSorterDialog.SortLimit=Limite de tri
+BrowserSorterDialog.SortLimitColon=Limite de tri:
 BrowserSorterDialog.SortLimitToolTip=S'il y a plus de fils que la valeur sp\u00E9cifi\u00E9e, le tri ne sera pas effectu\u00E9. Conseil: Pour des raisons de performance, la valeur maximale ne devrait pas d\u00E9passer 10 000 \!
+BrowserSorterDialog.SortSearches=Tri des recherches
+BrowserSorterDialog.SortBookmarks=Tri des signets
 OpenSortDialogAction.Sorting=Tri...
 BrowserQuickSearchWidget.RunQuickSearch=Lancer la recherche rapide
 BrowserQuickSearchWidget.QuickSearch=Recherche rapide



Mime
View raw message