directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r487231 - /directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationActionBarAdvisor.java
Date Thu, 14 Dec 2006 15:17:47 GMT
Author: pamarcelot
Date: Thu Dec 14 07:17:46 2006
New Revision: 487231

URL: http://svn.apache.org/viewvc?view=rev&rev=487231
Log:
Updating the Window menu to use standard 'Open Perspective' and 'Show View' menu items.

Modified:
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationActionBarAdvisor.java

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationActionBarAdvisor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationActionBarAdvisor.java?view=diff&rev=487231&r1=487230&r2=487231
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationActionBarAdvisor.java
(original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationActionBarAdvisor.java
Thu Dec 14 07:17:46 2006
@@ -26,6 +26,7 @@
 import org.apache.directory.ldapstudio.actions.UpdateAction;
 import org.apache.directory.ldapstudio.view.ImageKeys;
 import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.ICoolBarManager;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
@@ -37,6 +38,7 @@
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ContributionItemFactory;
 import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
 import org.eclipse.ui.application.ActionBarAdvisor;
 import org.eclipse.ui.application.IActionBarConfigurer;
@@ -65,10 +67,8 @@
     private IWorkbenchAction importAction;
     private IWorkbenchAction exportAction;
     private IWorkbenchAction propertiesAction;
-    private IWorkbenchAction openPerspectiveAction;
     private IWorkbenchAction closePerspectiveAction;
     private IWorkbenchAction closeAllPerspectivesAction;
-    private IWorkbenchAction showViewAction;
     private IWorkbenchAction undoAction;
     private IWorkbenchAction redoAction;
     private IWorkbenchAction cutAction;
@@ -76,6 +76,8 @@
     private IWorkbenchAction pasteAction;
     private IWorkbenchAction deleteAction;
     private IWorkbenchAction selectAllAction;
+    private IContributionItem perspectivesList;
+    private IContributionItem viewsList;
 
 
     public ApplicationActionBarAdvisor( IActionBarConfigurer configurer )
@@ -148,12 +150,6 @@
         selectAllAction = ActionFactory.SELECT_ALL.create( window );
         register( selectAllAction );
         
-        openPerspectiveAction = ActionFactory.OPEN_PERSPECTIVE_DIALOG.create( window );
-        register( openPerspectiveAction );
-        
-        showViewAction = ActionFactory.SHOW_VIEW_MENU.create( window );
-        register( showViewAction );
-        
         closePerspectiveAction = ActionFactory.CLOSE_PERSPECTIVE.create( window );
         register( closePerspectiveAction );
         
@@ -179,6 +175,9 @@
 
         helpAction = ActionFactory.HELP_CONTENTS.create( window );
         register( helpAction );
+        
+        viewsList = ContributionItemFactory.VIEWS_SHORTLIST.create( window );
+        perspectivesList = ContributionItemFactory.PERSPECTIVES_SHORTLIST.create( window
);
     }
 
 
@@ -228,8 +227,12 @@
         editMenu.add( selectAllAction );
         
         // Window 
-        windowMenu.add( openPerspectiveAction );
-        windowMenu.add( showViewAction );
+        MenuManager perspectiveMenu = new MenuManager("Open Perspective", "openPerspective");
+        perspectiveMenu.add(perspectivesList);
+        windowMenu.add(perspectiveMenu);
+        MenuManager viewMenu = new MenuManager("Show View");
+        viewMenu.add(viewsList);
+        windowMenu.add(viewMenu);
         windowMenu.add( new Separator() );
         windowMenu.add( closePerspectiveAction );
         windowMenu.add( closeAllPerspectivesAction );



Mime
View raw message