directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r550291 [2/2] - in /directory/studio/trunk: studio-ldapbrowser-common/ studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/ studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapb...
Date Sun, 24 Jun 2007 21:49:26 GMT
Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java?view=diff&rev=550291&r1=550290&r2=550291
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java
Sun Jun 24 14:49:23 2007
@@ -33,6 +33,7 @@
 import org.apache.directory.studio.ldapbrowser.common.actions.RefreshAction;
 import org.apache.directory.studio.ldapbrowser.common.actions.ShowRawValuesAction;
 import org.apache.directory.studio.ldapbrowser.common.actions.ValueEditorPreferencesAction;
+import org.apache.directory.studio.ldapbrowser.common.actions.proxy.ActionHandlerManager;
 import org.apache.directory.studio.ldapbrowser.common.actions.proxy.BrowserActionProxy;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.ui.actions.CopyAttributeDescriptionAction;
@@ -48,6 +49,7 @@
 import org.apache.directory.studio.ldapbrowser.ui.actions.OpenSearchResultAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.proxy.SearchResultEditorActionProxy;
 import org.apache.directory.studio.valueeditors.IValueEditor;
+import org.apache.directory.studio.valueeditors.ValueEditorManager;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
@@ -64,7 +66,7 @@
 import org.eclipse.ui.commands.ICommandService;
 
 
-public class SearchResultEditorActionGroup implements IMenuListener
+public class SearchResultEditorActionGroup implements ActionHandlerManager, IMenuListener
 {
 
     private ShowDNAction showDNAction;
@@ -76,12 +78,16 @@
     private OpenSearchResultEditorPreferencePage openSearchResultEditorPreferencePage;
 
     private ShowQuickFilterAction showQuickFilterAction;
-
-    private OpenDefaultEditorAction openDefaultEditorAction;
-
-    private OpenBestEditorAction openBestEditorAction;
-
-    private OpenEditorAction[] openEditorActions;
+    
+    /** The open default editor action. */
+    private SearchResultEditorActionProxy openDefaultValueEditorActionProxy;
+
+    /** The open best editor action. */
+    private SearchResultEditorActionProxy openBestValueEditorActionProxy;
+
+    /** The open editor actions. */
+    private SearchResultEditorActionProxy[] openValueEditorActionProxies;
+    
 
     private ValueEditorPreferencesAction openValueEditorPreferencesAction;
 
@@ -155,6 +161,7 @@
 
         TableViewer viewer = searchResultEditor.getMainWidget().getViewer();
         SearchResultEditorCursor cursor = searchResultEditor.getConfiguration().getCursor(
viewer );
+        ValueEditorManager valueEditorManager = searchResultEditor.getConfiguration().getValueEditorManager(
viewer );
 
         this.showDNAction = new ShowDNAction();
         this.showLinksAction = new ShowLinksAction();
@@ -163,84 +170,83 @@
         this.showQuickFilterAction = new ShowQuickFilterAction( searchResultEditor.getMainWidget()
             .getQuickFilterWidget() );
 
-        this.openBestEditorAction = new OpenBestEditorAction( viewer, searchResultEditor.getConfiguration().getCursor(
-            viewer ), this, searchResultEditor.getConfiguration().getValueEditorManager(
viewer ) );
-        this.openDefaultEditorAction = new OpenDefaultEditorAction( this.openBestEditorAction
);
+        openBestValueEditorActionProxy = new SearchResultEditorActionProxy( cursor, this,
new OpenBestEditorAction(
+            viewer, cursor, valueEditorManager ) );
+        openDefaultValueEditorActionProxy = new SearchResultEditorActionProxy( cursor, this,
+            new OpenDefaultEditorAction( viewer, cursor, valueEditorManager, openBestValueEditorActionProxy
) );
         IValueEditor[] valueEditors = searchResultEditor.getConfiguration().getValueEditorManager(
viewer )
             .getAllValueEditors();
-        this.openEditorActions = new OpenEditorAction[valueEditors.length];
-        for ( int i = 0; i < this.openEditorActions.length; i++ )
+        openValueEditorActionProxies = new SearchResultEditorActionProxy[valueEditors.length];
+        for ( int i = 0; i < openValueEditorActionProxies.length; i++ )
         {
-            this.openEditorActions[i] = new OpenEditorAction( viewer, searchResultEditor.getConfiguration().getCursor(
-                viewer ), this, searchResultEditor.getConfiguration().getValueEditorManager(
viewer ),
-                valueEditors[i] );
-        }
+            openValueEditorActionProxies[i] = new SearchResultEditorActionProxy( cursor,
this, new OpenEditorAction( viewer, cursor,
+                valueEditorManager, valueEditors[i] ) );
+        }        
         this.openValueEditorPreferencesAction = new ValueEditorPreferencesAction();
 
         this.searchResultEditorActionMap.put( copyTableAction, new SearchResultEditorActionProxy(
cursor,
-            new CopyEntryAsCsvAction( CopyEntryAsCsvAction.MODE_TABLE ) ) );
+            this, new CopyEntryAsCsvAction( CopyEntryAsCsvAction.MODE_TABLE ) ) );
         this.searchResultEditorActionMap.put( refreshSearchAction, new SearchResultEditorActionProxy(
cursor,
-            new RefreshAction() ) );
+            this, new RefreshAction() ) );
 
         this.searchResultEditorActionMap.put( newValueAction, new SearchResultEditorActionProxy(
cursor,
-            new NewValueAction() ) );
+            this, new NewValueAction() ) );
         this.searchResultEditorActionMap.put( newSearchAction, new SearchResultEditorActionProxy(
cursor,
-            new NewSearchAction() ) );
+            this, new NewSearchAction() ) );
         this.searchResultEditorActionMap.put( newBatchOperationAction, new SearchResultEditorActionProxy(
cursor,
-            new NewBatchOperationAction() ) );
+            this, new NewBatchOperationAction() ) );
 
         this.searchResultEditorActionMap.put( locateDnInDitAction, new SearchResultEditorActionProxy(
cursor,
-            new LocateDnInDitAction() ) );
+            this, new LocateDnInDitAction() ) );
         this.searchResultEditorActionMap.put( openSearchResultAction, new SearchResultEditorActionProxy(
cursor,
-            new OpenSearchResultAction() ) );
+            this, new OpenSearchResultAction() ) );
 
         this.searchResultEditorActionMap.put( showOcdAction, new SearchResultEditorActionProxy(
cursor,
-            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_OBJECTCLASS ) ) );
+            this, new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_OBJECTCLASS )
) );
         this.searchResultEditorActionMap.put( showAtdAction, new SearchResultEditorActionProxy(
cursor,
-            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_ATTRIBUTETYPE ) ) );
+            this, new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_ATTRIBUTETYPE
) ) );
         this.searchResultEditorActionMap.put( showEqualityMrdAction, new SearchResultEditorActionProxy(
cursor,
-            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_EQUALITYMATCHINGRULE
) ) );
+            this, new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_EQUALITYMATCHINGRULE
) ) );
         this.searchResultEditorActionMap.put( showSubstringMrdAction, new SearchResultEditorActionProxy(
cursor,
-            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_SUBSTRINGMATCHINGRULE
) ) );
+            this, new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_SUBSTRINGMATCHINGRULE
) ) );
         this.searchResultEditorActionMap.put( showOrderingMrdAction, new SearchResultEditorActionProxy(
cursor,
-            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_ORDERINGMATCHINGRULE
) ) );
+            this, new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_ORDERINGMATCHINGRULE
) ) );
         this.searchResultEditorActionMap.put( showLsdAction, new SearchResultEditorActionProxy(
cursor,
-            new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_SYNTAX ) ) );
+            this, new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_SYNTAX ) ) );
 
         this.searchResultEditorActionMap.put( pasteAction, new SearchResultEditorActionProxy(
cursor,
-            new SearchResultEditorPasteAction() ) );
-        this.searchResultEditorActionMap.put( copyAction, new SearchResultEditorActionProxy(
cursor, new CopyAction(
+            this, new SearchResultEditorPasteAction() ) );
+        this.searchResultEditorActionMap.put( copyAction, new SearchResultEditorActionProxy(
cursor, this, new CopyAction(
             ( BrowserActionProxy ) this.searchResultEditorActionMap.get( pasteAction ) )
) );
         this.searchResultEditorActionMap.put( deleteAction, new SearchResultEditorActionProxy(
cursor,
-            new SearchResultDeleteAction() ) );
+            this, new SearchResultDeleteAction() ) );
 
         this.searchResultEditorActionMap.put( copyDnAction, new SearchResultEditorActionProxy(
cursor,
-            new CopyDnAction() ) );
+            this, new CopyDnAction() ) );
         this.searchResultEditorActionMap.put( copyUrlAction, new SearchResultEditorActionProxy(
cursor,
-            new CopyUrlAction() ) );
+            this, new CopyUrlAction() ) );
         this.searchResultEditorActionMap.put( copyAttriuteDescriptionAction, new SearchResultEditorActionProxy(
cursor,
-            new CopyAttributeDescriptionAction() ) );
+            this, new CopyAttributeDescriptionAction() ) );
         this.searchResultEditorActionMap.put( copyValueUtf8Action, new SearchResultEditorActionProxy(
cursor,
-            new CopyValueAction( CopyValueAction.MODE_UTF8 ) ) );
+            this, new CopyValueAction( CopyValueAction.MODE_UTF8 ) ) );
         this.searchResultEditorActionMap.put( copyValueBase64Action, new SearchResultEditorActionProxy(
cursor,
-            new CopyValueAction( CopyValueAction.MODE_BASE64 ) ) );
+            this, new CopyValueAction( CopyValueAction.MODE_BASE64 ) ) );
         this.searchResultEditorActionMap.put( copyValueHexAction, new SearchResultEditorActionProxy(
cursor,
-            new CopyValueAction( CopyValueAction.MODE_HEX ) ) );
+            this, new CopyValueAction( CopyValueAction.MODE_HEX ) ) );
         this.searchResultEditorActionMap.put( copyValueAsLdifAction, new SearchResultEditorActionProxy(
cursor,
-            new CopyValueAction( CopyValueAction.MODE_LDIF ) ) );
+            this, new CopyValueAction( CopyValueAction.MODE_LDIF ) ) );
 
         this.searchResultEditorActionMap.put( copySearchFilterAction, new SearchResultEditorActionProxy(
cursor,
-            new CopySearchFilterAction( CopySearchFilterAction.MODE_EQUALS ) ) );
+            this, new CopySearchFilterAction( CopySearchFilterAction.MODE_EQUALS ) ) );
         this.searchResultEditorActionMap.put( copyNotSearchFilterAction, new SearchResultEditorActionProxy(
cursor,
-            new CopySearchFilterAction( CopySearchFilterAction.MODE_NOT ) ) );
+            this, new CopySearchFilterAction( CopySearchFilterAction.MODE_NOT ) ) );
         this.searchResultEditorActionMap.put( copyAndSearchFilterAction, new SearchResultEditorActionProxy(
cursor,
-            new CopySearchFilterAction( CopySearchFilterAction.MODE_AND ) ) );
+            this, new CopySearchFilterAction( CopySearchFilterAction.MODE_AND ) ) );
         this.searchResultEditorActionMap.put( copyOrSearchFilterAction, new SearchResultEditorActionProxy(
cursor,
-            new CopySearchFilterAction( CopySearchFilterAction.MODE_OR ) ) );
+            this, new CopySearchFilterAction( CopySearchFilterAction.MODE_OR ) ) );
 
         this.searchResultEditorActionMap.put( propertyDialogAction, new SearchResultEditorActionProxy(
cursor,
-            new PropertiesAction() ) );
-
+            this, new PropertiesAction() ) );
     }
 
 
@@ -257,15 +263,15 @@
             this.openSearchResultEditorPreferencePage = null;
             this.showQuickFilterAction.dispose();
             this.showQuickFilterAction = null;
-
-            this.openDefaultEditorAction.dispose();
-            this.openDefaultEditorAction = null;
-            this.openBestEditorAction.dispose();
-            this.openBestEditorAction = null;
-            for ( int i = 0; i < this.openEditorActions.length; i++ )
+            
+            openDefaultValueEditorActionProxy.dispose();
+            openDefaultValueEditorActionProxy = null;
+            openBestValueEditorActionProxy.dispose();
+            openBestValueEditorActionProxy = null;
+            for ( int i = 0; i < openValueEditorActionProxies.length; i++ )
             {
-                this.openEditorActions[i].dispose();
-                this.openEditorActions[i] = null;
+                openValueEditorActionProxies[i].dispose();
+                openValueEditorActionProxies[i] = null;
             }
             this.openValueEditorPreferencesAction = null;
 
@@ -338,7 +344,6 @@
 
     public void menuAboutToShow( IMenuManager menuManager )
     {
-
         // new
         menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( newValueAction
) );
         menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( newSearchAction
) );
@@ -386,20 +391,20 @@
         menuManager.add( new Separator() );
 
         // edit
-        menuManager.add( this.openDefaultEditorAction );
+        menuManager.add( openDefaultValueEditorActionProxy );
         MenuManager editorMenuManager = new MenuManager( "Edit Value With" );
-        if ( this.openBestEditorAction.isEnabled() )
+        if ( openBestValueEditorActionProxy.isEnabled() )
         {
-            editorMenuManager.add( this.openBestEditorAction );
+            editorMenuManager.add( openBestValueEditorActionProxy );
             editorMenuManager.add( new Separator() );
         }
-        for ( int i = 0; i < this.openEditorActions.length; i++ )
+        for ( int i = 0; i < openValueEditorActionProxies.length; i++ )
         {
-            if ( this.openEditorActions[i].isEnabled()
-                && this.openEditorActions[i].getValueEditor().getClass() != this.openBestEditorAction
-                    .getBestValueEditor().getClass() )
+            if ( openValueEditorActionProxies[i].isEnabled()
+                && ( ( OpenEditorAction ) openValueEditorActionProxies[i].getAction()
).getValueEditor().getClass() != ( ( OpenBestEditorAction ) openBestValueEditorActionProxy
+                    .getAction() ).getBestValueEditor().getClass() )
             {
-                editorMenuManager.add( this.openEditorActions[i] );
+                editorMenuManager.add( openValueEditorActionProxies[i] );
             }
         }
         editorMenuManager.add( new Separator() );
@@ -416,13 +421,11 @@
 
         // / properties
         menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( propertyDialogAction
) );
-
     }
 
 
     public void activateGlobalActionHandlers()
     {
-
         if ( this.actionBars != null )
         {
             actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), ( IAction ) this.searchResultEditorActionMap
@@ -449,16 +452,14 @@
             commandService.getCommand( lid.getActionDefinitionId() ).setHandler( new ActionHandler(
lid ) );
             IAction osr = ( IAction ) this.searchResultEditorActionMap.get( openSearchResultAction
);
             commandService.getCommand( osr.getActionDefinitionId() ).setHandler( new ActionHandler(
osr ) );
-            commandService.getCommand( openDefaultEditorAction.getActionDefinitionId() ).setHandler(
-                new ActionHandler( openDefaultEditorAction ) );
+            commandService.getCommand( openDefaultValueEditorActionProxy.getActionDefinitionId()
).setHandler(
+                new ActionHandler( openDefaultValueEditorActionProxy ) );
         }
-
     }
 
 
     public void deactivateGlobalActionHandlers()
     {
-
         if ( this.actionBars != null )
         {
             actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), null );
@@ -480,15 +481,14 @@
             commandService.getCommand( lid.getActionDefinitionId() ).setHandler( null );
             IAction osr = ( IAction ) this.searchResultEditorActionMap.get( openSearchResultAction
);
             commandService.getCommand( osr.getActionDefinitionId() ).setHandler( null );
-            commandService.getCommand( openDefaultEditorAction.getActionDefinitionId() ).setHandler(
null );
+            commandService.getCommand( openDefaultValueEditorActionProxy.getActionDefinitionId()
).setHandler( null );
         }
-
     }
 
 
     public OpenBestEditorAction getOpenBestEditorAction()
     {
-        return openBestEditorAction;
+        return ( OpenBestEditorAction ) openBestValueEditorActionProxy.getAction();
     }
 
 
@@ -504,17 +504,17 @@
 
     public boolean isEditorActive()
     {
-        if ( this.openDefaultEditorAction.isActive() )
+        if ( ((AbstractOpenEditorAction)openDefaultValueEditorActionProxy.getAction()).isActive()
)
         {
             return true;
         }
-        if ( this.openBestEditorAction.isActive() )
+        if ( ((AbstractOpenEditorAction)openBestValueEditorActionProxy.getAction()).isActive()
)
         {
             return true;
         }
-        for ( int i = 0; i < this.openEditorActions.length; i++ )
+        for ( int i = 0; i < openValueEditorActionProxies.length; i++ )
         {
-            if ( this.openEditorActions[i].isActive() )
+            if ( ((AbstractOpenEditorAction)openValueEditorActionProxies[i].getAction()).isActive()
)
             {
                 return true;
             }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java?view=diff&rev=550291&r1=550290&r2=550291
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
Sun Jun 24 14:49:23 2007
@@ -176,54 +176,54 @@
         showDirectoryMetadataEntriesAction = new ShowDirectoryMetadataEntriesAction();
         openBrowserPreferencePageAction = new OpenBrowserPreferencePageAction();
 
-        browserActionMap.put( newEntryAction, new BrowserViewActionProxy( viewer, new NewEntryAction(
view.getSite()
-            .getWorkbenchWindow() ) ) );
-        browserActionMap.put( newSearchAction, new BrowserViewActionProxy( viewer, new NewSearchAction()
) );
-        browserActionMap.put( newBookmarkAction, new BrowserViewActionProxy( viewer, new
NewBookmarkAction() ) );
-        browserActionMap.put( newBatchOperationAction, new BrowserViewActionProxy( viewer,
+        browserActionMap.put( newEntryAction, new BrowserViewActionProxy( viewer, this, new
NewEntryAction( view
+            .getSite().getWorkbenchWindow() ) ) );
+        browserActionMap.put( newSearchAction, new BrowserViewActionProxy( viewer, this,
new NewSearchAction() ) );
+        browserActionMap.put( newBookmarkAction, new BrowserViewActionProxy( viewer, this,
new NewBookmarkAction() ) );
+        browserActionMap.put( newBatchOperationAction, new BrowserViewActionProxy( viewer,
this,
             new NewBatchOperationAction() ) );
 
-        browserActionMap
-            .put( locateEntryInDitAction, new BrowserViewActionProxy( viewer, new LocateEntryInDitAction()
) );
+        browserActionMap.put( locateEntryInDitAction, new BrowserViewActionProxy( viewer,
this,
+            new LocateEntryInDitAction() ) );
 
-        browserActionMap.put( pasteAction, new BrowserViewActionProxy( viewer, new PasteAction()
) );
-        browserActionMap.put( copyAction, new BrowserViewActionProxy( viewer, new CopyAction(
+        browserActionMap.put( pasteAction, new BrowserViewActionProxy( viewer, this, new
PasteAction() ) );
+        browserActionMap.put( copyAction, new BrowserViewActionProxy( viewer, this, new CopyAction(
             ( BrowserActionProxy ) browserActionMap.get( pasteAction ) ) ) );
-        browserActionMap.put( deleteAction, new BrowserViewActionProxy( viewer, new DeleteAction()
) );
-        browserActionMap.put( moveAction, new BrowserViewActionProxy( viewer, new MoveAction()
) );
-        browserActionMap.put( renameAction, new BrowserViewActionProxy( viewer, new RenameAction()
) );
+        browserActionMap.put( deleteAction, new BrowserViewActionProxy( viewer, this, new
DeleteAction() ) );
+        browserActionMap.put( moveAction, new BrowserViewActionProxy( viewer, this, new MoveAction()
) );
+        browserActionMap.put( renameAction, new BrowserViewActionProxy( viewer, this, new
RenameAction() ) );
 
-        browserActionMap.put( copyDnAction, new BrowserViewActionProxy( viewer, new CopyDnAction()
) );
-        browserActionMap.put( copyUrlAction, new BrowserViewActionProxy( viewer, new CopyUrlAction()
) );
+        browserActionMap.put( copyDnAction, new BrowserViewActionProxy( viewer, this, new
CopyDnAction() ) );
+        browserActionMap.put( copyUrlAction, new BrowserViewActionProxy( viewer, this, new
CopyUrlAction() ) );
 
-        browserActionMap.put( copyEntryAsLdifAction, new BrowserViewActionProxy( viewer,
new CopyEntryAsLdifAction(
-            CopyEntryAsLdifAction.MODE_NORMAL ) ) );
-        browserActionMap.put( copyEntryAsLdifDnOnlyAction, new BrowserViewActionProxy( viewer,
+        browserActionMap.put( copyEntryAsLdifAction, new BrowserViewActionProxy( viewer,
this,
+            new CopyEntryAsLdifAction( CopyEntryAsLdifAction.MODE_NORMAL ) ) );
+        browserActionMap.put( copyEntryAsLdifDnOnlyAction, new BrowserViewActionProxy( viewer,
this,
             new CopyEntryAsLdifAction( CopyEntryAsLdifAction.MODE_DN_ONLY ) ) );
-        browserActionMap.put( copyEntryAsLdifReturningAttributesOnlyAction, new BrowserViewActionProxy(
viewer,
+        browserActionMap.put( copyEntryAsLdifReturningAttributesOnlyAction, new BrowserViewActionProxy(
viewer, this,
             new CopyEntryAsLdifAction( CopyEntryAsLdifAction.MODE_RETURNING_ATTRIBUTES_ONLY
) ) );
-        browserActionMap.put( copyEntryAsLdifOperationalAction, new BrowserViewActionProxy(
viewer,
+        browserActionMap.put( copyEntryAsLdifOperationalAction, new BrowserViewActionProxy(
viewer, this,
             new CopyEntryAsLdifAction( CopyEntryAsLdifAction.MODE_INCLUDE_OPERATIONAL_ATTRIBUTES
) ) );
-        browserActionMap.put( copyEntryAsCsvAction, new BrowserViewActionProxy( viewer, new
CopyEntryAsCsvAction(
+        browserActionMap.put( copyEntryAsCsvAction, new BrowserViewActionProxy( viewer, this,
new CopyEntryAsCsvAction(
             CopyEntryAsLdifAction.MODE_NORMAL ) ) );
-        browserActionMap.put( copyEntryAsCsvDnOnlyAction, new BrowserViewActionProxy( viewer,
new CopyEntryAsCsvAction(
-            CopyEntryAsLdifAction.MODE_DN_ONLY ) ) );
-        browserActionMap.put( copyEntryAsCsvReturningAttributesOnlyAction, new BrowserViewActionProxy(
viewer,
+        browserActionMap.put( copyEntryAsCsvDnOnlyAction, new BrowserViewActionProxy( viewer,
this,
+            new CopyEntryAsCsvAction( CopyEntryAsLdifAction.MODE_DN_ONLY ) ) );
+        browserActionMap.put( copyEntryAsCsvReturningAttributesOnlyAction, new BrowserViewActionProxy(
viewer, this,
             new CopyEntryAsCsvAction( CopyEntryAsLdifAction.MODE_RETURNING_ATTRIBUTES_ONLY
) ) );
-        browserActionMap.put( copyEntryAsCsvOperationalAction, new BrowserViewActionProxy(
viewer,
+        browserActionMap.put( copyEntryAsCsvOperationalAction, new BrowserViewActionProxy(
viewer, this,
             new CopyEntryAsCsvAction( CopyEntryAsLdifAction.MODE_INCLUDE_OPERATIONAL_ATTRIBUTES
) ) );
 
-        browserActionMap.put( importDsmlAction, new BrowserViewActionProxy( viewer, new ImportExportAction(
+        browserActionMap.put( importDsmlAction, new BrowserViewActionProxy( viewer, this,
new ImportExportAction(
             ImportExportAction.TYPE_IMPORT_DSML ) ) );
-        browserActionMap.put( exportDsmlAction, new BrowserViewActionProxy( viewer, new ImportExportAction(
+        browserActionMap.put( exportDsmlAction, new BrowserViewActionProxy( viewer, this,
new ImportExportAction(
             ImportExportAction.TYPE_EXPORT_DSML ) ) );
-        browserActionMap.put( importLdifAction, new BrowserViewActionProxy( viewer, new ImportExportAction(
+        browserActionMap.put( importLdifAction, new BrowserViewActionProxy( viewer, this,
new ImportExportAction(
             ImportExportAction.TYPE_IMPORT_LDIF ) ) );
-        browserActionMap.put( exportLdifAction, new BrowserViewActionProxy( viewer, new ImportExportAction(
+        browserActionMap.put( exportLdifAction, new BrowserViewActionProxy( viewer, this,
new ImportExportAction(
             ImportExportAction.TYPE_EXPORT_LDIF ) ) );
-        browserActionMap.put( exportCsvAction, new BrowserViewActionProxy( viewer, new ImportExportAction(
+        browserActionMap.put( exportCsvAction, new BrowserViewActionProxy( viewer, this,
new ImportExportAction(
             ImportExportAction.TYPE_EXPORT_CSV ) ) );
-        browserActionMap.put( exportExcelAction, new BrowserViewActionProxy( viewer, new
ImportExportAction(
+        browserActionMap.put( exportExcelAction, new BrowserViewActionProxy( viewer, this,
new ImportExportAction(
             ImportExportAction.TYPE_EXPORT_EXCEL ) ) );
 
     }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java?view=diff&rev=550291&r1=550290&r2=550291
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
Sun Jun 24 14:49:23 2007
@@ -98,22 +98,22 @@
         TableViewer viewer = view.getMainWidget().getViewer();
 
         linkWithEditorAction = new LinkWithEditorAction( view );
-        connectionActionMap
-            .put( selectAllAction, new ConnectionViewActionProxy( viewer, new SelectAllAction(
viewer ) ) );
-        connectionActionMap.put( importDsmlAction, new ConnectionViewActionProxy( viewer,
new ImportExportAction(
+        connectionActionMap.put( selectAllAction, new ConnectionViewActionProxy( viewer,
this, new SelectAllAction(
+            viewer ) ) );
+        connectionActionMap.put( importDsmlAction, new ConnectionViewActionProxy( viewer,
this, new ImportExportAction(
             ImportExportAction.TYPE_IMPORT_DSML ) ) );
-        connectionActionMap.put( exportDsmlAction, new ConnectionViewActionProxy( viewer,
new ImportExportAction(
+        connectionActionMap.put( exportDsmlAction, new ConnectionViewActionProxy( viewer,
this, new ImportExportAction(
             ImportExportAction.TYPE_EXPORT_DSML ) ) );
-        connectionActionMap.put( importLdifAction, new ConnectionViewActionProxy( viewer,
new ImportExportAction(
+        connectionActionMap.put( importLdifAction, new ConnectionViewActionProxy( viewer,
this, new ImportExportAction(
             ImportExportAction.TYPE_IMPORT_LDIF ) ) );
-        connectionActionMap.put( exportLdifAction, new ConnectionViewActionProxy( viewer,
new ImportExportAction(
+        connectionActionMap.put( exportLdifAction, new ConnectionViewActionProxy( viewer,
this, new ImportExportAction(
             ImportExportAction.TYPE_EXPORT_LDIF ) ) );
-        connectionActionMap.put( exportCsvAction, new ConnectionViewActionProxy( viewer,
new ImportExportAction(
+        connectionActionMap.put( exportCsvAction, new ConnectionViewActionProxy( viewer,
this, new ImportExportAction(
             ImportExportAction.TYPE_EXPORT_CSV ) ) );
-        connectionActionMap.put( exportExcelAction, new ConnectionViewActionProxy( viewer,
new ImportExportAction(
-            ImportExportAction.TYPE_EXPORT_EXCEL ) ) );
+        connectionActionMap.put( exportExcelAction, new ConnectionViewActionProxy( viewer,
this,
+            new ImportExportAction( ImportExportAction.TYPE_EXPORT_EXCEL ) ) );
 
-        connectionActionMap.put( openSchemaBrowserAction, new ConnectionViewActionProxy(
viewer,
+        connectionActionMap.put( openSchemaBrowserAction, new ConnectionViewActionProxy(
viewer, this,
             new OpenSchemaBrowserAction() ) );
 
         // DND support

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java?view=diff&rev=550291&r1=550290&r2=550291
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java
Sun Jun 24 14:49:23 2007
@@ -25,6 +25,7 @@
 import java.util.Iterator;
 import java.util.Map;
 
+import org.apache.directory.studio.ldapbrowser.common.actions.proxy.ActionHandlerManager;
 import org.apache.directory.studio.ldapbrowser.ui.actions.proxy.ModificationLogsViewActionProxy;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuListener;
@@ -40,7 +41,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ModificationLogsViewActionGroup implements IMenuListener
+public class ModificationLogsViewActionGroup implements ActionHandlerManager, IMenuListener
 {
 
     /** The view. */
@@ -54,7 +55,7 @@
 
     /** The Constant refreshAction. */
     private static final String refreshAction = "refreshAction";
-    
+
     /** The Constant refreshAction. */
     private static final String clearAction = "clearAction";
 
@@ -73,14 +74,14 @@
         SourceViewer viewer = this.view.getMainWidget().getSourceViewer();
 
         modificationLogsViewActionMap = new HashMap<String, ModificationLogsViewActionProxy>();
-        modificationLogsViewActionMap.put( olderAction, new ModificationLogsViewActionProxy(
viewer, new OlderAction(
-            view ) ) );
-        modificationLogsViewActionMap.put( newerAction, new ModificationLogsViewActionProxy(
viewer, new NewerAction(
-            view ) ) );
-        modificationLogsViewActionMap.put( refreshAction, new ModificationLogsViewActionProxy(
viewer,
+        modificationLogsViewActionMap.put( olderAction, new ModificationLogsViewActionProxy(
viewer, this,
+            new OlderAction( view ) ) );
+        modificationLogsViewActionMap.put( newerAction, new ModificationLogsViewActionProxy(
viewer, this,
+            new NewerAction( view ) ) );
+        modificationLogsViewActionMap.put( refreshAction, new ModificationLogsViewActionProxy(
viewer, this,
             new RefreshAction( view ) ) );
-        modificationLogsViewActionMap.put( clearAction, new ModificationLogsViewActionProxy(
viewer, new ClearAction(
-            view ) ) );
+        modificationLogsViewActionMap.put( clearAction, new ModificationLogsViewActionProxy(
viewer, this,
+            new ClearAction( view ) ) );
     }
 
 
@@ -116,7 +117,7 @@
     public void fillActionBars( IActionBars actionBars )
     {
         // Tool Bar
-    	actionBars.getToolBarManager().add( ( IAction ) modificationLogsViewActionMap.get( clearAction
) );
+        actionBars.getToolBarManager().add( ( IAction ) modificationLogsViewActionMap.get(
clearAction ) );
         actionBars.getToolBarManager().add( ( IAction ) modificationLogsViewActionMap.get(
refreshAction ) );
         actionBars.getToolBarManager().add( new Separator() );
         actionBars.getToolBarManager().add( ( IAction ) modificationLogsViewActionMap.get(
olderAction ) );
@@ -144,6 +145,22 @@
             ModificationLogsViewActionProxy action = ( ModificationLogsViewActionProxy )
it.next();
             action.inputChanged( input );
         }
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.common.actions.proxy.ActionHandlerManager#activateGlobalActionHandlers()
+     */
+    public void activateGlobalActionHandlers()
+    {
+    }
+
+
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.common.actions.proxy.ActionHandlerManager#deactivateGlobalActionHandlers()
+     */
+    public void deactivateGlobalActionHandlers()
+    {
     }
 
 }



Mime
View raw message