directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r822626 - in /directory/studio/trunk: ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/ ldapbrowser-core...
Date Wed, 07 Oct 2009 09:05:53 GMT
Author: seelmann
Date: Wed Oct  7 09:05:52 2009
New Revision: 822626

URL: http://svn.apache.org/viewvc?rev=822626&view=rev
Log:
Use varargs

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java?rev=822626&r1=822625&r2=822626&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java
Wed Oct  7 09:05:52 2009
@@ -58,23 +58,23 @@
     {
         if ( getSelectedEntries().length == 1 )
         {
-            FilterWidgetDialog dialog = new FilterWidgetDialog( getShell(), Messages.getString("FilterChildrenAction.FilterChildren"),
getSelectedEntries()[0] //$NON-NLS-1$
-                .getChildrenFilter(), getSelectedEntries()[0].getBrowserConnection() );
+            IEntry entry = getSelectedEntries()[0];
+            FilterWidgetDialog dialog = new FilterWidgetDialog( getShell(), Messages
+                .getString( "FilterChildrenAction.FilterChildren" ), //$NON-NLS-1$
+                entry.getChildrenFilter(), entry.getBrowserConnection() );
             if ( dialog.open() == Dialog.OK )
             {
                 String newFilter = dialog.getFilter();
 
                 if ( newFilter == null || "".equals( newFilter.trim() ) ) //$NON-NLS-1$
                 {
-                    getSelectedEntries()[0].setChildrenFilter( null );
+                    entry.setChildrenFilter( null );
                 }
                 else
                 {
-                    getSelectedEntries()[0].setChildrenFilter( newFilter.trim() );
+                    entry.setChildrenFilter( newFilter.trim() );
                 }
-                new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
-                    { getSelectedEntries()[0] }, true ) ).execute();
-
+                new StudioBrowserJob( new InitializeChildrenRunnable( true, entry ) ).execute();
             }
         }
     }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java?rev=822626&r1=822625&r2=822626&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
Wed Oct  7 09:05:52 2009
@@ -134,8 +134,8 @@
 
         if ( entries.size() > 0 )
         {
-            InitializeChildrenRunnable initializeChildrenRunnable = new InitializeChildrenRunnable(
entries
-                .toArray( new IEntry[0] ), true );
+            InitializeChildrenRunnable initializeChildrenRunnable = new InitializeChildrenRunnable(
true, entries
+                .toArray( new IEntry[0] ) );
             new StudioBrowserJob( initializeChildrenRunnable ).execute();
         }
         if ( searches.length > 0 )

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java?rev=822626&r1=822625&r2=822626&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java
Wed Oct  7 09:05:52 2009
@@ -53,9 +53,9 @@
     {
         if ( getSelectedEntries().length == 1 )
         {
-            getSelectedEntries()[0].setChildrenFilter( null );
-            new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
-                { getSelectedEntries()[0] }, true ) ).execute();
+            IEntry entry = getSelectedEntries()[0];
+            entry.setChildrenFilter( null );
+            new StudioBrowserJob( new InitializeChildrenRunnable( true, entry ) ).execute();
         }
     }
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java?rev=822626&r1=822625&r2=822626&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
Wed Oct  7 09:05:52 2009
@@ -310,8 +310,7 @@
 
             if ( !rootDSE.isChildrenInitialized() )
             {
-                new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
-                    { rootDSE }, false ) ).execute();
+                new StudioBrowserJob( new InitializeChildrenRunnable( false, rootDSE ) ).execute();
                 return new String[]
                     { Messages.getString( "BrowserContentProvider.FetchingEntries" ) }; //$NON-NLS-1$
             }
@@ -338,8 +337,7 @@
 
             if ( !parentEntry.isChildrenInitialized() )
             {
-                new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
-                    { parentEntry }, false ) ).execute();
+                new StudioBrowserJob( new InitializeChildrenRunnable( false, parentEntry
) ).execute();
                 return new String[]
                     { Messages.getString( "BrowserContentProvider.FetchingEntries" ) }; //$NON-NLS-1$
             }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java?rev=822626&r1=822625&r2=822626&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java
Wed Oct  7 09:05:52 2009
@@ -72,7 +72,7 @@
      * @param entries the entries
      * @param purgeAllCaches true to purge all caches
      */
-    public InitializeChildrenRunnable( IEntry[] entries, boolean purgeAllCaches )
+    public InitializeChildrenRunnable( boolean purgeAllCaches, IEntry... entries )
     {
         this.entries = entries;
         this.purgeAllCaches = purgeAllCaches;

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java?rev=822626&r1=822625&r2=822626&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
Wed Oct  7 09:05:52 2009
@@ -258,8 +258,7 @@
     {
         IEntry entry = EntryPropertyPage.getEntry( getElement() );
         entry.setInitOperationalAttributes( true );
-        InitializeChildrenRunnable runnable1 = new InitializeChildrenRunnable( new IEntry[]
-            { entry }, false );
+        InitializeChildrenRunnable runnable1 = new InitializeChildrenRunnable( false, entry
);
         InitializeAttributesRunnable runnable2 = new InitializeAttributesRunnable( entry
);
         RunnableContextRunner.execute( runnable1, null, true );
         RunnableContextRunner.execute( runnable2, null, true );



Mime
View raw message