directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r820785 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java
Date Thu, 01 Oct 2009 20:50:09 GMT
Author: seelmann
Date: Thu Oct  1 20:50:09 2009
New Revision: 820785

URL: http://svn.apache.org/viewvc?rev=820785&view=rev
Log:
Removed System.out.println(), formatting

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java?rev=820785&r1=820784&r2=820785&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java
Thu Oct  1 20:50:09 2009
@@ -86,7 +86,7 @@
     private SearchResultEditorUniversalListener universalListener;
 
     private ISearch workingCopy;
-    
+
     protected EntryUpdateListener entryUpdateListener = new EntryUpdateListener()
     {
         public void entryUpdated( EntryModificationEvent event )
@@ -97,20 +97,17 @@
             }
 
             IEntry modifiedEntry = event.getModifiedEntry();
-            
-            if(workingCopy != null)
+
+            if ( workingCopy != null )
             {
-                for(ISearchResult sr : workingCopy.getSearchResults() )
+                for ( ISearchResult sr : workingCopy.getSearchResults() )
                 {
                     // check on object identity, nothing should be done for equal objects
from other editors
-                    if( modifiedEntry == sr.getEntry())
+                    if ( modifiedEntry == sr.getEntry() )
                     {
-                        // TODO: save
-                        System.out.println("save()");
-                        // doSaveEntry( sr.getEntry(), modifiedEntry );
-                        
-                        IEntry originalEntry = modifiedEntry.getBrowserConnection().getEntryFromCache(
modifiedEntry.getDn() );
-                        LdifChangeModifyRecord diff = Utils.computeDiff(originalEntry, modifiedEntry
);
+                        IEntry originalEntry = modifiedEntry.getBrowserConnection().getEntryFromCache(
+                            modifiedEntry.getDn() );
+                        LdifChangeModifyRecord diff = Utils.computeDiff( originalEntry, modifiedEntry
);
                         if ( diff != null )
                         {
                             // save
@@ -124,31 +121,29 @@
                                 setSearchResultEditorWidgetInput( ( SearchResultEditorInput
) getEditorInput() );
                             }
                         }
-                        
+
                         return;
                     }
                 }
-                
-            
-            
+
                 IEditorInput input = getEditorInput();
                 if ( input instanceof SearchResultEditorInput )
                 {
                     SearchResultEditorInput srei = ( SearchResultEditorInput ) input;
-                    for(ISearchResult sr : srei.getSearch().getSearchResults() )
+                    for ( ISearchResult sr : srei.getSearch().getSearchResults() )
                     {
-                        if(modifiedEntry == sr.getEntry())
+                        if ( modifiedEntry == sr.getEntry() )
                         {
                             // original entry has been updated, update widget input
                             setSearchResultEditorWidgetInput( srei );
                         }
                     }
                 }
-
             }
         }
     };
 
+
     /**
      * Gets the ID of the SearchResultEditor.
      * 
@@ -171,7 +166,7 @@
         {
             SearchResultEditorInput srei = ( SearchResultEditorInput ) input;
             ISearch search = srei.getSearch();
-            
+
             setSearchResultEditorWidgetInput( srei );
 
             if ( search != null )
@@ -194,12 +189,12 @@
     }
 
 
-    private void setSearchResultEditorWidgetInput(SearchResultEditorInput srei)
+    private void setSearchResultEditorWidgetInput( SearchResultEditorInput srei )
     {
         // clone search, search results, entries
         ISearch search = srei.getSearch();
         workingCopy = search != null ? ( ISearch ) search.clone() : search;
-        if ( search != null && search.getSearchResults() != null  )
+        if ( search != null && search.getSearchResults() != null )
         {
             ISearchResult[] searchResults = search.getSearchResults();
             ISearchResult[] clonedSearchResults = new ISearchResult[searchResults.length];
@@ -244,7 +239,7 @@
         getSite().getPage().getNavigationHistory().markLocation( this );
 
         setInput( input );
-        
+
         EventRegistry
             .addEntryUpdateListener( entryUpdateListener, BrowserCommonActivator.getDefault().getEventRunner()
);
     }



Mime
View raw message