directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r567608 - in /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor: controller/actions/ShowSearchHistoryAction.java view/views/SearchView.java
Date Mon, 20 Aug 2007 09:01:47 GMT
Author: pamarcelot
Date: Mon Aug 20 02:01:46 2007
New Revision: 567608

URL: http://svn.apache.org/viewvc?rev=567608&view=rev
Log:
Added the selection on the current search in the previous searches menu.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/ShowSearchHistoryAction.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/SearchView.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/ShowSearchHistoryAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/ShowSearchHistoryAction.java?rev=567608&r1=567607&r2=567608&view=diff
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/ShowSearchHistoryAction.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/ShowSearchHistoryAction.java
Mon Aug 20 02:01:46 2007
@@ -173,6 +173,10 @@
                     view.setSearchInput( search, SearchPage.loadSearchScope().toArray( new
SearchScopeEnum[0] ) );
                 }
             } );
+            if ( search.equals( view.getSearchString() ) )
+            {
+                item.setSelection( true );
+            }
         }
 
         // No search history
@@ -181,6 +185,7 @@
             MenuItem item = new MenuItem( menu, SWT.RADIO );
             item.setText( "(None)" );
             item.setEnabled( false );
+            item.setSelection( true );
         }
 
         // Menu Separator

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/SearchView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/SearchView.java?rev=567608&r1=567607&r2=567608&view=diff
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/SearchView.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/view/views/SearchView.java
Mon Aug 20 02:01:46 2007
@@ -72,6 +72,7 @@
     /** The view's ID */
     public static final String ID = Activator.PLUGIN_ID + ".view.SearchView"; //$NON-NLS-1$
 
+    /** The current Search String */
     private String searchString;
 
     /** The Type column */
@@ -83,17 +84,17 @@
 
     // UI fields
     private Text searchField;
+    private Button searchButton;
     private Label searchResultsLabel;
     private Table resultsTable;
     private TableViewer resultsTableViewer;
     private Composite searchFieldComposite;
     private Composite searchFieldInnerComposite;
     private Label separatorLabel;
+
     /** The parent composite */
     private Composite parent;
 
-    private Button searchButton;
-
 
     /* (non-Javadoc)
      * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
@@ -708,5 +709,17 @@
         {
             setSearchInput( searchString, SearchPage.loadSearchScope().toArray( new SearchScopeEnum[0]
) );
         }
+    }
+
+
+    /**
+     * Gets the Search String.
+     *
+     * @return
+     *      the Search String or null if no Search String is set.
+     */
+    public String getSearchString()
+    {
+        return searchString;
     }
 }



Mime
View raw message