directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r687006 - in /directory/studio/trunk: connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/ ldapbrowser-ui/src/main/ja...
Date Tue, 19 Aug 2008 09:36:37 GMT
Author: seelmann
Date: Tue Aug 19 02:36:35 2008
New Revision: 687006

URL: http://svn.apache.org/viewvc?rev=687006&view=rev
Log:
Fix for DIRSTUDIO-363: Applied patch from Prakash G.R.. Make it possible to contribute menus
and actions to the connections view and browser view.

Modified:
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java?rev=687006&r1=687005&r2=687006&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
(original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
Tue Aug 19 02:36:35 2008
@@ -260,6 +260,7 @@
 
         // additions
         menuManager.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
+        menuManager.add( new Separator() );
 
         // properties
         menuManager.add( ( IAction ) connectionActionMap.get( propertyDialogAction ) );

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java?rev=687006&r1=687005&r2=687006&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserActionGroup.java
Tue Aug 19 02:36:35 2008
@@ -42,6 +42,7 @@
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.actions.ActionFactory;
 
 
@@ -147,7 +148,6 @@
     public void enableGlobalActionHandlers( IActionBars actionBars )
     {
         this.actionBars = actionBars;
-//        activateGlobalActionHandlers();
     }
 
 
@@ -214,6 +214,10 @@
         menuManager.add( ( IAction ) browserActionMap.get( refreshAction ) );
         menuManager.add( new Separator() );
 
+        // additions
+        menuManager.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
+        menuManager.add( new Separator() );
+
         // properties
         menuManager.add( ( IAction ) browserActionMap.get( propertyDialogAction ) );
     }
@@ -262,7 +266,7 @@
         {
             IAction ra = ( IAction ) browserActionMap.get( refreshAction );
             ActionUtils.deactivateActionHandler( ra );
-            
+
             IAction pda = ( IAction ) browserActionMap.get( propertyDialogAction );
             ActionUtils.deactivateActionHandler( pda );
         }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java?rev=687006&r1=687005&r2=687006&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserView.java
Tue Aug 19 02:36:35 2008
@@ -33,6 +33,8 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -126,7 +128,6 @@
      */
     public void createPartControl( Composite parent )
     {
-
         Composite composite = new Composite( parent, SWT.NONE );
         composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
         GridLayout layout = new GridLayout();
@@ -150,7 +151,9 @@
         actionGroup.fillToolBar( mainWidget.getToolBarManager() );
         actionGroup.fillMenu( mainWidget.getMenuManager() );
         actionGroup.enableGlobalActionHandlers( getViewSite().getActionBars() );
-        actionGroup.fillContextMenu( mainWidget.getContextMenuManager() );
+        IMenuManager contextMenuManager = mainWidget.getContextMenuManager();
+        actionGroup.fillContextMenu( contextMenuManager );
+        getSite().registerContextMenu( ( MenuManager ) contextMenuManager, mainWidget.getViewer()
);
 
         // create the listener
         getSite().setSelectionProvider( mainWidget.getViewer() );
@@ -228,7 +231,7 @@
                     parentEntry.setChildrenInitialized( true );
                     parentEntry.setHasMoreChildren( true );
                 }
-                
+
                 // force refresh of each parent, beginning from the root
                 // if the entry to select was lazy initialized then the 
                 // JFace model has no knowledge about it so we must

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=687006&r1=687005&r2=687006&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
Tue Aug 19 02:36:35 2008
@@ -355,6 +355,7 @@
 
         // additions
         menuManager.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
+        menuManager.add( new Separator() );
 
         // properties
         menuManager.add( ( IAction ) browserActionMap.get( propertyDialogAction ) );

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java?rev=687006&r1=687005&r2=687006&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionView.java
Tue Aug 19 02:36:35 2008
@@ -26,6 +26,8 @@
 import org.apache.directory.studio.connection.ui.widgets.ConnectionConfiguration;
 import org.apache.directory.studio.connection.ui.widgets.ConnectionWidget;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -138,20 +140,13 @@
         actionGroup.fillToolBar( mainWidget.getToolBarManager() );
         actionGroup.fillMenu( mainWidget.getMenuManager() );
         actionGroup.enableGlobalActionHandlers( getViewSite().getActionBars() );
-        actionGroup.fillContextMenu( configuration.getContextMenuManager( mainWidget.getViewer()
) );
-        
+        IMenuManager contextMenuManager = configuration.getContextMenuManager( mainWidget.getViewer()
);
+        actionGroup.fillContextMenu( contextMenuManager );
+        getSite().registerContextMenu( ( MenuManager ) contextMenuManager, mainWidget.getViewer()
);
+
         // create the listener
         getSite().setSelectionProvider( mainWidget.getViewer() );
         universalListener = new ConnectionViewUniversalListener( this );
-        
-        // default selection
-//        Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager().getConnections();
-//        if ( connections.length > 0 )
-//        {
-//            ISelection selection = new StructuredSelection( connections[0] );
-//            mainWidget.getViewer().setSelection( selection );
-//            //this.universalListener.selectionChanged( this, selection );
-//        }
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java?rev=687006&r1=687005&r2=687006&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewActionGroup.java
Tue Aug 19 02:36:35 2008
@@ -182,6 +182,7 @@
 
         // additions
         menuManager.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
+        menuManager.add( new Separator() );
 
         // properties
         menuManager.add( ( IAction ) connectionActionMap.get( propertyDialogAction ) );



Mime
View raw message