directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r500993 - in /directory/ldapstudio/trunk/ldapstudio-schemas-plugin: ressources/icons/ src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/ src/main/java/org/apache/directory/ldapstudio/schemas/view/ src/main/java/org/ap...
Date Mon, 29 Jan 2007 10:08:21 GMT
Author: pamarcelot
Date: Mon Jan 29 02:08:20 2007
New Revision: 500993

URL: http://svn.apache.org/viewvc?view=rev&rev=500993
Log:
Adding a CollapseAll Action to the Schemas View and the Hierarchy View.

Added:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/collapse_all.gif
  (with props)
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/CollapseAllAction.java
Modified:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorHierarchyView.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorSchemasView.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/IImageKeys.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchicalViewer.java
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/PoolManager.java

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/collapse_all.gif
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/collapse_all.gif?view=auto&rev=500993
==============================================================================
Binary file - no diff available.

Propchange: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/ressources/icons/collapse_all.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/CollapseAllAction.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/CollapseAllAction.java?view=auto&rev=500993
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/CollapseAllAction.java
(added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/CollapseAllAction.java
Mon Jan 29 02:08:20 2007
@@ -0,0 +1,53 @@
+
+package org.apache.directory.ldapstudio.schemas.controller.actions;
+
+import org.apache.directory.ldapstudio.schemas.controller.Application;
+import org.apache.directory.ldapstudio.schemas.view.IImageKeys;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * This action collapses all nodes of the viewer's tree, starting with the root.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CollapseAllAction extends Action
+{
+    protected TreeViewer viewer;
+
+    /**
+     * Creates a new instance of CollapseAllAction.
+     *
+     * @param viewer
+     *      the attached Viewer
+     */
+    public CollapseAllAction( TreeViewer viewer )
+    {
+        super( "Collapse All");
+        setToolTipText( getText() );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
IImageKeys.COLLAPSE_ALL )  );
+        setEnabled( true );
+
+        this.viewer = viewer;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run()
+    {
+        this.viewer.collapseAll();
+    }
+
+
+    /**
+     * Disposes the action delegate.
+     */
+    public void dispose()
+    {
+        this.viewer = null;
+    }
+}

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorHierarchyView.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorHierarchyView.java?view=diff&rev=500993&r1=500992&r2=500993
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorHierarchyView.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorHierarchyView.java
Mon Jan 29 02:08:20 2007
@@ -173,7 +173,7 @@
      */
     public LinkWithEditorHierarchyView( HierarchicalViewer view )
     {
-        super( "Link with editor", AS_CHECK_BOX );
+        super( "Link with Editor", AS_CHECK_BOX );
         super.setActionDefinitionId( Activator.PLUGIN_ID + "linkwitheditorschemasview" );
         super.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
             IImageKeys.LINK_WITH_EDITOR ) );

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorSchemasView.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorSchemasView.java?view=diff&rev=500993&r1=500992&r2=500993
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorSchemasView.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/controller/actions/LinkWithEditorSchemasView.java
Mon Jan 29 02:08:20 2007
@@ -172,7 +172,7 @@
      */
     public LinkWithEditorSchemasView( PoolManager view )
     {
-        super( "Link with editor", AS_CHECK_BOX );
+        super( "Link with Editor", AS_CHECK_BOX );
         super.setActionDefinitionId( Activator.PLUGIN_ID + "linkwitheditorschemasview" );
         super.setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID,
             IImageKeys.LINK_WITH_EDITOR ) );

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/IImageKeys.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/IImageKeys.java?view=diff&rev=500993&r1=500992&r2=500993
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/IImageKeys.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/IImageKeys.java
Mon Jan 29 02:08:20 2007
@@ -42,6 +42,7 @@
     public static final String SORT_UNALPHABETICAL = "ressources/icons/sort_unalphabetical.gif";
//$NON-NLS-1$
     public static final String SHOW_PREFERENCES = "ressources/icons/preferences.png"; //$NON-NLS-1$
     public static final String LINK_WITH_EDITOR = "ressources/icons/link_with_editor.gif";
//$NON-NLS-1$
+    public static final String COLLAPSE_ALL = "ressources/icons/collapse_all.gif"; //$NON-NLS-1$
 
     // Images for Views
     public static final String FOLDER_ATTRIBUTE_TYPE = "ressources/icons/folder_at.gif";
//$NON-NLS-1$

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchicalViewer.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchicalViewer.java?view=diff&rev=500993&r1=500992&r2=500993
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchicalViewer.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchicalViewer.java
Mon Jan 29 02:08:20 2007
@@ -25,6 +25,7 @@
 
 import org.apache.directory.ldapstudio.schemas.controller.Application;
 import org.apache.directory.ldapstudio.schemas.controller.HierarchicalViewerController;
+import org.apache.directory.ldapstudio.schemas.controller.actions.CollapseAllAction;
 import org.apache.directory.ldapstudio.schemas.controller.actions.LinkWithEditorHierarchyView;
 import org.apache.directory.ldapstudio.schemas.controller.actions.SortHierarchicalViewAction;
 import org.apache.directory.ldapstudio.schemas.model.LDAPModelEvent;
@@ -32,6 +33,7 @@
 import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
 import org.apache.directory.ldapstudio.schemas.view.viewers.wrappers.DisplayableTreeElement;
 import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
@@ -74,6 +76,8 @@
         toolbar.add( new SortHierarchicalViewAction( PlatformUI.getWorkbench().getActiveWorkbenchWindow(),
             SortHierarchicalViewAction.SortType.unalphabetical, Messages
                 .getString( "HierarchicalViewer.Sort_unalphabetically" ) ) ); //$NON-NLS-1$
+        toolbar.add( new Separator() );
+        toolbar.add( new CollapseAllAction( getViewer() ) );
         toolbar.add( new LinkWithEditorHierarchyView( this ) );
     }
 

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/PoolManager.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/PoolManager.java?view=diff&rev=500993&r1=500992&r2=500993
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/PoolManager.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/PoolManager.java
Mon Jan 29 02:08:20 2007
@@ -25,6 +25,7 @@
 
 import org.apache.directory.ldapstudio.schemas.controller.Application;
 import org.apache.directory.ldapstudio.schemas.controller.PoolManagerController;
+import org.apache.directory.ldapstudio.schemas.controller.actions.CollapseAllAction;
 import org.apache.directory.ldapstudio.schemas.controller.actions.CreateANewAttributeTypeAction;
 import org.apache.directory.ldapstudio.schemas.controller.actions.CreateANewObjectClassAction;
 import org.apache.directory.ldapstudio.schemas.controller.actions.CreateANewSchemaAction;
@@ -86,6 +87,8 @@
             SortPoolManagerAction.SortType.alphabetical, Messages.getString( "PoolManager.Sort_alphabetically"
) ) ); //$NON-NLS-1$
         toolbar.add( new SortPoolManagerAction( PlatformUI.getWorkbench().getActiveWorkbenchWindow(),
             SortPoolManagerAction.SortType.unalphabetical, Messages.getString( "PoolManager.Sort_unalphabetically"
) ) ); //$NON-NLS-1$
+        toolbar.add( new Separator() );
+        toolbar.add( new CollapseAllAction( getViewer() ) );
         toolbar.add( new LinkWithEditorSchemasView( this ) );
 
         // ContextMenu Creation



Mime
View raw message