directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot ...@marcelot.net>
Subject Re: svn commit: r753151 - in /directory/studio/trunk: connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ ldapbrowser-common/src/main/java/org
Date Fri, 13 Mar 2009 09:52:51 GMT
Hi Stefan,
I noticed this in the commit log:

Modified:
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
URL:
http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java?rev=753151&r1=753150&r2=753151&view=diff
==============================================================================
---
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
(original)
+++
directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
Fri Mar 13 07:47:07 2009
@@ -227,6 +228,7 @@
     */
    public void run()
    {
+        System.out.println( "StudioActionProxy.run" );
        if ( !isDisposed() )
        {
            // deactivate global actions


I don't know if this sysout was left on purpose or by mistake.

My 2 cents,
Pierre-Arnaud

On Fri, Mar 13, 2009 at 8:47 AM, <seelmann@apache.org> wrote:

> Author: seelmann
> Date: Fri Mar 13 07:47:07 2009
> New Revision: 753151
>
> URL: http://svn.apache.org/viewvc?rev=753151&view=rev
> Log:
> DIRSTUDIO-427:
> o "Show operational attributes" in entry editor now only is a view filter
> o Added property to connection settings weather to fetch operational
> attributes while browsing
> o Added actions to fetch operational attributes per entry
>
> Added:
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
> Modified:
>
>  directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java
>
>  directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.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/messages.properties
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages_de.properties
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
>
>  directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java
>
>  directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
>
>  directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
>
>  directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
>
>  directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorActionGroup.java
>
>  directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
>
> Modified:
> directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java
> (original)
> +++
> directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java
> Fri Mar 13 07:47:07 2009
> @@ -23,6 +23,7 @@
>
>  import org.apache.directory.studio.connection.core.Connection;
>  import org.apache.directory.studio.connection.core.ConnectionFolder;
> +import org.eclipse.jface.action.Action;
>  import org.eclipse.jface.action.IAction;
>  import org.eclipse.jface.resource.ImageDescriptor;
>  import org.eclipse.jface.viewers.ISelection;
> @@ -45,7 +46,7 @@
>
>     /** The selected connection folders */
>     private ConnectionFolder[] selectedConnectionFolders;
> -
> +
>     /** The input */
>     private Object input;
>
> @@ -60,6 +61,17 @@
>
>
>     /**
> +     * Gets the style.
> +     *
> +     * @return the style
> +     */
> +    public int getStyle()
> +    {
> +        return Action.AS_PUSH_BUTTON;
> +    }
> +
> +
> +    /**
>      * @see
> org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
>      */
>     public void init( IWorkbenchWindow window )
> @@ -147,6 +159,18 @@
>
>
>     /**
> +     * Returns weather this action is checked.
> +     * The default implementations returns false.
> +     *
> +     * @return
> +     */
> +    public boolean isChecked()
> +    {
> +        return false;
> +    }
> +
> +
> +    /**
>      * Initializes this action
>      */
>     private void init()
> @@ -216,8 +240,8 @@
>     {
>         return selectedConnectionFolders;
>     }
> -
> -
> +
> +
>     /**
>      * Sets the selected connection folders.
>      *
> @@ -228,7 +252,7 @@
>     {
>         this.selectedConnectionFolders = selectedConnectionFolders;
>     }
> -
> +
>
>     /**
>      * Gets the input.
>
> Modified:
> directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
> (original)
> +++
> directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
> Fri Mar 13 07:47:07 2009
> @@ -218,6 +218,7 @@
>             setToolTipText( action.getText() );
>             setEnabled( action.isEnabled() );
>             setImageDescriptor( action.getImageDescriptor() );
> +            setChecked( action.isChecked() );
>         }
>     }
>
> @@ -227,6 +228,7 @@
>      */
>     public void run()
>     {
> +        System.out.println( "StudioActionProxy.run" );
>         if ( !isDisposed() )
>         {
>             // deactivate global actions
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonPreferencesInitializer.java
> Fri Mar 13 07:47:07 2009
> @@ -141,7 +141,7 @@
>         store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_OBJECTCLASS_ATTRIBUTES,
> true );
>         store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_MUST_ATTRIBUTES, true );
>         store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_MAY_ATTRIBUTES, true );
> -        store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES,
> false );
> +        store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES,
> true );
>         store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_OBJECTCLASS_AND_MUST_ATTRIBUTES_FIRST,
> true );
>         store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_OPERATIONAL_ATTRIBUTES_LAST,
> true );
>         store.setDefault(
> BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_DEFAULT_SORT_BY,
>
> Added:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java?rev=753151&view=auto
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
> (added)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
> Fri Mar 13 07:47:07 2009
> @@ -0,0 +1,152 @@
> +/*
> + *  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.studio.ldapbrowser.common.actions;
> +
> +
> +import java.util.ArrayList;
> +import java.util.Arrays;
> +import java.util.List;
> +
> +import
> org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesRunnable;
> +import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
> +import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
> +import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
> +import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
> +import org.eclipse.jface.action.Action;
> +import org.eclipse.jface.resource.ImageDescriptor;
> +
> +
> +/**
> + * This Action toggles weather to fetch operational attributes for an
> entry or no.
> + *
> + * @author <a href="mailto:dev@directory.apache.org">Apache Directory
> Project</a>
> + * @version $Rev$, $Date$
> + */
> +public class FetchOperationalAttributesAction extends BrowserAction
> +{
> +    /**
> +     * Creates a new instance of ShowRawValuesAction.
> +     */
> +    public FetchOperationalAttributesAction()
> +    {
> +    }
> +
> +
> +    @Override
> +    public int getStyle()
> +    {
> +        return Action.AS_CHECK_BOX;
> +    }
> +
> +
> +    @Override
> +    public String getText()
> +    {
> +        return Messages.getString(
> "FetchOperationalAttributesAction.FetchOperationalAttributes" );
> //$NON-NLS-1$
> +    }
> +
> +
> +    @Override
> +    public ImageDescriptor getImageDescriptor()
> +    {
> +        return null;
> +    }
> +
> +
> +    @Override
> +    public String getCommandId()
> +    {
> +        return null;
> +    }
> +
> +
> +    @Override
> +    public boolean isEnabled()
> +    {
> +        List<IEntry> entries = getEntries();
> +        return !entries.isEmpty() &&
> !entries.iterator().next().getBrowserConnection().isFetchOperationalAttributes();
> +    }
> +
> +
> +    @Override
> +    public boolean isChecked()
> +    {
> +        boolean checked = true;
> +        List<IEntry> entries = getEntries();
> +        if ( entries.isEmpty() )
> +        {
> +            checked = false;
> +        }
> +        else
> +        {
> +            for ( IEntry entry : entries )
> +            {
> +                if ( !entry.isOperationalAttributesInitialized() )
> +                {
> +                    checked = false;
> +                }
> +            }
> +        }
> +        return checked;
> +    }
> +
> +
> +    @Override
> +    public void run()
> +    {
> +        IEntry[] entries = getEntries().toArray( new IEntry[0] );
> +        if ( isChecked() )
> +        {
> +            new StudioBrowserJob( new InitializeAttributesRunnable(
> entries, false ) ).execute();
> +        }
> +        else
> +        {
> +            new StudioBrowserJob( new InitializeAttributesRunnable(
> entries, true ) ).execute();
> +        }
> +    }
> +
> +
> +    /**
> +     * Gets the Entries
> +     *
> +     * @return
> +     *      the entries
> +     */
> +    protected List<IEntry> getEntries()
> +    {
> +        List<IEntry> entriesList = new ArrayList<IEntry>();
> +        entriesList.addAll( Arrays.asList( getSelectedEntries() ) );
> +        for ( ISearchResult sr : getSelectedSearchResults() )
> +        {
> +            entriesList.add( sr.getEntry() );
> +        }
> +        for ( IBookmark bm : getSelectedBookmarks() )
> +        {
> +            entriesList.add( bm.getEntry() );
> +        }
> +        if ( getInput() != null && getInput() instanceof IEntry )
> +        {
> +            entriesList.add( ( IEntry ) getInput() );
> +        }
> +        return entriesList;
> +    }
> +
> +}
>
> 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=753151&r1=753150&r2=753151&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
> Fri Mar 13 07:47:07 2009
> @@ -130,12 +130,12 @@
>         ISearch[] searches = getSearches();
>         IEntry entryInput = getEntryInput();
>         ISearch searchInput = getSearchInput();
> -        boolean soa =
> BrowserCommonActivator.getDefault().getPreferenceStore().getBoolean(
> -
>  BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES
> );
>
>         if ( entries.length > 0 )
>         {
> -            new StudioBrowserJob( new InitializeAttributesRunnable(
> entries, soa ) ).execute();
> +            boolean foa =
> entries[0].getBrowserConnection().isFetchOperationalAttributes()
> +                || entries[0].isOperationalAttributesInitialized();
> +            new StudioBrowserJob( new InitializeAttributesRunnable(
> entries, foa ) ).execute();
>             // avoid duplicate search on Root DSE
>             if ( entries.length > 1 || !( entries[0] instanceof IRootDSE )
> )
>             {
> @@ -153,8 +153,10 @@
>
>         if ( entryInput != null )
>         {
> +            boolean foa =
> entryInput.getBrowserConnection().isFetchOperationalAttributes()
> +                || entryInput.isOperationalAttributesInitialized();
>             new StudioBrowserJob( new InitializeAttributesRunnable( new
> IEntry[]
> -                { entryInput }, soa ) ).execute();
> +                { entryInput }, foa ) ).execute();
>         }
>         if ( searchInput != null )
>         {
> @@ -197,7 +199,7 @@
>         {
>             entriesList.add( getSelectedBookmarks()[i].getEntry() );
>         }
> -        return ( IEntry[] ) entriesList.toArray( new
> IEntry[entriesList.size()] );
> +        return entriesList.toArray( new IEntry[entriesList.size()] );
>     }
>
>
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages.properties
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages.properties?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages.properties
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages.properties
> Fri Mar 13 07:47:07 2009
> @@ -92,3 +92,4 @@
>  UnfilterChildrenAction.RemoveChildrenFilter=Remove Children Filter
>  UpAction.Up=Up
>  ValueEditorPreferencesAction.Preferences=Preferences...
> +FetchOperationalAttributesAction.FetchOperationalAttributes=Fetch
> Operational Attributes
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages_de.properties
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages_de.properties?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages_de.properties
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/messages_de.properties
> Fri Mar 13 07:47:07 2009
> @@ -92,3 +92,4 @@
>  UnfilterChildrenAction.RemoveChildrenFilter=Kind-Eintrag Filter entfernen
>  UpAction.Up=Hoch
>  ValueEditorPreferencesAction.Preferences=Präferenzen...
> +FetchOperationalAttributesAction.FetchOperationalAttributes=Operationale
> Attribute abrufen
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/proxy/BrowserActionProxy.java
> Fri Mar 13 07:47:07 2009
> @@ -76,7 +76,7 @@
>
>     protected BrowserActionProxy( ISelectionProvider selectionProvider,
> BrowserAction action )
>     {
> -        this( selectionProvider, action, Action.AS_PUSH_BUTTON );
> +        this( selectionProvider, action, action.getStyle() );
>     }
>
>
> @@ -86,43 +86,43 @@
>         EventRegistry.removeEntryUpdateListener( this );
>         EventRegistry.removeSearchUpdateListener( this );
>         EventRegistry.removeBookmarkUpdateListener( this );
> -        this.selectionProvider.removeSelectionChangedListener( this );
> +        selectionProvider.removeSelectionChangedListener( this );
>         //
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().removeSelectionListener(this);
>
> -        this.action.dispose();
> -        this.action = null;
> +        action.dispose();
> +        action = null;
>     }
>
>
>     public boolean isDisposed()
>     {
> -        return this.action == null;
> +        return action == null;
>     }
>
>
>     public final void entryUpdated( EntryModificationEvent
> entryModificationEvent )
>     {
> -        if ( !this.isDisposed() )
> +        if ( !isDisposed() )
>         {
> -            this.updateAction();
> +            updateAction();
>         }
>     }
>
>
>     public void searchUpdated( SearchUpdateEvent searchUpdateEvent )
>     {
> -        if ( !this.isDisposed() )
> +        if ( !isDisposed() )
>         {
> -            this.updateAction();
> +            updateAction();
>         }
>     }
>
>
>     public void bookmarkUpdated( BookmarkUpdateEvent bookmarkUpdateEvent )
>     {
> -        if ( !this.isDisposed() )
> +        if ( !isDisposed() )
>         {
> -            this.updateAction();
> +            updateAction();
>         }
>     }
>
> @@ -188,8 +188,8 @@
>     {
>         if ( !this.isDisposed() )
>         {
> -            this.action.setInput( input );
> -            this.selectionChanged( new SelectionChangedEvent(
> this.selectionProvider, new StructuredSelection() ) );
> +            action.setInput( input );
> +            selectionChanged( new SelectionChangedEvent(
> selectionProvider, new StructuredSelection() ) );
>             // this.updateAction();
>         }
>     }
> @@ -197,39 +197,39 @@
>
>     public void selectionChanged( SelectionChangedEvent event )
>     {
> -        if ( !this.isDisposed() )
> +        if ( !isDisposed() )
>         {
>             ISelection selection = event.getSelection();
>
> -            this.action.setSelectedBrowserViewCategories(
> BrowserSelectionUtils.getBrowserViewCategories( selection ) );
> -            this.action.setSelectedEntries(
> BrowserSelectionUtils.getEntries( selection ) );
> -            this.action.setSelectedBrowserEntryPages(
> BrowserSelectionUtils.getBrowserEntryPages( selection ) );
> -            this.action.setSelectedSearchResults(
> BrowserSelectionUtils.getSearchResults( selection ) );
> -            this.action.setSelectedBrowserSearchResultPages(
> BrowserSelectionUtils
> -                .getBrowserSearchResultPages( selection ) );
> -            this.action.setSelectedBookmarks(
> BrowserSelectionUtils.getBookmarks( selection ) );
> -
> -            this.action.setSelectedSearches(
> BrowserSelectionUtils.getSearches( selection ) );
> -
> -            this.action.setSelectedAttributes(
> BrowserSelectionUtils.getAttributes( selection ) );
> -            this.action.setSelectedAttributeHierarchies(
> BrowserSelectionUtils.getAttributeHierarchie( selection ) );
> -            this.action.setSelectedValues(
> BrowserSelectionUtils.getValues( selection ) );
> +            action.setSelectedBrowserViewCategories(
> BrowserSelectionUtils.getBrowserViewCategories( selection ) );
> +            action.setSelectedEntries( BrowserSelectionUtils.getEntries(
> selection ) );
> +            action.setSelectedBrowserEntryPages(
> BrowserSelectionUtils.getBrowserEntryPages( selection ) );
> +            action.setSelectedSearchResults(
> BrowserSelectionUtils.getSearchResults( selection ) );
> +            action.setSelectedBrowserSearchResultPages(
> BrowserSelectionUtils.getBrowserSearchResultPages( selection ) );
> +            action.setSelectedBookmarks(
> BrowserSelectionUtils.getBookmarks( selection ) );
> +
> +            action.setSelectedSearches( BrowserSelectionUtils.getSearches(
> selection ) );
> +
> +            action.setSelectedAttributes(
> BrowserSelectionUtils.getAttributes( selection ) );
> +            action.setSelectedAttributeHierarchies(
> BrowserSelectionUtils.getAttributeHierarchie( selection ) );
> +            action.setSelectedValues( BrowserSelectionUtils.getValues(
> selection ) );
>
> -            this.action.setSelectedProperties(
> BrowserSelectionUtils.getProperties( selection ) );
> +            action.setSelectedProperties(
> BrowserSelectionUtils.getProperties( selection ) );
>
> -            this.updateAction();
> +            updateAction();
>         }
>     }
>
>
>     public void updateAction()
>     {
> -        if ( !this.isDisposed() )
> +        if ( !isDisposed() )
>         {
> -            this.setText( this.action.getText() );
> -            this.setToolTipText( this.action.getText() );
> -            this.setEnabled( this.action.isEnabled() );
> -            this.setImageDescriptor( this.action.getImageDescriptor() );
> +            setText( action.getText() );
> +            setToolTipText( action.getText() );
> +            setEnabled( action.isEnabled() );
> +            setImageDescriptor( action.getImageDescriptor() );
> +            setChecked( action.isChecked() );
>         }
>     }
>
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
> Fri Mar 13 07:47:07 2009
> @@ -89,6 +89,8 @@
>
>     private static final String X_FETCH_SUBENTRIES = "X-FETCH-SUBENTRIES";
> //$NON-NLS-1$
>
> +    private static final String X_FETCH_OPERATIONAL_ATTRIBUTES =
> "X-FETCH-OPERATIONAL-ATTRIBUTES"; //$NON-NLS-1$
> +
>     private static final String X_PAGED_SEARCH = "X-PAGED-SEARCH";
> //$NON-NLS-1$
>
>     private static final String X_PAGED_SEARCH_SIZE =
> "X-PAGED-SEARCH-SIZE"; //$NON-NLS-1$
> @@ -128,6 +130,9 @@
>     /** The paged search scroll mode button. */
>     protected Button pagedSearchScrollModeButton;
>
> +    /** The fetch operational attributes button. */
> +    private Button fetchOperationalAttributesButton;
> +
>
>     /**
>      * Creates a new instance of BrowserParameterPage.
> @@ -217,6 +222,18 @@
>
>
>     /**
> +     * Returns true if operational attributes should be fetched
> +     * while browsing.
> +     *
> +     * @return true, if operational attributes should be fetched
> +     */
> +    private boolean isFetchOperationalAttributes()
> +    {
> +        return fetchOperationalAttributesButton.getSelection();
> +    }
> +
> +
> +    /**
>      * Returns true if paged search should be used
>      * while browsing.
>      *
> @@ -282,6 +299,7 @@
>         addBaseDNInput( parent );
>         addLimitInput( parent );
>         addControlInput( parent );
> +        addFeaturesInput( parent );
>     }
>
>
> @@ -294,21 +312,23 @@
>     {
>         Composite composite = BaseWidgetUtils.createColumnContainer(
> parent, 1, 1 );
>
> -        Group group = BaseWidgetUtils.createGroup( composite,
> Messages.getString("BrowserParameterPage.BaseDNGroup"), 1 ); //$NON-NLS-1$
> +        Group group = BaseWidgetUtils.createGroup( composite,
> +            Messages.getString( "BrowserParameterPage.BaseDNGroup" ), 1 );
> //$NON-NLS-1$
>         Composite groupComposite = BaseWidgetUtils.createColumnContainer(
> group, 3, 1 );
>         GridData gd;
>
> -        autoFetchBaseDnsButton = BaseWidgetUtils.createCheckbox(
> groupComposite,
> Messages.getString("BrowserParameterPage.GetBaseDNsFromRootDSE"), 2 );
> //$NON-NLS-1$
> +        autoFetchBaseDnsButton = BaseWidgetUtils.createCheckbox(
> groupComposite, Messages
> +            .getString( "BrowserParameterPage.GetBaseDNsFromRootDSE" ), 2
> ); //$NON-NLS-1$
>         autoFetchBaseDnsButton.setSelection( true );
>
>         fetchBaseDnsButton = new Button( groupComposite, SWT.PUSH );
> -        fetchBaseDnsButton.setText(
> Messages.getString("BrowserParameterPage.FetchBaseDNs") ); //$NON-NLS-1$
> +        fetchBaseDnsButton.setText( Messages.getString(
> "BrowserParameterPage.FetchBaseDNs" ) ); //$NON-NLS-1$
>         fetchBaseDnsButton.setEnabled( true );
>         gd = new GridData();
>         gd.horizontalAlignment = SWT.RIGHT;
>         fetchBaseDnsButton.setLayoutData( gd );
>
> -        BaseWidgetUtils.createLabel( groupComposite,
> Messages.getString("BrowserParameterPage.BaseDN"), 1 ); //$NON-NLS-1$
> +        BaseWidgetUtils.createLabel( groupComposite, Messages.getString(
> "BrowserParameterPage.BaseDN" ), 1 ); //$NON-NLS-1$
>         baseDNCombo = BaseWidgetUtils.createCombo( groupComposite, new
> String[0], 0, 2 );
>     }
>
> @@ -322,31 +342,54 @@
>     {
>         Composite composite = BaseWidgetUtils.createColumnContainer(
> parent, 1, 1 );
>
> -        Group group = BaseWidgetUtils.createGroup( composite,
> Messages.getString("BrowserParameterPage.Controls"), 1 ); //$NON-NLS-1$
> +        Group group = BaseWidgetUtils.createGroup( composite,
> Messages.getString( "BrowserParameterPage.Controls" ), 1 ); //$NON-NLS-1$
>         Composite groupComposite = BaseWidgetUtils.createColumnContainer(
> group, 1, 1 );
>
>         // fetch subentries control
> -        fetchSubentriesButton = BaseWidgetUtils.createCheckbox(
> groupComposite,
> -
>  Messages.getString("BrowserParameterPage.FetchSubentriesWhileBrowsing"), 1
> ); //$NON-NLS-1$
> -        fetchSubentriesButton
> -            .setToolTipText(
> Messages.getString("BrowserParameterPage.FetchSubentriesWhileBrowsingTooltip")
> ); //$NON-NLS-1$
> +        fetchSubentriesButton = BaseWidgetUtils.createCheckbox(
> groupComposite, Messages
> +            .getString(
> "BrowserParameterPage.FetchSubentriesWhileBrowsing" ), 1 ); //$NON-NLS-1$
> +        fetchSubentriesButton.setToolTipText( Messages
> +            .getString(
> "BrowserParameterPage.FetchSubentriesWhileBrowsingTooltip" ) );
> //$NON-NLS-1$
>         fetchSubentriesButton.setSelection( false );
>
>         // paged search control
>         Composite sprcComposite = BaseWidgetUtils.createColumnContainer(
> groupComposite, 4, 1 );
> -        pagedSearchButton = BaseWidgetUtils.createCheckbox( sprcComposite,
> Messages.getString("BrowserParameterPage.PagedSearch"), 1 ); //$NON-NLS-1$
> -        pagedSearchButton.setToolTipText(
> Messages.getString("BrowserParameterPage.PagedSearchTooltip") );
> //$NON-NLS-1$
> +        pagedSearchButton = BaseWidgetUtils.createCheckbox( sprcComposite,
> Messages
> +            .getString( "BrowserParameterPage.PagedSearch" ), 1 );
> //$NON-NLS-1$
> +        pagedSearchButton.setToolTipText( Messages.getString(
> "BrowserParameterPage.PagedSearchTooltip" ) ); //$NON-NLS-1$
>
> -        pagedSearchSizeLabel = BaseWidgetUtils.createLabel( sprcComposite,
> Messages.getString("BrowserParameterPage.PageSize"), 1 ); //$NON-NLS-1$
> +        pagedSearchSizeLabel = BaseWidgetUtils.createLabel( sprcComposite,
> Messages
> +            .getString( "BrowserParameterPage.PageSize" ), 1 );
> //$NON-NLS-1$
>         pagedSearchSizeText = BaseWidgetUtils.createText( sprcComposite,
> "100", 5, 1 ); //$NON-NLS-1$
> -        pagedSearchScrollModeButton = BaseWidgetUtils.createCheckbox(
> sprcComposite, Messages.getString("BrowserParameterPage.ScrollMode"), 1 );
> //$NON-NLS-1$
> -        pagedSearchScrollModeButton
> -            .setToolTipText(
> Messages.getString("BrowserParameterPage.ScrollModeTooltip") );
> //$NON-NLS-1$
> +        pagedSearchScrollModeButton = BaseWidgetUtils.createCheckbox(
> sprcComposite, Messages
> +            .getString( "BrowserParameterPage.ScrollMode" ), 1 );
> //$NON-NLS-1$
> +        pagedSearchScrollModeButton.setToolTipText( Messages.getString(
> "BrowserParameterPage.ScrollModeTooltip" ) ); //$NON-NLS-1$
>         pagedSearchScrollModeButton.setSelection( true );
>     }
>
>
>     /**
> +     * Adds the features input.
> +     *
> +     * @param parent the parent
> +     */
> +    private void addFeaturesInput( Composite parent )
> +    {
> +        Composite composite = BaseWidgetUtils.createColumnContainer(
> parent, 1, 1 );
> +
> +        Group group = BaseWidgetUtils.createGroup( composite,
> Messages.getString( "BrowserParameterPage.Features" ), 1 ); //$NON-NLS-1$
> +        Composite groupComposite = BaseWidgetUtils.createColumnContainer(
> group, 1, 1 );
> +
> +        // fetch operational attributes feature
> +        fetchOperationalAttributesButton = BaseWidgetUtils.createCheckbox(
> groupComposite, Messages
> +            .getString(
> "BrowserParameterPage.FetchOperationalAttributesWhileBrowsing" ), 1 );
> //$NON-NLS-1$
> +        fetchOperationalAttributesButton.setToolTipText( Messages
> +            .getString(
> "BrowserParameterPage.FetchOperationalAttributesWhileBrowsingTooltip" ) );
> //$NON-NLS-1$
> +        fetchOperationalAttributesButton.setSelection( false );
> +    }
> +
> +
> +    /**
>      * Adds the limit input.
>      *
>      * @param parent the parent
> @@ -385,7 +428,7 @@
>         {
>             if ( !LdapDN.isValid( getBaseDN() ) )
>             {
> -                message =
> Messages.getString("BrowserParameterPage.EnterValidBaseDN"); //$NON-NLS-1$
> +                message = Messages.getString(
> "BrowserParameterPage.EnterValidBaseDN" ); //$NON-NLS-1$
>             }
>         }
>     }
> @@ -420,7 +463,6 @@
>         Connection.AliasDereferencingMethod aliasesDereferencingMethod =
> Connection.AliasDereferencingMethod
>             .getByOrdinal( aliasesDereferencingMethodOrdinal );
>         aliasesDereferencingWidget.setAliasesDereferencingMethod(
> aliasesDereferencingMethod );
> -
>         boolean fetchSubentries = parameter
>             .getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_FETCH_SUBENTRIES );
>         fetchSubentriesButton.setSelection( fetchSubentries );
> @@ -433,6 +475,10 @@
>         boolean pagedSearchScrollMode = parameter
>             .getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SCROLL_MODE );
>         pagedSearchScrollModeButton.setSelection( pagedSearch ?
> pagedSearchScrollMode : true );
> +
> +        boolean fetchOperationalAttributes = parameter
> +            .getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES );
> +        fetchOperationalAttributesButton.setSelection(
> fetchOperationalAttributes );
>     }
>
>
> @@ -466,17 +512,19 @@
>                         baseDNCombo.setItems( baseDNs.toArray( new
> String[baseDNs.size()] ) );
>                         baseDNCombo.select( 0 );
>
> -                        String msg =
> Messages.getString("BrowserParameterPage.BaseDNResult"); //$NON-NLS-1$
> +                        String msg = Messages.getString(
> "BrowserParameterPage.BaseDNResult" ); //$NON-NLS-1$
>                         for ( String baseDN : baseDNs )
>                         {
>                             msg += "\n  - " + baseDN; //$NON-NLS-1$
>                         }
> -                        MessageDialog.openInformation(
> Display.getDefault().getActiveShell(),
> Messages.getString("BrowserParameterPage.FetchBaseDNs"), msg );
> //$NON-NLS-1$
> +                        MessageDialog.openInformation(
> Display.getDefault().getActiveShell(), Messages
> +                            .getString(
> "BrowserParameterPage.FetchBaseDNs" ), msg ); //$NON-NLS-1$
>                     }
>                     else
>                     {
> -                        MessageDialog.openWarning(
> Display.getDefault().getActiveShell(),
> Messages.getString("BrowserParameterPage.FetchBaseDNs"), //$NON-NLS-1$
> -
>  Messages.getString("BrowserParameterPage.NoBaseDNReturnedFromServer") );
> //$NON-NLS-1$
> +                        MessageDialog.openWarning(
> Display.getDefault().getActiveShell(), Messages
> +                            .getString(
> "BrowserParameterPage.FetchBaseDNs" ), //$NON-NLS-1$
> +                            Messages.getString(
> "BrowserParameterPage.NoBaseDNReturnedFromServer" ) ); //$NON-NLS-1$
>                         autoFetchBaseDnsButton.setSelection( false );
>                     }
>                 }
> @@ -523,6 +571,14 @@
>                 connectionPageModified();
>             }
>         } );
> +
> +        fetchOperationalAttributesButton.addSelectionListener( new
> SelectionAdapter()
> +        {
> +            public void widgetSelected( SelectionEvent arg0 )
> +            {
> +                connectionPageModified();
> +            }
> +        } );
>     }
>
>
> @@ -547,6 +603,8 @@
>             getPagedSearchSize() );
>         parameter.setExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SCROLL_MODE,
>             isPagedSearchScrollMode() );
> +        parameter.setExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES,
> +            isFetchOperationalAttributes() );
>     }
>
>
> @@ -609,12 +667,15 @@
>             .getExtendedIntProperty(
> IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SIZE );
>         boolean pagedSearchScrollMode = connectionParameter
>             .getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SCROLL_MODE );
> +        boolean fetchOperationalAttributes = connectionParameter
> +            .getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES );
>
>         return fetchBaseDns != isAutoFetchBaseDns() || !StringUtils.equals(
> baseDn, getBaseDN() )
>             || referralsHandlingMethod != getReferralsHandlingMethod()
>             || aliasesDereferencingMethod !=
> getAliasesDereferencingMethod() || fetchSubentries != isFetchSubentries()
>             || pagedSearch != isPagedSearch() || pagedSearchSize !=
> getPagedSearchSize()
> -            || pagedSearchScrollMode != isPagedSearchScrollMode();
> +            || pagedSearchScrollMode != isPagedSearchScrollMode()
> +            || fetchOperationalAttributes !=
> isFetchOperationalAttributes();
>     }
>
>
> @@ -693,8 +754,7 @@
>         }
>
>         // paged search
> -        boolean pagedSearch = parameter
> -            .getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH );
> +        boolean pagedSearch = parameter.getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH );
>         if ( pagedSearch )
>         {
>             ldapUrl.getExtensions().add( new Extension( false,
> X_PAGED_SEARCH, null ) );
> @@ -708,6 +768,14 @@
>                 ldapUrl.getExtensions().add( new Extension( false,
> X_PAGED_SEARCH_SCROLL_MODE, null ) );
>             }
>         }
> +
> +        // fetch operational attributes
> +        boolean fetchOperationalAttributes = parameter
> +            .getExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES );
> +        if ( fetchOperationalAttributes )
> +        {
> +            ldapUrl.getExtensions().add( new Extension( false,
> X_FETCH_OPERATIONAL_ATTRIBUTES, null ) );
> +        }
>     }
>
>
> @@ -819,5 +887,10 @@
>             parameter.setExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SCROLL_MODE,
>                 pagedSearchScrollMode != null );
>         }
> +
> +        // fetch operational attributes
> +        Extension fetchOperationalAttributes = ldapUrl.getExtension(
> X_FETCH_OPERATIONAL_ATTRIBUTES );
> +        parameter.setExtendedBoolProperty(
> IBrowserConnection.CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES,
> +            fetchOperationalAttributes != null );
>     }
>  }
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties
> Fri Mar 13 07:47:07 2009
> @@ -30,3 +30,6 @@
>  BrowserParameterPage.PageSize=\ Page Size:
>  BrowserParameterPage.ScrollMode=Scroll Mode
>  BrowserParameterPage.ScrollModeTooltip=If enabled only one page is fetched
> from the server at once while browsing, you could 'scroll' through the pages
> by using the 'next page' and 'top page' items. If disabled _all_ entries are
> fetched from the server, the paged result control is only used in background
> to avoid server-side limits.
> +BrowserParameterPage.Features=Features
> +BrowserParameterPage.FetchOperationalAttributesWhileBrowsing=Fetch
> operational attributes while browsing
> +BrowserParameterPage.FetchOperationalAttributesWhileBrowsingTooltip=If
> enabled normal and operational attributes are retrieved.
> \ No newline at end of file
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties
> Fri Mar 13 07:47:07 2009
> @@ -30,3 +30,6 @@
>  BrowserParameterPage.PageSize=\ Seitengröße:
>  BrowserParameterPage.ScrollMode=Blättern
>  BrowserParameterPage.ScrollModeTooltip=Wenn aktiviert, wird nur eine Seite
> vom Server abgerufen. Sie können durch die einzelnen Seiten Blättern indem
> Sie auf 'Nächste Seite' bzw. 'Erste Seite' klicken. Wenn deaktiviert, werden
> alle Einträge vom Server abgerufen. Die seitenwiese Suche wird nur im
> Hintergrund genutzt, um server-seitige Begrenzungen zu vermeiden.
> +BrowserParameterPage.Features=Features
> +BrowserParameterPage.FetchOperationalAttributesWhileBrowsing=Operationale
> Attribute während des Browsens abrufen
> +BrowserParameterPage.FetchOperationalAttributesWhileBrowsingTooltip=Wenn
> aktiviert, werden normale und operationale Attribute abgerufen.
> \ No newline at end of file
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
> Fri Mar 13 07:47:07 2009
> @@ -134,12 +134,13 @@
>         {
>             IEntry entry = ( IEntry ) inputElement;
>
> +            boolean fetchOperationalAttributes =
> entry.getBrowserConnection().isFetchOperationalAttributes();
>             boolean oai = entry.isOperationalAttributesInitialized();
>             boolean ai = entry.isAttributesInitialized();
> -            if ( ( !ai || ( !oai && showOperationalAttributes ) ) &&
> entry.isDirectoryEntry() )
> +            if ( ( !ai || ( !oai && fetchOperationalAttributes ) ) &&
> entry.isDirectoryEntry() )
>             {
>                 InitializeAttributesRunnable runnable = new
> InitializeAttributesRunnable( new IEntry[]
> -                    { entry }, showOperationalAttributes );
> +                    { entry }, fetchOperationalAttributes );
>                 StudioBrowserJob job = new StudioBrowserJob( runnable );
>                 job.execute();
>                 return new Object[0];
>
> Modified:
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/EditEntryWizard.java
> Fri Mar 13 07:47:07 2009
> @@ -92,10 +92,9 @@
>
>     private void initAttributes()
>     {
> -        boolean soa =
> BrowserCommonActivator.getDefault().getPreferenceStore().getBoolean(
> -
>  BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES
> );
> +        boolean foa =
> selectedEntry.getBrowserConnection().isFetchOperationalAttributes();
>         InitializeAttributesRunnable iar = new
> InitializeAttributesRunnable( new IEntry[]
> -            { selectedEntry }, soa );
> +            { selectedEntry }, foa );
>         RunnableContextRunner.execute( iar, getContainer(), true );
>     }
>
>
> Modified:
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
> Fri Mar 13 07:47:07 2009
> @@ -65,6 +65,9 @@
>     /** The key for the connection parameter "Referrals Handling". */
>     public static String CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD =
> "ldapbrowser.referralsHandlingMethod";
>
> +    /** The key for the connection parameter "Fetch Operational
> Attributes. */
> +    public static String CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES
> = "ldapbrowser.fetchOperationalAttributes";
> +
>     /** The key for the connection parameter "Fetch Sub-entries". */
>     public static String CONNECTION_PARAMETER_FETCH_SUBENTRIES =
> "ldapbrowser.fetchSubentries";
>
> @@ -206,6 +209,22 @@
>
>
>     /**
> +     * Checks if operational attributes should be fetched.
> +     *
> +     * @return the true if operational attributes should be fetched
> +     */
> +    public abstract boolean isFetchOperationalAttributes();
> +
> +
> +    /**
> +     * Sets if operational attributes should be fetched.
> +     *
> +     * @param fetchSubentries true to fetch operational attributes
> +     */
> +    public abstract void setFetchOperationalAttributes( boolean
> fetchOperationalAttributes );
> +
> +
> +    /**
>      * Checks if paged search should be used.
>      *
>      * @return the true if paged search should be used
>
> Modified:
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
> Fri Mar 13 07:47:07 2009
> @@ -138,7 +138,7 @@
>      */
>     public void clearCaches()
>     {
> -        for(ISearch search : getSearchManager().getSearches())
> +        for ( ISearch search : getSearchManager().getSearches() )
>         {
>             search.setSearchResults( null );
>         }
> @@ -327,6 +327,27 @@
>     /**
>      * {@inheritDoc}
>      */
> +    public boolean isFetchOperationalAttributes()
> +    {
> +        return
> connection.getConnectionParameter().getExtendedBoolProperty(
> +            CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES );
> +    }
> +
> +
> +    /**
> +     * {@inheritDoc}
> +     */
> +    public void setFetchOperationalAttributes( boolean
> fetchOperationalAttribures )
> +    {
> +        connection.getConnectionParameter().setExtendedBoolProperty(
> CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES,
> +            fetchOperationalAttribures );
> +        ConnectionEventRegistry.fireConnectionUpdated( connection, this );
> +    }
> +
> +
> +    /**
> +     * {@inheritDoc}
> +     */
>     public boolean isPagedSearch()
>     {
>         return connection.getConnectionParameter().getExtendedBoolProperty(
> CONNECTION_PARAMETER_PAGED_SEARCH );
>
> Modified:
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
> Fri Mar 13 07:47:07 2009
> @@ -254,6 +254,23 @@
>     /**
>      * {@inheritDoc}
>      */
> +    public boolean isFetchOperationalAttributes()
> +    {
> +        return false;
> +    }
> +
> +
> +    /**
> +     * {@inheritDoc}
> +     */
> +    public void setFetchOperationalAttributes( boolean
> fetchOperationalAttributes )
> +    {
> +    }
> +
> +
> +    /**
> +     * {@inheritDoc}
> +     */
>     public boolean isPagedSearch()
>     {
>         return false;
>
> Modified:
> directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorActionGroup.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorActionGroup.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorActionGroup.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorActionGroup.java
> Fri Mar 13 07:47:07 2009
> @@ -25,6 +25,7 @@
>  import
> org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.CollapseAllAction;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.DeleteAllValuesAction;
> +import
> org.apache.directory.studio.ldapbrowser.common.actions.FetchOperationalAttributesAction;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.NewAttributeAction;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.RefreshAction;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.proxy.EntryEditorActionProxy;
> @@ -151,6 +152,9 @@
>     /** The Constant showLsdAction. */
>     private static final String showLsdAction = "showLsdAction";
> //$NON-NLS-1$
>
> +    /** The Constant fetchOperationalAttributesAction. */
> +    private static final String fetchOperationalAttributesAction =
> "fetchOperationalAttributesAction";
> +
>
>     /**
>      * Creates a new instance of EntryEditorActionGroup.
> @@ -224,6 +228,8 @@
>
>         entryEditorActionMap.put( deleteAllValuesAction, new
> EntryEditorActionProxy( viewer,
>             new DeleteAllValuesAction() ) );
> +        entryEditorActionMap.put( fetchOperationalAttributesAction, new
> EntryEditorActionProxy( viewer,
> +            new FetchOperationalAttributesAction() ) );
>     }
>
>
> @@ -361,6 +367,10 @@
>
>         // refresh
>         menuManager.add( entryEditorActionMap.get( refreshAttributesAction
> ) );
> +        if ( entryEditorActionMap.get( fetchOperationalAttributesAction
> ).isEnabled() )
> +        {
> +            menuManager.add( entryEditorActionMap.get(
> fetchOperationalAttributesAction ) );
> +        }
>         menuManager.add( new Separator() );
>
>         // additions
>
> Modified:
> directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
> URL:
> http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java?rev=753151&r1=753150&r2=753151&view=diff
>
> ==============================================================================
> ---
> directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
> (original)
> +++
> directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
> Fri Mar 13 07:47:07 2009
> @@ -23,6 +23,7 @@
>
>  import org.apache.directory.studio.ldapbrowser.common.actions.CopyAction;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.DeleteAction;
> +import
> org.apache.directory.studio.ldapbrowser.common.actions.FetchOperationalAttributesAction;
>  import org.apache.directory.studio.ldapbrowser.common.actions.PasteAction;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.RenameAction;
>  import
> org.apache.directory.studio.ldapbrowser.common.actions.proxy.BrowserActionProxy;
> @@ -158,6 +159,9 @@
>
>     /** The Constant exportExcelAction. */
>     private static final String exportExcelAction = "exportExcelAction";
> //$NON-NLS-1$
> +
> +    /** The Constant fetchOperationalAttributesAction. */
> +    private static final String fetchOperationalAttributesAction =
> "fetchOperationalAttributesAction"; //$NON-NLS-1$
>
>
>     /**
> @@ -228,6 +232,9 @@
>             ImportExportAction.TYPE_EXPORT_CSV ) ) );
>         browserActionMap.put( exportExcelAction, new
> BrowserViewActionProxy( viewer, new ImportExportAction(
>             ImportExportAction.TYPE_EXPORT_EXCEL ) ) );
> +
> +        browserActionMap.put( fetchOperationalAttributesAction, new
> BrowserViewActionProxy( viewer,
> +            new FetchOperationalAttributesAction() ) );
>     }
>
>
> @@ -355,6 +362,10 @@
>
>         // refresh
>         menuManager.add( browserActionMap.get( refreshAction ) );
> +        if ( browserActionMap.get( fetchOperationalAttributesAction
> ).isEnabled() )
> +        {
> +            menuManager.add( browserActionMap.get(
> fetchOperationalAttributesAction ) );
> +        }
>         menuManager.add( new Separator() );
>
>         // additions
>
>
>

Mime
View raw message