Package org.apache.directory.studio.ldapbrowser.core.model

Examples of org.apache.directory.studio.ldapbrowser.core.model.IQuickSearch


            IEntry entry = entries[0];
            return entry;
        }
        else if ( searches != null && searches.length == 1 && ( searches[0] instanceof IQuickSearch ) )
        {
            IQuickSearch quickSearch = ( IQuickSearch ) searches[0];
            IEntry entry = quickSearch.getSearchBaseEntry();
            return entry;
        }
        else
        {
            return null;
View Full Code Here


        {
            return ( ( BrowserSearchResultPage ) child ).getParent();
        }
        else if ( child instanceof IQuickSearch )
        {
            IQuickSearch quickSearch = ( ( IQuickSearch ) child );
            IEntry entry = quickSearch.getBrowserConnection().getEntryFromCache( quickSearch.getSearchBase() );
            return entry;
        }
        else if ( child instanceof ISearch )
        {
            ISearch search = ( ( ISearch ) child );
View Full Code Here

            IEntry entry = entries[0];
            return entry;
        }
        else if ( searches != null && searches.length == 1 && ( searches[0] instanceof IQuickSearch ) )
        {
            IQuickSearch quickSearch = ( IQuickSearch ) searches[0];
            IEntry entry = quickSearch.getSearchBaseEntry();
            return entry;
        }
        else
        {
            return null;
View Full Code Here

            IEntry entry = entries[0];
            return entry;
        }
        else if ( searches != null && searches.length == 1 && ( searches[0] instanceof IQuickSearch ) )
        {
            IQuickSearch quickSearch = ( IQuickSearch ) searches[0];
            IEntry entry = quickSearch.getSearchBaseEntry();
            return entry;
        }
        else
        {
            return null;
View Full Code Here

    public void run()
    {
        IBrowserConnection browserConnection = getBrowserConnection();
        if ( browserConnection != null )
        {
            IQuickSearch quickSearch = browserConnection.getSearchManager().getQuickSearch();
            if ( quickSearch == null )
            {
                quickSearch = new QuickSearch( browserConnection.getRootDSE(), browserConnection );
                browserConnection.getSearchManager().setQuickSearch( quickSearch );
            }

            String pageId = BrowserCommonConstants.PROP_SEARCH;
            PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn( getShell(), quickSearch, pageId, null,
                null );
            String title = quickSearch.getName();
            if ( dialog != null )
            {
                title = Utils.shorten( title, 30 );
            }
            dialog.getShell().setText( NLS.bind( Messages.getString( "PropertiesAction.PropertiesForX" ), title ) ); //$NON-NLS-1$
View Full Code Here

        IBrowserConnection browserConnection = getBrowserConnection();

        if ( browserConnection != null )
        {
            // Getting the current quick search
            IQuickSearch quickSearch = widget.getQuickSearch();

            // Creating a new quick search with the currently selected entry
            // if there's no current quick search or quick search isn't selected
            if ( ( quickSearch == null ) || !isQuickSearchSelected() )
            {
                // Setting a default search base on Root DSE
                IEntry searchBase = browserConnection.getRootDSE();

                // Getting the selected entry
                IEntry selectedEntry = getSelectedEntry();

                if ( selectedEntry != null )
                {
                    // Setting the selected entry as search base
                    searchBase = selectedEntry;
                }

                // Creating a new quick search
                quickSearch = new QuickSearch( searchBase, browserConnection );
                widget.setQuickSearch( quickSearch );
            }

            // Creating and opening the dialog
            PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn( getShell(), quickSearch,
                BrowserCommonConstants.PROP_SEARCH, null, null );
            dialog.getShell().setText(
                NLS.bind( Messages.getString( "PropertiesAction.PropertiesForX" ), //$NON-NLS-1$
                    Utils.shorten( quickSearch.getName(), 30 ) ) );
            if ( dialog.open() == PreferenceDialog.OK )
            {
                // Performing the quick search if it has not been performed before
                // (ie. the quick search was not modified at in the dialog)
                if ( quickSearch.getSearchResults() == null )
                {
                    new StudioBrowserJob( new SearchRunnable( new ISearch[]
                        { quickSearch } ) ).execute();
                }
            }
View Full Code Here

        {
            return ( ( BrowserSearchResultPage ) child ).getParent();
        }
        else if ( child instanceof IQuickSearch )
        {
            IQuickSearch quickSearch = ( ( IQuickSearch ) child );
            IEntry entry = quickSearch.getBrowserConnection().getEntryFromCache( quickSearch.getSearchBase() );
            return entry;
        }
        else if ( child instanceof ISearch )
        {
            ISearch search = ( ( ISearch ) child );
View Full Code Here

            IEntry entry = entries[0];
            return entry;
        }
        else if ( searches != null && searches.length == 1 && ( searches[0] instanceof IQuickSearch ) )
        {
            IQuickSearch quickSearch = ( IQuickSearch ) searches[0];
            IEntry entry = quickSearch.getSearchBaseEntry();
            return entry;
        }
        else
        {
            return null;
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.model.IQuickSearch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.