directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r514740 - in /directory/ldapstudio/trunk/ldapstudio-schemas-plugin: ./ META-INF/ ressources/icons/ src/main/java/org/apache/directory/ldapstudio/schemas/ src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/ src/main/jav...
Date Mon, 05 Mar 2007 17:19:08 GMT
Author: pamarcelot
Date: Mon Mar  5 09:19:07 2007
New Revision: 514740

URL: http://svn.apache.org/viewvc?view=rev&rev=514740
Log:
Fixed DIRSTUDIO-53 (Bad search incon in the Schema perspective).

Added an action for erasing the search.

Added:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/erase_search.gif
  (with props)
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/search.gif   (with
props)
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/EraseSearchAction.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/search/
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/search/SearchPage.java
Removed:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/find.png
Modified:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/META-INF/MANIFEST.MF
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/PluginConstants.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchView.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchViewContentProvider.java

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/META-INF/MANIFEST.MF?view=diff&rev=514740&r1=514739&r2=514740
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/META-INF/MANIFEST.MF (original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/META-INF/MANIFEST.MF Mon Mar  5 09:19:07
2007
@@ -10,7 +10,8 @@
  org.eclipse.core.runtime,
  org.apache.directory.ldapstudio.jars,
  org.eclipse.jface.text,
- org.eclipse.ui.forms
+ org.eclipse.ui.forms,
+ org.eclipse.search
 Eclipse-LazyStart: true
 Bundle-ClassPath: .,
  lib/commons-collections-3.1.jar,

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml?view=diff&rev=514740&r1=514739&r2=514740
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml (original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml Mon Mar  5 09:19:07 2007
@@ -55,7 +55,7 @@
       <view
             category="org.apache.directory.ldapstudio.schemas.view.category"
             class="org.apache.directory.ldapstudio.schemas.view.viewers.SearchView"
-            icon="ressources/icons/find.png"
+            icon="ressources/icons/search.gif"
             id="org.apache.directory.ldapstudio.schemas.view.SearchView"
             name="%ldapstudio-schemas-plugin.views.search.name"/>
    </extension>
@@ -224,5 +224,16 @@
           		Decorates Schemas Editor icons
        		</description>
        	</decorator>
+   </extension>
+   <extension
+         point="org.eclipse.search.searchPages">
+      <page
+            class="org.apache.directory.ldapstudio.schemas.view.search.SearchPage"
+            enabled="true"
+            icon="ressources/icons/search.gif"
+            id="org.apache.directory.ldapstudio.schemas.search"
+            label="Schemas Search"
+            showScopeSection="false"
+            sizeHint="450,300"/>
    </extension>
 </plugin>

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/erase_search.gif
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/erase_search.gif?view=auto&rev=514740
==============================================================================
Binary file - no diff available.

Propchange: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/erase_search.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/search.gif
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/search.gif?view=auto&rev=514740
==============================================================================
Binary file - no diff available.

Propchange: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/search.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/PluginConstants.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/PluginConstants.java?view=diff&rev=514740&r1=514739&r2=514740
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/PluginConstants.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/PluginConstants.java
Mon Mar  5 09:19:07 2007
@@ -175,6 +175,7 @@
     public static final String IMG_HIDE_OBJECT_CLASSES = "ressources/icons/hide_object_classes.png";
//$NON-NLS-1$
     public static final String IMG_HIDE_ATTRIBUTE_TYPES = "ressources/icons/hide_attribute_types.png";
//$NON-NLS-1$
     public static final String IMG_SORT = "ressources/icons/sort.gif"; //$NON-NLS-1$
+    public static final String IMG_ERASE_SEARCH = "ressources/icons/erase_search.gif"; //$NON-NLS-1$
 
     // Images - Views
     public static final String IMG_FOLDER_ATTRIBUTE_TYPE = "ressources/icons/folder_at.gif";
//$NON-NLS-1$

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/EraseSearchAction.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/EraseSearchAction.java?view=auto&rev=514740
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/EraseSearchAction.java
(added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/EraseSearchAction.java
Mon Mar  5 09:19:07 2007
@@ -0,0 +1,75 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.ldapstudio.schemas.controller.actions;
+
+import org.apache.directory.ldapstudio.schemas.Activator;
+import org.apache.directory.ldapstudio.schemas.PluginConstants;
+import org.apache.directory.ldapstudio.schemas.view.viewers.SearchView;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * This action collapses all nodes of the viewer's tree, starting with the root.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class EraseSearchAction extends Action
+{
+    protected SearchView view;
+
+    /**
+     * Creates a new instance of CollapseAllAction.
+     *
+     * @param viewer
+     *      the attached Viewer
+     */
+    public EraseSearchAction( SearchView view )
+    {
+        super( "Erase Search");
+        setToolTipText( getText() );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
PluginConstants.IMG_ERASE_SEARCH )  );
+        setEnabled( true );
+
+        this.view = view;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run()
+    {
+        SearchView searchView = ( SearchView ) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+        .findView( SearchView.ID );
+        
+        searchView.setSearch( "", SearchView.SEARCH_ALL );
+    }
+
+
+    /**
+     * Disposes the action delegate.
+     */
+    public void dispose()
+    {
+        this.view = null;
+    }
+}

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/search/SearchPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/search/SearchPage.java?view=auto&rev=514740
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/search/SearchPage.java
(added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/search/SearchPage.java
Mon Mar  5 09:19:07 2007
@@ -0,0 +1,186 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.schemas.view.search;
+
+
+import org.apache.directory.ldapstudio.schemas.PluginConstants;
+import org.apache.directory.ldapstudio.schemas.view.viewers.SearchView;
+import org.eclipse.jface.dialogs.DialogPage;
+import org.eclipse.search.ui.ISearchPage;
+import org.eclipse.search.ui.ISearchPageContainer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Search Page.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SearchPage extends DialogPage implements ISearchPage
+{
+    private ISearchPageContainer container;
+
+    // UI Fields
+    private Combo searchCombo;
+    private Button allMetadataButton;
+    private Button nameButton;
+    private Button oidButton;
+    private Button descriptionButon;
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl( Composite parent )
+    {
+        parent.setLayout( new GridLayout() );
+
+        Label label = new Label( parent, SWT.NONE );
+        label.setText( "Search string (* = any string, ? = any character):" );
+        label.setLayoutData( new GridData( GridData.FILL, SWT.NONE, true, false ) );
+
+        searchCombo = new Combo( parent, SWT.DROP_DOWN | SWT.BORDER );
+        searchCombo.setLayoutData( new GridData( GridData.FILL, SWT.NONE, true, false ) );
+        searchCombo.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent arg0 )
+            {
+                validate();
+            }
+        } );
+
+        Group scopeGroup = new Group( parent, SWT.NONE );
+        scopeGroup.setLayout( new GridLayout( 4, false ) );
+        scopeGroup.setText( "Scope" );
+        scopeGroup.setLayoutData( new GridData( GridData.FILL, SWT.NONE, true, false ) );
+
+        allMetadataButton = new Button( scopeGroup, SWT.RADIO );
+        allMetadataButton.setText( "All metadata" );
+        allMetadataButton.setSelection( true );
+
+        nameButton = new Button( scopeGroup, SWT.RADIO );
+        nameButton.setText( "Name" );
+
+        oidButton = new Button( scopeGroup, SWT.RADIO );
+        oidButton.setText( "OID" );
+
+        descriptionButon = new Button( scopeGroup, SWT.RADIO );
+        descriptionButon.setText( "Description" );
+
+        initSearchHistory();
+
+        super.setControl( parent );
+    }
+
+
+    /**
+     * Initializes the Search History.
+     */
+    private void initSearchHistory()
+    {
+        searchCombo.setItems( SearchView.loadHistory( PluginConstants.PREFS_SEARCH_VIEW_SEARCH_HISTORY
) );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.search.ui.ISearchPage#performAction()
+     */
+    public boolean performAction()
+    {
+        SearchView searchView = ( SearchView ) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+            .findView( SearchView.ID );
+
+        String scope = null;
+
+        if ( allMetadataButton.getSelection() )
+        {
+            scope = SearchView.SEARCH_ALL;
+        }
+        else if ( nameButton.getSelection() )
+        {
+            scope = SearchView.SEARCH_NAME;
+        }
+        else if ( oidButton.getSelection() )
+        {
+            scope = SearchView.SEARCH_OID;
+        }
+        else if ( descriptionButon.getSelection() )
+        {
+            scope = SearchView.SEARCH_DESC;
+        }
+
+        searchView.setSearch( searchCombo.getText(), scope );
+
+        return true;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.search.ui.ISearchPage#setContainer(org.eclipse.search.ui.ISearchPageContainer)
+     */
+    public void setContainer( ISearchPageContainer container )
+    {
+        this.container = container;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
+     */
+    public void setVisible( boolean visible )
+    {
+        validate();
+        super.setVisible( visible );
+    }
+
+
+    /**
+     * Verifies if the page is valid.
+     *
+     * @return
+     *      true if the page is valid
+     */
+    private boolean isValid()
+    {
+        return ( ( searchCombo.getText() != null ) && ( !"".equals( searchCombo.getText()
) ) );
+    }
+
+
+    /**
+     * Validates the page.
+     */
+    private void validate()
+    {
+        container.setPerformActionEnabled( isValid() );
+    }
+
+}

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchView.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchView.java?view=diff&rev=514740&r1=514739&r2=514740
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchView.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchView.java
Mon Mar  5 09:19:07 2007
@@ -28,6 +28,7 @@
 import org.apache.directory.ldapstudio.schemas.Activator;
 import org.apache.directory.ldapstudio.schemas.PluginConstants;
 import org.apache.directory.ldapstudio.schemas.controller.SchemasViewController;
+import org.apache.directory.ldapstudio.schemas.controller.actions.EraseSearchAction;
 import org.apache.directory.ldapstudio.schemas.model.AttributeType;
 import org.apache.directory.ldapstudio.schemas.model.LDAPModelEvent;
 import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
@@ -38,6 +39,7 @@
 import org.apache.directory.ldapstudio.schemas.view.editors.ObjectClassFormEditor;
 import org.apache.directory.ldapstudio.schemas.view.editors.ObjectClassFormEditorInput;
 import org.apache.log4j.Logger;
+import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.FocusAdapter;
@@ -79,7 +81,7 @@
     private Table resultsTable;
     private TableViewer resultsTableViewer;
     private Combo searchField;
-    private Combo typeCombo;
+    private Combo scopeCombo;
     private SearchViewContentProvider searchContentProvider;
 
     /** The Type column */
@@ -95,20 +97,20 @@
     private String[] columnNames = new String[]
         { TYPE_COLUMN, NAME_COLUMN, SCHEMA_COLUMN, };
 
-    /** The Search All type */
+    /** The Search All scope */
     public static final String SEARCH_ALL = Messages.getString( "SearchView.Search_All_metadata"
); //$NON-NLS-1$
 
-    /** The Search Name type */
+    /** The Search Name scope */
     public static final String SEARCH_NAME = Messages.getString( "SearchView.Search_Name"
); //$NON-NLS-1$
 
-    /** The Search OID type */
+    /** The Search OID scope */
     public static final String SEARCH_OID = Messages.getString( "SearchView.Search_OID" );
//$NON-NLS-1$
 
-    /** The Search Description type */
+    /** The Search Description scope */
     public static final String SEARCH_DESC = Messages.getString( "SearchView.Search_Description"
); //$NON-NLS-1$
 
     /** The current Search type */
-    public static String searchType = SEARCH_ALL;
+    public static String currentSearchScope = SEARCH_ALL;
 
 
     /* (non-Javadoc)
@@ -124,12 +126,7 @@
         //top container
         Composite top = new Composite( parent, SWT.NONE );
 
-        GridLayout layout = new GridLayout();
-        layout.marginWidth = 0;
-        layout.marginHeight = 0;
-        layout.numColumns = 4;
-        layout.horizontalSpacing = 0;
-        layout.verticalSpacing = 0;
+        GridLayout layout = new GridLayout( 4, false );
         top.setLayout( layout );
 
         Label searchLabel = new Label( top, SWT.NONE );
@@ -144,25 +141,25 @@
         Label inLabel = new Label( top, SWT.NONE );
         inLabel.setText( " in " );
 
-        //search type combo
-        typeCombo = new Combo( top, SWT.READ_ONLY | SWT.SINGLE );
+        //search scope combo
+        scopeCombo = new Combo( top, SWT.READ_ONLY | SWT.SINGLE );
 
         gridData = new GridData( SWT.FILL, 0, false, false );
         gridData.verticalAlignment = SWT.CENTER;
-        typeCombo.setLayoutData( gridData );
-        typeCombo.addSelectionListener( new SelectionAdapter()
+        scopeCombo.setLayoutData( gridData );
+        scopeCombo.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
             {
-                searchType = typeCombo.getItem( typeCombo.getSelectionIndex() );
+                currentSearchScope = scopeCombo.getText();
                 resultsTableViewer.refresh();
             }
         } );
-        typeCombo.add( SEARCH_ALL, 0 );
-        typeCombo.add( SEARCH_NAME, 1 );
-        typeCombo.add( SEARCH_OID, 2 );
-        typeCombo.add( SEARCH_DESC, 3 );
-        typeCombo.select( 0 );
+        scopeCombo.add( SEARCH_ALL, 0 );
+        scopeCombo.add( SEARCH_NAME, 1 );
+        scopeCombo.add( SEARCH_OID, 2 );
+        scopeCombo.add( SEARCH_DESC, 3 );
+        scopeCombo.select( 0 );
 
         // Create the table 
         createTable( top );
@@ -174,6 +171,14 @@
 
         initSearchHistory();
         initListeners();
+        initToolbar();
+    }
+
+
+    private void initToolbar()
+    {
+        IToolBarManager toolbar = getViewSite().getActionBars().getToolBarManager();
+        toolbar.add( new EraseSearchAction( this ) );
     }
 
 
@@ -246,7 +251,7 @@
             }
         } );
 
-        typeCombo.addFocusListener( new FocusAdapter()
+        scopeCombo.addFocusListener( new FocusAdapter()
         {
             public void focusGained( FocusEvent arg0 )
             {
@@ -433,5 +438,15 @@
             history = new String[0];
         }
         return history;
+    }
+
+
+    public void setSearch( String searchString, String scope )
+    {
+        scopeCombo.setText( scope );
+        currentSearchScope = scopeCombo.getText();
+        searchField.setText( searchString );
+        resultsTableViewer.setInput( searchString );
+        resultsTable.setFocus();
     }
 }

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchViewContentProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchViewContentProvider.java?view=diff&rev=514740&r1=514739&r2=514740
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchViewContentProvider.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/SearchViewContentProvider.java
Mon Mar  5 09:19:07 2007
@@ -97,8 +97,8 @@
                 for ( SchemaElement element : allList )
                 {
 
-                    if ( SearchView.searchType.equals( SearchView.SEARCH_NAME )
-                        || SearchView.searchType.equals( SearchView.SEARCH_ALL ) )
+                    if ( SearchView.currentSearchScope.equals( SearchView.SEARCH_NAME )
+                        || SearchView.currentSearchScope.equals( SearchView.SEARCH_ALL )
)
                     {
                         String[] names = element.getNames();
                         for ( String name : names )
@@ -115,8 +115,8 @@
                         }
                     }
 
-                    if ( SearchView.searchType.equals( SearchView.SEARCH_OID )
-                        || SearchView.searchType.equals( SearchView.SEARCH_ALL ) )
+                    if ( SearchView.currentSearchScope.equals( SearchView.SEARCH_OID )
+                        || SearchView.currentSearchScope.equals( SearchView.SEARCH_ALL )
)
                     {
                         String oid = element.getOid();
                         Matcher m = pattern.matcher( oid );
@@ -130,8 +130,8 @@
                         }
                     }
 
-                    if ( SearchView.searchType.equals( SearchView.SEARCH_DESC )
-                        || SearchView.searchType.equals( SearchView.SEARCH_ALL ) )
+                    if ( SearchView.currentSearchScope.equals( SearchView.SEARCH_DESC )
+                        || SearchView.currentSearchScope.equals( SearchView.SEARCH_ALL )
)
                     {
                         String desc = element.getDescription();
                         if ( desc == null )



Mime
View raw message